SDL_GetAudioStreamProperties(3)
π SDL_GetAudioStreamProperties π
okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, this one's literally called SDL_GetAudioStreamProperties and it's giving property-hunting main character energy π
β¨ NAME β¨
SDL_GetAudioStreamProperties β get the properties associated with an audio stream. that's it, that's the gig π
β¨ SYNOPSIS β¨
#include <SDL3/SDL_audio.h>
SDL_PropertiesID SDL_GetAudioStreamProperties(SDL_AudioStream *stream);
β¨ DESCRIPTION β¨
so here's the tea π΅ β your app can hang literally any data it wants on here. it's your little properties bag, do what you want with it. BUT SDL itself actually understands these ones, so pay attention bestie:
SDL_PROP_AUDIOSTREAM_AUTO_CLEANUP_BOOLEANβ if it's true (which is the default, no cap), the stream gets automatically cleaned up when the audio subsystem quits. if you set it to false, the streams will persist beyond that π. this property is ignored for streams created throughSDL_OpenAudioDeviceStream()β those will always be cleaned up, periodt. and fyi, streams that aren't cleaned up will still be unbound from devices when the audio subsystem quits. also this property was added in SDL 3.4.0, so if you're on something older, it's not gonna know her π«Ά
β¨ FUNCTION PARAMETERS β¨
streamβ theSDL_AudioStreamyou wanna query. the one you're curious about. your girl π¦
β¨ RETURN VALUE β¨
returns a valid property ID on success, or 0 on failure π. if it flops, call SDL_GetError() for more info β she'll tell you what went wrong, fr fr.
β¨ THREAD SAFETY β¨
it is safe to call this function from any thread. go off, queen π, no locking drama required.
β¨ AVAILABILITY β¨
this function is available since SDL 3.2.0. iconic behavior honestly β
π reminder bestie: keep the property names exactly as written, they're case-sensitive and SDL does not play about that.
and that's the whole page, we ate and left no crumbs π
this lil slice of manual comes to you from Simple Directmedia Layer, version SDL 3.4.18, filed under SDL_GetAudioStreamProperties(3) β mwah, love u, go write some audio code πβ¨π
π¦ 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