James Courtier-Dutton wrote:
If I missunderstood what you are doing, and you instead wish to
implement your own OpenAL type API, then you can ask alsa-lib to tell
you how many channels the hardware can mix together.
Allegro provides a unified API to various sound interfaces on various
platforms. The programmer (or the user) can choose from several output
drivers: ALSA, OSS, arts, JACK, OpenAL, DicestSound, ... But none of
those is required though!
We already have a OpenAL wrapper implemented and OpenAL provides all we
need. Now we would like to the same thing with ALSA, because ALSA is
more common on linux installations than OpenAL. Of course, we can do it
with our software mixer + ALSA, but we where thinking of leaving mixing
to the hardware if possible.
For games programming, I suggest you use the OpenAL
API.
OpenAL will use the hardware capabilities of the sound card, if present,
leaving the game to not worry if the work is done in hardware or
software.
OpenAL can use hardware capabilities of the sound card? Hm, can it do
mixing in hardware too? Maybe I just have to check how do they implement
it in linux.
One extra suggestion I would make is to make sure the
game uses 48kHz
audio, and not 44.1kHz audio, as not many sound cards support 44.1kHz in
hardware, resulting is CPU intensive resampling.
It's up to the programmer (library user) to decide which sample rate to use.
--
Milan Mimica
http://sparklet.sf.net