Suggestion for API change of SDL_BuildAudioCVT

Hello again!

I am wondering if the SDL_BuildAudioCVT function shouldn’t
have had an interface like this:

int SDL_BuildAudioCVT(SDL_AudioCVT *cvt,
SDL_AudioSpec *src, SDL_AudioSpec *dst);

I see that recently there were added 2 channels arguments.
Eventually I believe that you will end up passing all
parameters of an SDL_AudioSpec, so wouldn’t this
be easier? (Or simpler since this is what you want :slight_smile:

I really like the AudioSpec btw. It’s nice that it’s
the same for samples as for the audio device.

Cheers–
val it = ("?NOQ of the Sun", “Johnny Andersen”,
[“anoq at vip.cybercity.dk”, “anoq at berlin-consortium.org”,
“anoq at diku.dk”], “http://users.cybercity.dk/~ccc25861/”)
: cyberspacename * meatspacename * email list * homepage URL

I am wondering if the SDL_BuildAudioCVT function shouldn’t
have had an interface like this:

int SDL_BuildAudioCVT(SDL_AudioCVT *cvt,
SDL_AudioSpec *src, SDL_AudioSpec *dst);

The audio conversion functions take the same arguments, and slowly
convert one format into the other, so at the end, both arguments
are the same. I’d hate to do that to buffers that you pass in. :slight_smile:

I really like the AudioSpec btw. It’s nice that it’s
the same for samples as for the audio device.

Thanks. :slight_smile:

See ya!
-Sam Lantinga (slouken at devolution.com)

Lead Programmer, Loki Entertainment Software–
Author of Simple DirectMedia Layer -
http://www.devolution.com/~slouken/SDL/

Sam Lantinga wrote:

int SDL_BuildAudioCVT(SDL_AudioCVT *cvt,
SDL_AudioSpec *src, SDL_AudioSpec *dst);

The audio conversion functions take the same arguments, and slowly
convert one format into the other, so at the end, both arguments
are the same. I’d hate to do that to buffers that you pass in. :slight_smile:

I’m not sure what you mean?

Cheers–
val it = ("?NOQ of the Sun", “Johnny Andersen”,
[“anoq at vip.cybercity.dk”, “anoq at berlin-consortium.org”,
“anoq at diku.dk”], “http://users.cybercity.dk/~ccc25861/”)
: cyberspacename * meatspacename * email list * homepage URL