RE: [AD] install_sound(), DOS port, perhaps others?

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


> I mean sending samples directly to the hardware, rather than through the
> voice functions and default mixer... of course, this would
> require something
> along the lines of querying (and possibly allowing a function that would
> attempt to set closest, and return with a return value of actual
> rate set) of
> the actual playback rate, channels, capabilities, etc...

There was talk of this possibility a while ago. If we (you?) provided this
functionality, you would either have to insist on specific numbers of bits
and channels (e.g. 16-bit stereo) or design your program to support all four
possible combinations.

I shouldn't think it would take much work, but I'm too busy at the moment.
The _mix_some_samples() routine in mixer.c would have to be able to call a
function in the main program, ***locked in memory and designed to run in an
interrupt context***, that would fill the buffer with samples. Alternatively
a polling system could be set up, much like the audio stream system. I
honestly don't know how this would fit in with drivers that don't use the
Allegro mixer (such as the Windows DIGI_DIRECTX(n) driver, as opposed to
DIGI_DIRECTAMX(n)).

Ben Davis



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