SDL Wiki
(This is the documentation for SDL3, which is the current stable version. SDL2 was the previous version!)

SDL_GetSilenceValueForFormat

Get the appropriate memset value for silencing an audio format.

Header File

Defined in <SDL3/SDL_audio.h>

Syntax

int SDL_GetSilenceValueForFormat(SDL_AudioFormat format);

Function Parameters

SDL_AudioFormat format the audio data format to query.

Return Value

(int) Returns a byte value that can be passed to memset.

Remarks

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.

Version

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.