Re: [AD] putting sound API in SVN

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Tuesday 26 December 2006 14:40, Milan Mimica wrote:
> Chris Robinson wrote:
> > I really need to figure out how hardware mixing works. Not so much
> > the 'playing multiple voices at once' part, but the re-channeling,
> > panning, resampling etc parts. Allegro's software mixers do it in a nice
> > (IMO) way, but I need to figure out how to do it through the various
> > backends capable of hardware mixing so the API can work with it.
>
> Maybe if you could add vtable entries (to AL_AUDIO_DRIVER?) for these
> functions I could try to do something. Maybe :)

I suppose I can add extra functions for it. The problem is mainly with the 
current ALSA driver, as that allocates a new output connection for every 
Allegro voice (so, if you allocate a mono voice, it gives mono output). In 
that way it differs from the OpenAL driver, which creates a new source on the 
output that was selected at driver initialization and does actual mixing for 
them. That allows you to take a mono voice and pan it around if you're 
outputting on 2+ channels (unlike the ALSA driver which only combines voice 
output and doesn't allow that because the mono voice is outputting on a mono 
channel). IMO, the OpenAL driver is the preferrable method, but doing that 
would remove ALSA's multiple hardware voice capabilities.

I'll also need to change some of the struct's non-voice functions to take a 
unique value so a single driver can be instantiated multiple times. Unless 
you don't think that particular ability is important?




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/