Re: Panning Sound to left or right

Daniel PEACOCK <[email protected]>
Newsgroups gmane.comp.lib.openal
Message-ID <OF039B6721.C3271C95-ON8025778C.004F92F2-8025778C.0050A9A4@cli.creaf.com>
Hi Sven,

>>ListenerObjectOri: {0.0,0.0,0.0,0.0,0.0,1.0}

This is not a valid orientation.   The orientation consists of two vectors
- an "at" and an "up" both of which should be normalized (i.e have a
magnitude of 1).  The "at" vector tells us which direction the listener is
facing, and the "up" vector indicates which direction the listener's head
is (rather than their feet!).   The default listener orientation is
(0,0,1,0,1,0) which means the listener is facing into the screen (0,0,1)
and they are standing straight up (0,1,0).

>SourceObjectVel :  {0.1,0.1,0.1}

NOTE : Setting a velocity on a Source does not animate the source.  The
property is used to tell OpenAL the direction and speed of movement of the
Source so it can calculate the Doppler effect.  To actually move the source
you need to provide a sequence of positions over time.

>>Now, if I move the source to position {0.0,0.0,20.0}, the sound of
>>the source fades out and it seems like it moves away.

That makes sense.  You have moved the source 20 units into the screen.   It
should be straight in front of the listener, and be considerably quieter
(assuming you have not changed the distance model or source reference
distance parameters).

>>Here I tried to move the source to position {20.0,0.0,0.0}, but the
>>sound doesn't move from left to right nor fades out in any way.

At this position, the sound should pan to the left speaker - but it will be
at the same volume as the previous position (0,0,20) because they are both
exactly 20 units from the listener.   If this does not result in hard pan
to the left then, first of all check your listener orientation, and then
check your sound card settings to make sure the audio card is in Headphone
mode.

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 79 Knightsbridge, London SW1X 7RB



                                                                           
             Sven Kaempf                                                   
             <sven.kaempf@goog                                             
             lemail.com>                                                To 
             Sent by:                  [email protected]      
             openal-bounces@op                                          cc 
             ensource.creative                                             
             .com                                                  Subject 
                                       [Openal] Panning Sound to left or   
                                       right                               
             27/08/2010 15:21                                              
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




Hello there,

I've been trying to move a sound source around my listener object using
positioning in openAL like it is descibed in many tutorials.
My problem is, that I only can fade away the sound source, but not pan
it from left to right.

The following shall demonstrate the problem, I'm not getting at all.

"setup"

ListenerObjectPos : {0.0,0.0,0.0}
ListenerObjectOri: {0.0,0.0,0.0,0.0,0.0,1.0}

SourceObjectPos : {0.0,0.0,0.0}
SourceObjectVel :  {0.1,0.1,0.1}

"fadeaway"

    Now, if I move the source to position {0.0,0.0,20.0}, the sound of
the source fades out and it seems like it moves away.

"left-to-right"

    Here I tried to move the source to position {20.0,0.0,0.0}, but the
sound doesn't move from left to right nor fades out in any way.

Also I tried to set the AL_CONE_INNER_ANGLE to less than 360 degree,
tried to move the listener object instead of moving the source and also
tried to set the ListenerObjectOri to (0.0,0.0,0.0,1.0,1.0,1.0). In the
last case the fading effect for moving the source along other axes occured.

According to the coordinates the source is really moving (checked by
alGetSourcefv(...)), but on headphones there is no acoustic difference.

Would you please give me a hint or do you need more information (source
code)?

Best Regards

S.Kämpf


***
Some more information of the testplatform of me:

using 64bit fedora here
rpm openAL
language: c/c++

_______________________________________________
Openal mailing list
[email protected]
http://opensource.creative.com/mailman/listinfo/openal

ForwardSourceID:NT0008016A


_______________________________________________
Openal mailing list
[email protected]
http://opensource.creative.com/mailman/listinfo/openal
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.