---
name: "SDL_BuildAudioCVT"
section: "3"
platform: "linux"
package: "libsdl1.2-dev"
version: "1.2.15+dfsg2-8"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_BuildAudioCVT"
---

# SDL\_BuildAudioCVT(3)

Initializes a SDL\_AudioCVT structure for conversion

## NAME

SDL\_BuildAudioCVT - Initializes a SDL\_AudioCVT structure for conversion

## SYNOPSIS

**#include "SDL.h"**

**int SDL\_BuildAudioCVT**(**SDL\_AudioCVT \*cvt, Uint16 src\_format, Uint8 src\_channels, int src\_rate, Uint16 dst\_format, Uint8 dst\_channels, int dst\_rate**);

## DESCRIPTION

Before an **SDL\_AudioCVT** structure can be used to convert audio data it must be initialized with source and destination information.

**src\_format** and **dst\_format** are the source and destination format of the conversion. (For information on audio formats see  **SDL\_AudioSpec**). **src\_channels** and **dst\_channels** are the number of channels in the source and destination formats. Finally, **src\_rate** and **dst\_rate** are the frequency or samples-per-second of the source and destination formats. Once again, see **SDL\_AudioSpec**.

## RETURN VALUES

Returns **-1** if the filter could not be built or 1 if it could.

## EXAMPLES

See **SDL\_ConvertAudio**.

## SEE ALSO

**SDL\_ConvertAudio**, **SDL\_AudioCVT**
