mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-21 15:56:58 +02:00
67db06350d
This removes the two separate callbacks for sending and receiving data to/from the device to a unified callback that's used for both input and output. The new callback takes a pointer to both an input and output buffer. When the device is opened in playback mode the input pointer will be set to null. Likewise the output pointer will be set to null for capture devices. Both input and output pointers will be non-null for full-duplex devices.
Building
Build and run these test from this folder. Example:
clear && ./mal_build_tests_linux && ./bin/mal_test_0
These tests load resources from hard coded paths which point to the "res" folder. These paths are based on the assumption that the current directory is where the build files are located.
Emscripten
On Windows, you need to move into this directory and run emsdk_env.bat from a command prompt using an absolute path like "C:\emsdk\emsdk_env.bat". Note that PowerShell doesn't work for me for some reason. Then, run the relevant batch file:
mal_build_tests_emscripten.bat
The output will be placed in the bin folder. If you have output WASM it may not work when running the web page locally. To test you can run with something like this:
emrun bin/mal_test_0_emscripten.html