SDL_BuildAudioCVT

Name

SDL_BuildAudioCVT -- Initializes a SDL_AudioCVT structure for conversion

Synopsis

uses
SDL;

function SDL_BuildAudioCVT( cvt : PSDL_AudioCVT; src_format : Integer; src_channels : UInt8; src_rate : Integer; dst_format : UInt16; dst_channels : UInt8; dst_rate : Integer ) : Integer;

Description

Before an TSDL_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 TSDL_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 TSDL_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 , TSDL_AudioCVT