Tao.Sdl SDK Documentation

Sdl.SDL_BuildAudioCVT Method 

Initializes a SDL_AudioCVT structure for conversion

[Visual Basic]
Public Shared Function SDL_BuildAudioCVT( _
   ByVal cvt As IntPtr, _
   ByVal src_format As Short, _
   ByVal src_channels As Byte, _
   ByVal src_rate As Integer, _
   ByVal dst_format As Byte, _
   ByVal dst_channels As Byte, _
   ByVal dst_rate As Integer _
) As Integer
[C#]
public static int SDL_BuildAudioCVT(
   IntPtr cvt,
   short src_format,
   byte src_channels,
   int src_rate,
   byte dst_format,
   byte dst_channels,
   int dst_rate
);

Parameters

cvt
src_format
src_channels
src_rate
dst_format
dst_channels
dst_rate

Return Value

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

Remarks

Before an Sdl.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.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.SDL_AudioSpec.

            int SDL_BuildAudioCVT(SDL_AudioCVT *cvt, Uint16 src_format, Uint8 src_channels, int src_rate, Uint16 dst_format, Uint8 dst_channels, int dst_rate)
            

Example

See SDL_ConvertAudio.

See Also

Sdl Class | Tao.Sdl Namespace | SDL_ConvertAudio | Sdl.SDL_AudioCVT