[Openal] How to select output channel

Daniel PEACOCK dpeacock at creativelabs.com
Fri Mar 27 09:34:42 PDT 2009





Hi,

Another option would be to create a 5.1 (or 7.1) audio stream on the fly
and put the mono audio data into the appropriate channel(s) and silence in
the remaining channels.  You could do this for each input channel or if you
have lots of channels then you could mix everything together into one 5.1
(or 7.1) stream.

Doing this will guarantee that audio in the front-left channel will play
out of the front-left speaker BUT only if the user has a 5.1 speaker system
connected (and configured correctly).   If the user has a different speaker
system, e.g 2.0 or 4.0, each channel of the 5.1 or 7.1 channels will be
virtualized.

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



                                                                           
             Jason Daly                                                    
             <jdaly at ist.ucf.ed                                             
             u>                                                         To 
             Sent by:                  Martin Diz <listas at martirac.com.ar> 
             openal-bounces at op                                          cc 
             ensource.creative         "openal at opensource.creative.com"    
             .com                      <openal at opensource.creative.com>    
                                                                   Subject 
                                       Re: [Openal] How to select output   
             03/27/2009 03:22          channel                             
             PM                                                            
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




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 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"
_______________________________________________
Openal mailing list
Openal at opensource.creative.com
http://opensource.creative.com/mailman/listinfo/openal

ForwardSourceID:NT0006AAD6



More information about the Openal mailing list