Files
miniaudio/examples/build
David Reid 98a28d3c72 Example build scripts are no longer being maintained.
See the readme for an example build script for GCC and Emscripten.
2020-03-03 19:02:29 +10:00
..

Examples

gcc ../simple_playback.c -o bin/simple_playback -ldl -lpthread -lm gcc ../simple_playback.c -o bin/simple_playback -ldl -lpthread -lm -Wall -Wextra -Wpedantic -std=c89

Emscripten

On Windows, you need to move into the build 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. Examples:

emcc ../simple_playback_sine.c -o bin/simple_playback_sine.html
emcc ../simple_playback_sine.c -o bin/simple_playback_sine.html -s WASM=0 -Wall

If you output WASM it may not work when running the web page locally. To test you can run with something like this:

emrun ./bin/simple_playback_emscripten.html