Wiki Page Content

Differences between revisions 16 and 17
Revision 16 as of 2009-11-25 06:01:14
Size: 1778
Editor: SheenaSmith
Comment: content changed
Revision 17 as of 2010-08-21 00:53:34
Size: 2166
Editor: SheenaSmith
Comment: update content (old wiki)
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
||<tablewidth="100%" style="color: #FF0000;" :> DRAFT||
Line 5: Line 6:
Use this function to initialize a SDL_AudioCVT structure for conversion. Use this function to initialize an [[SDL_AudioCVT]] structure for conversion.
Line 29: Line 30:
<<Color2(green,Should "frequency or samples-per-second" be changed to "frequency (samples per second)" or can rate be two different types of units?)>>
Line 42: Line 45:
*<<BR>>Currently only rate conversions of 2^x^ and (1/2)^x^ with x > 0 are done, ,,nearing,, ^whichever most closely approximates^ the requested rate conversion.<<BR>>*

DRAFT

SDL_BuildAudioCVT

Use this function to initialize an 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

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; for more info see SDL_AudioFormat

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; for more info see SDL_AudioFormat

dst_channels

the number of channels in the destination

dst_rate

the frequency or samples-per-second of the destination

green

Return Value

Returns 1 if the audio filter is set up, 0 if there's no conversion needed, or -1 if the format conversion is not supported; call SDL_GetError() for more information.

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 only rate conversions of 2x and (1/2)x with x > 0 are done, nearing whichever most closely approximates the requested rate conversion.
*


CategoryAPI, CategoryAudio

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