pods::...udioCVT(3pm)

🌸 NAME 🌸

okay so this is the pods::...udioCVT(3pm) page from the User Contributed Perl Documentation, and the actual star is SDL::AudioCVT β€” Audio Conversion Structure. That's the whole name, and honestly it ate πŸ’…


πŸ¦‹ CATEGORY πŸ¦‹

Core, Audio, Structure β€” lowkey the triple threat ✨


✨ SYNOPSIS ✨

No synopsis lines here, bestie β€” the original is just the heading and then absolute silence, which is a mood 😭 moving on!


πŸ’– DESCRIPTION πŸ’–

okay so SDL::AudioCVT is the structure 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 β€” no cap, that's the whole setup 🫢


πŸŽ€ METHODS πŸŽ€

πŸ’– new πŸ’–

This constructor returns an empty SDL::AudioCVT structure β€” a fresh little blank slate, periodt ✨

πŸ¦‹ build πŸ¦‹

$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 β€” no skipping steps, bestie πŸ’…

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 β€” it's giving "check the spec, iykyk" πŸ’œ

Currently (SDL-1.2.11) only rate conversions of 2x and (1/2)x with x > 0 are done, nearing the requested rate conversion. That's the note β€” don't @ me πŸ’€

See SDL::Audio::convert_audio.

πŸŽ€ needed πŸŽ€

Set to one if the conversion is possible β€” that's the "can we do this?" flag βœ…

πŸŽ€ src_format πŸŽ€

Audio format of the source β€” where the audio is coming from, basically πŸ¦‹

πŸŽ€ dest_format πŸŽ€

Audio format of the destination β€” where it's going, bestie 🌈

πŸŽ€ rate_incr πŸŽ€

Rate conversion increment β€” yes, that's the whole line, short and slay πŸ’…

πŸŽ€ len πŸŽ€

Length of the original audio buffer in bytes πŸ“

πŸŽ€ len_cvt πŸŽ€

Length of converted audio buffer in bytes (calculated) ✨

πŸŽ€ len_mult πŸŽ€

buf must be len*len_mult bytes in size (calculated) β€” size your buf accordingly, no cap 🫢

πŸŽ€ len_ratio πŸŽ€

Final audio size is len*len_ratio πŸ”₯


πŸ‘‘ AUTHORS πŸ‘‘

See AUTHORS in SDL.


That's the page, bestie πŸ’–βœ¨ β€” brought to you by perl v5.42.3, dated 2026-08-19. mwah πŸ’‹

πŸ“¦ where this page comes from