[SDL] [Draft] Enhanced Audio Converter, 1/4 (repost)
Ryan C. Gordon
icculus at clutteredmind.org
Mon May 20 12:26:38 EDT 2002
> while using SDL for enabling audio in my application,
> I see the opportunity to enhance the quality of the
> audio converter (SDL_AudioCVT).
(Almost a month later...)
I've taken these routines and plugged them into SDL_sound, so that they
can be optionally compiled into the library to replace the code we
originally pulled out of SDL.
This proves to be a fairly convenient testbed for the conversion routines.
I chopped them up a little to make their interface more like the original
SDL API, so that I can build SDL_sound with either library. A couple of
other things were changed and tweaked. Nothing major, but there are some
noticable changes in there.
Right now, it doesn't work very well, but it's possible I've broken
something while tweaking it.
For those that are interested in trying this, pull the latest from
SDL_sound's CVS (instructions at http://icculus.org/SDL_sound/), and pass
--enable-altcvt to the ./configure script. The best way to test it is to
use the included playsound program:
playsound --rate 8000 --channels 1 --format S16LSB soundfile.ext
(the 8000, 1, S16LSB represent what you want to convert soundfile.ext to
on-the-fly while playing it. The file itself can be in whatever format.)
I'm interested in getting this working and included with the upcoming
SDL_sound v1.0, so patches are _very_ welcome. Get on the mailing list;
instructions are at the website.
Also, Frank, if you've improved this code in the past month, I'd like to
get a newer version of it.
Theoretically, once we stabilize this code through SDL_sound, we could
transplant it into SDL (for 2.0?).
More information about the sdlsound