[AD] Allegro's DX mixer and the mixer core.

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


Ben Davis asked me via IRC about adding a function to retrieve the frequency output, since for projects like DUMB, that do audio mixing/generation themselves, using the output frequency as a guide is helpful for determining the best sampling frequency. Getting this isn't really a problem, since the mixer core saves the mixing frequency. If such a function should be added though, what should it be called? I thought about 'int al_get_mixer_frequency(void);' though I'm not sure the al_ should be there since I've yet to see an Allegro function or variable use it. I would also make functions to be able to get the mixer buffer length, number of voices, number of channels, and bit-depth, too.

But there is one problem in doing this. Allegro's DirectSound driver, when letting DX do the mixing, does not initialize Allegro's mixer. Obviously since Allegro's mixer isn't used, there's no real need to. However this does make it a bit difficult to retrieve the mixer info; expounded by the fact that the DX mixer driver is probably the one most used. A simple fix would be to have the DX mixer driver simply initialize Allegro's mixer with the parameters the DX mixer is set with, but just not use it. This way, the DX mixer's settings are mirrored in Allegro, where they can be simply gotten from.

What do you think?

- Kitty Cat




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