pods::...udioCVT(3pm)
pods::...udioCVT(3pm) ยท User Contributed Perl Documentation
๐ NAME ๐
SDL::AudioCVT -- Audio Conversion Structure. That's the whole name, bestie. ๐
๐ท๏ธ CATEGORY ๐ท๏ธ
Core, Audio, Structure โ yes, it's giving core audio structure realness. โจ
๐ซฅ SYNOPSIS ๐ซฅ
This section is literally empty in the original page โ no synopsis lines, no code, just a cute little blank space. ๐
๐ฌ DESCRIPTION ๐ฌ
Okay so SDL::AudioCVT is the structure you use to convert audio data between different formats. It's not the converter itself โ it's the little info packet that tells the conversion what's up. ๐ฆ
You create a SDL::AudioCVT structure with the SDL::AudioCVT->build function, and then the actual conversion is done by the SDL::Audio::convert_audio function. Teamwork, fr fr โ iykyk. ๐
๐ธ METHODS ๐ธ
๐
new
This constructor returns an empty SDL::AudioCVT structure. Fresh out the box, no settings, just potential. โจ
๐ ๏ธ build
$cvt = SDL::AudioCVT->build( $src_format, $src_channels, $src_rate
$dst_format, $dst_channels, $dst_rate );
Before a SDL::AudioCVT structure can be used to convert audio data, it must be initialized with source and destination information. No initialization? No conversion. Periodt. ๐
src_formatanddst_formatโ the source and destination format of the conversion. For info on audio formats, seeSDL::AudioSpec. ๐src_channelsanddst_channelsโ the number of channels in the source and destination formats. Channel count matters, bestie. ๐๏ธsrc_rateanddst_rateโ the frequency or samples-per-second of the source and destination formats. Once again, seeSDL::AudioSpec. ๐ต
โ ๏ธ Caveat time: currently (SDL-1.2.11) only rate conversions of2xand(1/2)xwithx > 0are done, nearing the requested rate conversion. So it's not out here doing every rate under the sun โ set your expectations accordingly. ๐
See SDL::Audio::convert_audio. ๐ซถ
๐งฎ needed
Set to one if the conversion is possible. That's it โ one little flag, big main character energy. ๐
๐๏ธ src_format
Audio format of the source. Easy. ๐
๐ฏ dest_format
Audio format of the destination. Also easy. โจ
๐ rate_incr
Rate conversion increment. Increment-y. ๐
๐ len
Length of the original audio buffer in bytes. Byte count, no cap. ๐งฎ
๐ len_cvt
Length of converted audio buffer in bytes (calculated). The math is mathing. ๐ง
๐งบ len_mult
buf must be len*len_mult bytes in size (calculated). Important sizing tea right here. ๐ซ
๐ช len_ratio
Final audio size is len*len_ratio. That's the ratio, bestie. ๐
๐ AUTHORS ๐
See "AUTHORS" in SDL. That's where the credit lives. ๐ซถ
That's the whole page, bestie! ๐ This gem is from perl v5.42.0, dated 2024-05-01, and filed under pods::...udioCVT(3pm) โ mwah! ๐โจ
๐ฆ where this page comes from
- opensuse-leap 16.0: perl-SDL 2.548-bp160.1.13 ยท LGPL-2.1-or-later
- opensuse-leap 16.0: perl-SDL 2.548-bp160.1.13 ยท LGPL-2.1-or-later
- opensuse-leap 16.0: perl-SDL 2.548-bp160.1.13 ยท LGPL-2.1-or-later
- opensuse-leap 16.0: perl-SDL 2.548-bp160.1.13 ยท LGPL-2.1-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms