6 #include "cEFXFunctions.h" 7 #include "cOpenALUtil.h" 15 alListener3f(AL_POSITION, Position.x, Position.y, Position.z);
22 float orient[6] = {Direction[0], Direction[1], Direction[2], UpVector[0], UpVector[1], UpVector[2]};
23 alListenerfv(AL_ORIENTATION, orient);
30 float orient[6] = {Direction[0], Direction[1], Direction[2], UpVector[0], UpVector[1], UpVector[2]};
31 alListenerfv(AL_ORIENTATION, orient);
38 alListener3f(AL_VELOCITY, Velocity.x, Velocity.y, Velocity.z);
45 alListenerf(AL_GAIN, MasterGain);
51 Velocity = pos - Position;
54 alListener3f(AL_POSITION, Position.x, Position.y, Position.z);
55 alListener3f(AL_VELOCITY, Velocity.x, Velocity.y, Velocity.z);
58 #if CAUDIO_EFX_ENABLED == 1 59 void cListener::setMetersPerUnit(
const float& meters)
62 alListenerf(AL_METERS_PER_UNIT, meters);
66 float cListener::getMetersPerUnit(
void)
const 69 alGetListenerf(AL_METERS_PER_UNIT, &value);
virtual void setPosition(const cVector3 &pos)
Sets the position of the listener.
virtual void move(const cVector3 &pos)
Convenience function to automatically set the velocity and position for you in a single call...
virtual void setDirection(const cVector3 &dir)
Sets the direction the listener is facing.
virtual void setVelocity(const cVector3 &vel)
Sets the current velocity of the listener for doppler effects.
Class for manipulating vectors in 3D space.
virtual void setMasterVolume(const float &volume)
Sets the global volume modifier (will effect all sources)
virtual void setUpVector(const cVector3 &up)
Sets the up vector to use for the listener.
Main namespace for the entire cAudio library.