Wiki Page Content

Differences between revisions 1 and 2
Revision 1 as of 2009-11-06 22:28:28
Size: 823
Editor: SheenaSmith
Comment: create page, add content
Revision 2 as of 2009-11-06 22:53:55
Size: 1813
Editor: SheenaSmith
Comment: formatting and content
Deletions are marked like this. Additions are marked like this.
Line 6: Line 6:
Use this function to access the raw audio mixing buffer for the SDL library. Use this function to initialize a SDL_AudioCVT structure for conversion.
Line 21: Line 21:
||'''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||
Line 22: Line 29:
Returns 0 if the filter could not be built or a strictly positive number if it could.
Line 29: Line 36:
You can add useful comments here 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.''
Line 32: Line 43:
[[SDL_OtherFunction]]  [[SDL_ConvertAudio]]

 [[SDL_AudioCVT]]

[[SDL_ConvertAudio]],
[[SDL_AudioCVT]]

[[SDL_ConvertAudio]]

[[SDL_AudioCVT]]

SDL_BuildAudioCVT

Use this function to initialize a SDL_AudioCVT structure for conversion.

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

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

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.

SDL_ConvertAudio, SDL_AudioCVT

SDL_ConvertAudio

SDL_AudioCVT

None: SDL_BuildAudioCVT (last edited 2015-01-02 21:18:10 by PhilippWiesemann)

(Page Info.)
Feedback
Please include your contact information if you'd like to receive a reply.
Submit