SDL_BuildAudioCVT(3)
π SDL_BuildAudioCVT π
okay so bestie, welcome to the SDL API Reference, this one's from the SDL manual and it's genuinely so useful β let's get into it π
β¨ NAME β¨
SDL_BuildAudioCVT β it initializes an SDL_AudioCVT structure so it's ready to do conversion π¦
πΈ SYNOPSIS πΈ
#include "SDL.h"
int SDL_BuildAudioCVT(SDL_AudioCVT *cvt, Uint16 src_format, Uint8
src_channels, int src_rate, Uint16 dst_format, Uint8 dst_channels, int
dst_rate);
π DESCRIPTION π
so like, an SDL_AudioCVT structure literally cannot do its little audio-conversion job until you've initialized it with the source and destination info. that's the whole vibe. no init, no convert, periodt β¨
src_formatanddst_formatβ these are the source and destination format of the conversion. (if you wanna know about audio formats, go peek atSDL_AudioSpecπ)src_channelsanddst_channelsβ the number of channels in the source format and the destination format respectively π§src_rateanddst_rateβ the frequency, aka samples-per-second, of the source and destination formats. and yeah, once again, seeSDL_AudioSpecfor the tea π
π«Ά RETURN VALUES π«Ά
- returns
-1if the filter could not be built π - returns
1if it could π
π EXAMPLES π
see SDL_ConvertAudio for the example, bestie β that's where the goods are β¨
π SEE ALSO π
SDL_ConvertAudioSDL_AudioCVT
and that's the whole thing, no cap π this page is from the SDL manual, dated Tue 11 Sep 2001, 22:58 β iconic vintage energy fr fr, mwah ππ π¦
π¦ where this page comes from
- debian bookworm: libsdl1.2-dev 1.2.15+dfsg2-8 Β· LGPL-2.1-or-later
- nixos 26.05: SDL_sixel 0-unstable-2016-02-06
- nixpkgs unstable: SDL_sixel 0-unstable-2016-02-06
- ubuntu jammy: libsdl1.2-dev 1.2.15+dfsg2-6 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms