Modules / Standard library
std/audio_sink_sdl
Desktop audio output for std/audio: SDL2 opens the default output for 48 kHz float32 stereo, converting to what the device takes, and its audio thread pulls each block from the mixer. It needs no window. With SDL_AUDIODRIVER=disk SDL writes the blocks to SDL_DISKAUDIOFILE instead, so a test hears exactly what was mixed without a device.
Stable Shipped in release v0.7.0.
Import with #import "std/audio_sink_sdl".
AudioSinkOpen :: () -> boolRequests a background open; false while pending or unavailable. Retry is throttled for one second after failure. Ready/Pending/Unavailable poll it.
AudioSinkReady :: () -> bool
AudioSinkPending :: () -> bool
AudioSinkUnavailable :: () -> bool
AudioSinkClose :: ()
Source ↗ · All modules