SDL Wiki
(This is the documentation for SDL3, which is under heavy development and the API is changing! SDL2 is the current stable version!)


Get the appropriate memset value for silencing an audio format.

Header File

Defined in <SDL3/SDL_audio.h>


int SDL_GetSilenceValueForFormat(SDL_AudioFormat format);

Function Parameters

format the audio data format to query.

Return Value

Returns A byte value that can be passed to memset.


The value returned by this function can be used as the second argument to memset (or SDL_memset) to set an audio buffer in a specific format to silence.

Thread Safety

It is safe to call this function from any thread.


This function is available since SDL 3.0.0.

CategoryAPI, CategoryAPIFunction, CategoryAudio

[ edit | delete | history | feedback | raw ]

[ front page | index | search | recent changes | git repo | offline html ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.