Function sdl2_sys::SDL_ConvertAudio

source ·
pub unsafe extern "C" fn SDL_ConvertAudio(
    cvt: *mut SDL_AudioCVT
) -> c_int
Expand description

Once you have initialized the \c cvt structure using SDL_BuildAudioCVT(), created an audio buffer \c cvt->buf, and filled it with \c cvt->len bytes of audio data in the source format, this function will convert it in-place to the desired format.

The data conversion may expand the size of the audio data, so the buffer \c cvt->buf should be allocated after the \c cvt structure is initialized by SDL_BuildAudioCVT(), and should be \c cvt->len*cvt->len_mult bytes long.

\return 0 on success or -1 if \c cvt->buf is NULL.