I might as well write it once instead of repeating it on IRC.
I do not like the current situation for audio file playback.
No, I do not dislike the ASND library, in fact, I like that people actually takes advantage of the available resources. The problem here is something else, things that the mixing library does not do. Yes, ASND is a mixing and output library.
The problem is not with the ASND library itself, but with the decoders using it. With decoders, I am referring to things like mp3play and modplay from libogc. The problem is simple in its nature, but let me explain the facts that cause it.
Each mixing channel can only play one sound at a time, this is very normal for a mixer, one channel per sound, nothing strange here. The problem in the current design is the following; the decoders are all using the same hardcoded sound channel id, number zero.
Now, with the facts right next to each other, most people will make the connection, but I will state it anyway.
With the current design, only one decoded sound can be played at the same time!This proves to be a problem when you think about things more carefully. The current design assumes that you will never want to play more than one encoded sound, this is preposterous. There are plenty of situations when you would want to do that.
Here is a few examples:
*Saving size by having sound effects encoded
*
Using crossfading of multiple music tracks to create a more immersive gameplay experience.
As you can see now, it’s insane to even think about locking audio decoders to specific channels, the current design needs to be fixed. What would the fix be? Well, the simplest solution is to allow you to choose a different channel for the decoder libraries.
Edited 1 time(s). Last edit at 02/03/2009 09:11AM by henke37.