Skip to content
modkitv0.2

Per-user storage/config (storage.h) + audio mixer buses (audio.h)

← All examples43_storage_audio

Two things to actually observe: 1) STORAGE: a launch counter and the last master-volume are saved to a JSON config in the per-user dir. Re-run the example and the counter increments -- that is the storage round-trip. The dir is printed in the HUD. 2) AUDIO BUSES: a continuous tone is synthesized in memory and played on a "music" bus; a short blip plays on a "sfx" bus. Adjust each bus (or the master) and you HEAR the mix change -- that is what mixer buses do. No asset files needed; the audio is generated at runtime. Controls: - Up/Down: master volume M/N: music bus K/J: sfx bus - P: play a blip on the sfx bus - Space: duck the music (fade down, then back up) -- audible

Per-user storage/config (storage.h) + audio mixer buses (audio.h)

Runs the WebAssembly build on this page. Click the canvas to give it keyboard focus.

Number
43
Tags
storageaudio
Source
examples/43_storage_audio/main.c

Build and run

./scripts/build-linux.sh release --target=43_storage_audio --run