The \fBSDL_AudioCVT\fR is used to convert audio data between different formats\&. A \fBSDL_AudioCVT\fR structure is created with the \fI\fBSDL_BuildAudioCVT\fP\fR function, while the actual conversion is done by the \fI\fBSDL_ConvertAudio\fP\fR function\&.

.IP "\fBUint8 *\fP\fBbuf\fR" 10This points to the audio data that will be used in the conversion\&. It is both the source and the destination, which means the converted audio data overwrites the original data\&. It also means that the converted data may be larger than the original data (if you were converting from 8-bit to 16-bit, for instance), so you must ensure \fBbuf\fR is large enough\&. See below\&.

.IP "\fBint\fP \fBlen_mult\fR" 10As explained above, the audio buffer needs to be big enough to store the converted data, which may be bigger than the original audio data\&. The length of \fBbuf\fR should be \fBlen\fR*\fBlen_mult\fR\&.

.IP "\fBdouble\fP \fBlen_ratio\fR" 10When you have finished converting your audio data, you need to know how much of your audio buffer is valid\&. \fBlen\fR*\fBlen_ratio\fR is the size of the converted audio data in bytes\&. This is very similar to \fBlen_mult\fR, however when the convert audio data is shorter than the original \fBlen_mult\fR would be 1\&. \fBlen_ratio\fR, on the other hand, would be a fractional number between 0 and 1\&.