---
name: "SDL_GetSilenceValueForFormat"
section: "3"
platform: "linux"
package: "libsdl3-doc"
version: "3.2.10+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_GetSilenceValueForFormat"
---

# SDL\_GetSilenceValueForFormat(3)

Get the appropriate memset value for silencing an audio format.

## NAME

SDL\_GetSilenceValueForFormat - Get the appropriate memset value for silencing an audio format.

## HEADER FILE

Defined in SDL3/SDL\_audio.h

## 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

- *format*

  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.2.0.
