X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pages%2FSDL-AudioCVT.html-inc;h=5ac43ae32a6fc2ea4ed757a0d66d74da23332314;hb=c785ed89faeaf10319eebaf57875ac973262c0f4;hp=c87b527c2539d117de83672e878dadaccac09c09;hpb=bb5f3b83c1a4c2ae8ddb6bbc7782105067175b3c;p=sdlgit%2FSDL-Site.git diff --git a/pages/SDL-AudioCVT.html-inc b/pages/SDL-AudioCVT.html-inc index c87b527..5ac43ae 100644 --- a/pages/SDL-AudioCVT.html-inc +++ b/pages/SDL-AudioCVT.html-inc @@ -3,19 +3,114 @@
SDL::AudioCVT -- Bindings to SDL structure SDL_AudioCVT
+SDL::AudioCVT -- Audio Conversion Structure
TODO, Core, Audio
+Core, Audio, Structure
+ +The SDL::AudioCVT
is used to convert audio data between different formats. A SDL::AudioCVT
structure is created with the
+SDL::AudioCVT-
build> function, while the actual conversion is done by the SDL::Audio::convert_audio
function.
This constructor returns an empty SDL::AudioCVT
structure.
$cvt = SDL::AudioCVT->build( $src_format, $src_channels, $src_rate + $dst_format, $dst_channels, $dst_rate ); + ++
Before an 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::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::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.
+See SDL::Audio::convert_audio
.
Set to one if the conversion is possible
+ +Audio format of the source
+ +Audio format of the destination
+ +Rate conversion increment
+ +Length of the original audio buffer in bytes
+ +Length of converted audio buffer in bytes (calculated)
+ +buf
must be len*len_mult
bytes in size (calculated)
Final audio size is len*len_ratio
Tobias Leich