position

Christina Fuentes <[email protected]> Thu, 13 Oct 2011 12:24:20 +0100
Newsgroups gmane.comp.lib.openal
Message-ID <CAJPXMGY5_B+rQnskkfinx4owWENNSujH6fyPYTyKYj-9cgzrtA@mail.gmail.com>
Hi,

I'm trying to use OpenAL to create 3D sound clips where the source is at
different distances from the listener. Here are my settings for the
listener:
% Static listener, facing forward
forward = [0,0,1];
up = [0,1,0];
orient = [forward, up];
alListenerfv(AL.ORIENTATION, orient);
alListenerfv(AL.POSITION, [0, 0, -1])
alListenerfv(AL.VELOCITY, [0, 0, 0]);

What I want to vary is the position of the source. I'm trying to use
alSource3f(source, AL.POSITION, x, y, z)
but I can't figure out the coordinate system. More specifically, I found in
the OpenAL specifications that it uses a right-handed Cartesian system,
where in a frontal view X (thumb) points right, Y (index finger) points up,
and Z (middle finger) points towards the listener. What I can't sort out is
where the origin is and what the units are. With the above settings for the
listener, if I set the source's Y position as 0 and the X position as 0,
increasing the Z position decreases the sound's intensity, which is good
(the source is moving farther away). Is there any reference to how far it's
moving (i.e., if Z is 1 versus 3, does this equate to any distance units or
is the absolute perception of distance just relative for each listener)?
Moreover, if I keep Z at 1 and try adjusting X, which should move the sound
from the left to the right, I can't hear much of any difference, and if I
try to adjust both X and Z all bets are off.

I'm feeling a bit lost and I think some simple specifications would sort
everything out, I just can't find them anywhere online. Any help would be
greatly appreciated.

Best,
Christina

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