[Openal] Configure the number of speakers upon initialization
Daniel PEACOCK
dpeacock at creativelabs.com
Wed Feb 25 08:02:45 PST 2009
Which OpenAL device are you using? Are you playing a 5.1 multi-channel
wave file or 3D positioned mono wave files? Are you on XP or Vista?
A software based OpenAL device will typically check to the speaker output
configuration at initialization time only. This will usually match what
you see in the Windows Audio Control Panel (but there are cases when it
will not*). This type of AL device will probably not continuously poll
for speaker output changes - meaning if you start AL and the soundcard is
in 5.1 mode and then sometime later you change the soundcard to stereo
output, the AL device may not know about the change and will therefore
continue to render audio to the 5.1 speakers. However, in this situation
I would expect most soundcards to downmix the 5.1 channels to stereo - so
it wouldn't actually matter too much. NOTE : Changing from stereo to 5.1
after AL has initialized would be more noticeable because the extra
channels will never receive any audio (except perhaps due to an generic
upmix effect).
Creative's hardware based OpenAL devices will typically immediately
re-configure their 3D panner to take into account the new speaker mode.
In your situation, if you are not changing speaker mode after AL has
initialized - then I would expect you to hear all 3D audio (or all channels
of a 5.1 wave file) out of the (only) 2 connected speakers.
*If you are using Vista you may discover that you cannot select
"Headphones" in the Vista control panel, but you can in the soundcard's own
control panel.
Dan
Creative Labs (UK) Ltd.
Notice
The information in this message is confidential and may be legally
privileged. It is intended solely for the addressee. Access to this
message by anyone else is unauthorized. If you are not the intended
recipient, any disclosure, copying or distribution of the message, or
any action taken by you in reliance on it, is prohibited and may be
unlawful. If you have received this message in error, please delete it
and contact the sender immediately. Thank you.
Creative Labs UK Ltd company number 2658256 registered in England and Wales
at Belmont Road, Belmont Place, Maidenhead, Berkshire, SL6 6TB
michelle
<reschanger at gmail
.com> To
Sent by: openal at opensource.creative.com
openal-bounces at op cc
ensource.creative
.com Subject
[Openal] Configure the number of
speakers upon initialization
02/25/2009 02:15
PM
Currently, I am using a simple call to alutInit() in order to start
using OpenAL. While this perfectly takes into account the number of
speakers the sound card support - e.g. I will get stereo output for a
stereo card, 5.1 output for a 5.1 card, etc. - it is getting
problematic when I have a 5.1 card but only stereo speakers connected
to them.
Apparently, OpenAL creates a 5 channel output in this case, but as I
only have 2 speakers, I hear sounds only from certain angles. On
Windows, I would have assumed that going to Control Panel > Sounds and
Audio Devices > Advanced, and setting "Speaker setup" to "Desktop
stereo speakers" might cure this problem. However, it does not seem to
be taken into account by OpenAL.
As such, what can I do upon initialization to inform OpenAL about the
amount of speakers that are actually connected to the system? Will I
need to tell users to provide this number manually?
_______________________________________________
Openal mailing list
Openal at opensource.creative.com
http://opensource.creative.com/mailman/listinfo/openal
ForwardSourceID:NT000697DE
More information about the Openal
mailing list