SDL_GetAudio...putChannelMap(3)
π NAME π
SDL_GetAudioStreamInputChannelMap β bestie, this one gets you the current input channel map of an audio stream. That's it, that's the job. π
β¨ SYNOPSIS β¨
#include <SDL3/SDL_audio.h>
int * SDL_GetAudioStreamInputChannelMap(SDL_AudioStream *stream, int *count);
π DESCRIPTION π
okay so first things first, channel maps are optional. Most things literally do not need them at all β instead you just pass your data in the [order that SDL expects](CategoryAudio#channel-layouts) and move on with your life. slay. π
Audio streams default to no remapping applied. And the way that shows up is by returning NULL. Not me clarifying that NULL here is not an error β it's just the default vibe. π
πΈ FUNCTION PARAMETERS πΈ
streamβ theSDL_AudioStreamyou're querying, bestie. That's the one you're asking about. π«Άcountβ on output, this gets set to the number of channels in the map. It can beNULL. Yes fr fr,NULLis allowed here.
π¦ RETURN VALUE π¦
Returns an array of the current channel mapping β with as many elements as the current output spec's channels β or NULL if it's default. π
Important: that returned array should be freed with SDL_free() when it is no longer needed. Do not forget. Do not be that girl. π
π THREAD SAFETY π
It is safe to call this function from any thread, because it holds a stream-specific mutex while it's running. Iconic behaviour honestly. π₯
π₯ AVAILABILITY π₯
This function has been available since SDL 3.2.0. So if you're on something older... girl. π
π SEE ALSO π
k bye bestie, go remap those channels responsibly πβ¨πΈπ¦
β with love from the Simple Directmedia Layer girlies, SDL 3.4.18 era, page SDL_GetAudio...putChannelMap(3) πβπ
π¦ 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