Scroll to navigation

SDL_GetSilenceValueForFormat(3) SDL3 FUNCTIONS SDL_GetSilenceValueForFormat(3)

NAME

SDL_GetSilenceValueForFormat - Get the appropriate memset value for silencing an audio format.

SYNOPSIS

#include "SDL3/SDL.h"
int SDL_GetSilenceValueForFormat(SDL_AudioFormat format);

DESCRIPTION

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.

FUNCTION PARAMETERS

the audio data format to query.

RETURN VALUE

Returns A byte value that can be passed to memset.

THREAD SAFETY

It is safe to call this function from any thread.

AVAILABILITY

This function is available since SDL 3.0.0.

SDL 3.1.0 SDL