|
Size: 1920
Comment: minor correction
|
Size: 1813
Comment: corrected parameter definitions
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 22: | Line 22: |
| ||'''src_format'''||The source and destination format of the conversion|| ||'''src_channels'''||The number of channels in the source and destination formats|| ||'''src_rate'''||The frequency or samples-per-second of the source and destination formats|| ||'''dst_format'''||The source and destination format of the conversion|| ||'''dst_channels'''||The number of channels in the source and destination formats|| ||'''dst_rate'''||The frequency or samples-per-second of the source and destination formats|| |
||'''src_format'''||The source format of the audio data.|| ||'''src_channels'''||The number of channels in the source.|| ||'''src_rate'''||The frequency or samples-per-second of the source.|| ||'''dst_format'''||The destination format of the audio data.|| ||'''dst_channels'''||The number of channels in the destination.|| ||'''dst_rate'''||The frequency or samples-per-second of the destination.|| |
SDL_BuildAudioCVT
Use this function to initialize a SDL_AudioCVT structure for conversion.
Contents
Syntax
int SDL_BuildAudioCVT (SDL_AudioCVT* cvt,
SDL_AudioFormat src_format,
Uint8 src_channels,
int src_rate,
SDL_AudioFormat dst_format,
Uint8 dst_channels,
int dst_rate)
Function Parameters
cvt |
A pointer to an SDL_AudioCVT structure that is filled in with audio conversion information. |
src_format |
The source format of the audio data. |
src_channels |
The number of channels in the source. |
src_rate |
The frequency or samples-per-second of the source. |
dst_format |
The destination format of the audio data. |
dst_channels |
The number of channels in the destination. |
dst_rate |
The frequency or samples-per-second of the destination. |
Return Value
Returns 0 if the filter could not be built or a strictly positive number if it could.
Code Examples
You can add your code example here
Remarks
Before an SDL_AudioCVT structure can be used to convert audio data it must be initialized with source and destination information.
For information on audio formats see SDL_AudioSpec.
Currently (SDL-1.2.11) only rate conversions of 2x and (1/2)x with x > 0 are done, nearing the requested rate conversion.
