SDL_UnbindAudioStreams(3)
β¨ SDL_UnbindAudioStreams β¨
okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual π today's main character is SDL_UnbindAudioStreams(3) and she is literally here to set your audio streams free.
πΈ NAME πΈ
SDL_UnbindAudioStreams β unbind a whole list of audio streams from their audio devices. like, a mass un-linkening. no cap.
π SYNOPSIS π
#include <SDL3/SDL_audio.h>
void SDL_UnbindAudioStreams(SDL_AudioStream * const *streams, int num_streams);
π¦ DESCRIPTION π¦
so here's the tea β: you hand this function an array of streams, and it unhooks every single one of them from whatever audio device they were vibing on.
and the best part? the streams being unbound do not all have to be on the same device. mix and match, bestie, it does not care.
but for the streams that are on the same device β those get unbound atomically. which means data stops flowing through all the unbound streams on that same device at the exact same time. no awkward in-between state, no half-unbound limbo, just a clean synchronized exit. it's giving β¨choreographyβ¨.
oh and if you try to unbind a stream that isn't bound to a device at all? totally fine. that's a legal no-op β it just shrugs and moves on. no error, no drama, no nothing. π
π FUNCTION PARAMETERS π
streamsβ an array of audio streams to unbind. this one is chill: it Can be NULL or contain NULL. yeah, it's that unbothered.num_streamsβ the number of streams listed in thestreamsarray. just tell her how many you brought to the party. π₯
π§ THREAD SAFETY π§
it is safe to call this function from any thread. any of them. all of them. go off, queen π
β AVAILABILITY β
this function is available since SDL 3.2.0. so if you're on anything olderβ¦ girl, upgrade. π
π SEE ALSO π
SDL_BindAudioStreams(3)β the other half of the story, the one that does the binding. they're a matched set, iykyk. π«Ά
and that's the whole page, bestie!! π this little gem comes to you from Simple Directmedia Layer, sitting pretty at SDL 3.4.18 β so if you ever need to cite your source, that's the one. now go forth and unbind responsibly πβ¨πΈ
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms