Hello sdl,
is it possible to play ie to wav files at the same time without
using sdl_mixer ? if so, where can i find sample code ?–
Best regards,
firefox mailto:@palpetine
–
Okresl Swoje potrzeby - my znajdziemy oferte za Ciebie!
[ http://oferty.onet.pl ]
What you do is basically add them together, one sample at a time, and
then output the result. Of course, to get any useful results, you have to:
* Handle the potential levels outside the range of the
sample format, to avoid wrapping.
* Handle each playing wave as it's own "object", keeping
track of whether it's playing or not, and when it should
stop, if it's playing. (I prefer to call these objects
"voices", whereas some call them channels.)
* Perform resampling to the output sample rate, if you
cannot get the rate that the files were recorded at,
or if the files were recorded at different rates.
That’s pretty much it, I think, for a very basic “engine”. Still a few
pages of code, though. I’m not sure you should mess with it, unless
you’re really interested in audio programming in itself. It quickly gets
much more complicated than it may look at a first glance.
//David Olofson — Programmer, Reologica Instruments AB
.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
----------------------------> http://www.linuxdj.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter |
-------------------------------------> http://olofson.net -'On Monday 18 March 2002 16:06, firefox wrote:
Hello sdl,
is it possible to play ie to wav files at the same time without
using sdl_mixer ? if so, where can i find sample code ?