[Openal] How to select output channel
Jason Daly
jdaly at ist.ucf.edu
Fri Mar 27 08:22:32 PDT 2009
Martin Diz wrote:
> Hello, i`m working on a project that requires surround sound.
> I managed to play ogg file with no problem.
> What i need to do next is to select which of the speaker in a 7.1 or
> 5.1 arrangement will play the sound.
> for example i have file1.ogg and file2.ogg ( both mono channel
> file`s), and should play file1 in the front left speaker and file2 in
> both rear speakers.
> I spent a lot of time in google.com <http://google.com> but didn't
> find the answer nor a place to get started with this issue.
> Bay the way im using Linux 2.6.26-1-686, alsa, and a sound blaster
> live 5.1.
> The sourround sound works great on mi pc i tested it with others
> applications.
> I hope i make my self clear and some one could help me!
> Thank you in advance.
I don't think there's a way to force a sound to a particular speaker
(there might be an extension for this, but I don't know of it).
Probably the closest you can come is to place the sound at the
appropriate coordinates to where OpenAL's normal spatialization will
render it from that speaker.
If I've got my coordinates straight, it'll be (-1.0, -1.0, 0.0) for
file1.ogg, and (0.0, 1.0, 0.0) for file2.ogg, assuming you have the
listener positioned at (0.0, 0.0, 0.0) (or you set the sources to be
relative).
You probably won't get 100% of the sound from the speakers you want
(some of it will likely spread to other speakers), but it should be close.
--"J"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://opensource.creative.com/pipermail/openal/attachments/20090327/3d5b669e/attachment.html
More information about the Openal
mailing list