[Openal] Linux positional audio (resend)
Jason Daly
jdaly at ist.ucf.edu
Tue Aug 23 13:07:49 PDT 2005
Stephen J Baker wrote:
> jpweber at imonk.com wrote:
>
>> Before I get too far with this, does positional audio work
>> on Linux? Right now, I get distance attenuation, but just
>> mono effect.
>
>
> I have recently being doing this very thing - and I can
> definitely confirm that stereo position, range attenuation
> and doppler all work in Linux using the CVS checkout tagged
> 'Linux_Spec1-0'.
It works, but the effect is less convincing than the Windows
implementations, where a considerably greater amount of effort has no
doubt been spent. I use the Linux version a lot, but I've always found
the separation between channels a bit lacking.
>> If I understand, proper stereo has much more to do with phase
>> versus just fiddling the balance. I'm guessing this is
>> a special feature of some audio chipsets.
>
>
> Phase certainly plays a part in getting the front-versus-back
> thing right. I don't think the Linux version (at least) does
> *that* right.
With a 4-speaker arrangement, if you configure OpenAL (in .openalrc) to
use ALSA and 4 speakers, it will do front/back as well as it does
left/right. There are no HRTF's done, though, so headphones will
definitely not give you any front/back effects.
>> I've tried several sounds, specifically trying 1 channel
>> sounds, since the docs say 2-channel sounds are implied
>> non-positional. Is there more at issue with
>> positional-ready sounds?
>
>
> I had no problem with stereo sounds being positioned
> as if they were monophonic.
Under Windows, stereo sounds are not spatialized. Under Linux, I
believe they are. This will change in the 1.1 version, however. I
believe 1.1 specifies that multi-channel sounds are not spatialized.
>> Does the alcOpenDevice device name matter, or is NULL
>> the best route?
>
NULL definitely works, and you can specify which devices are used in
your .openalrc file in the user's home directory. I'm not sure if the
argument to alcOpenDevice() even works in Linux or not. I think it's
supposed to (the code is in place for it), and it will certainly be
working before the Linux implementation is considered 1.1 compliant.
In Linux, some of the devices you might see are "native", "alsa", "sdl",
"waveout". Most of the time just "native" will be available. If you
configure with --enable-alsa, then the "alsa" device would be available
as well. At least that's the way it used to work :-)
--"J"
More information about the Openal
mailing list