

Public Member Functions | |
| virtual void | setPosition (const cVector3 pos) |
| Sets the position of the listener. | |
| virtual void | setDirection (const cVector3 dir) |
| Sets the direction the listener is facing. | |
| virtual void | setUpVector (const cVector3 up) |
| Sets the up vector to use for the listener. | |
| virtual void | setVelocity (const cVector3 vel) |
| Sets the current velocity of the listener for doppler effects. | |
| virtual void | setMasterVolume (const float volume) |
| Sets the global volume modifier (will effect all sources). | |
| virtual void | move (const cVector3 pos) |
| Convenience function to automatically set the velocity and position for you in a single call. | |
| virtual cVector3 | getPosition (void) const |
| Returns the current position of the listener. | |
| virtual cVector3 | getDirection (void) const |
| Returns the current direction of the listener. | |
| virtual cVector3 | getUpVector (void) const |
| Returns the current up vector of the listener. | |
| virtual cVector3 | getVelocity (void) const |
| Returns the current velocity of the listener. | |
| virtual float | getMasterVolume (void) const |
| Returns the global volume modifier for all sources. | |
| virtual void | setMetersPerUnit (const float &meters) |
| Sets the meters per user world unit for use with sound effects. | |
| virtual float | getMetersPerUnit (void) const |
| Returns the meters per user world unit for use with sound effects. | |
Protected Attributes | |
| cAudioMutex | Mutex |
| cVector3 | Position |
| cVector3 | Direction |
| cVector3 | UpVector |
| cVector3 | Velocity |
| float | MasterGain |
Definition at line 13 of file cListener.h.
| void cAudio::cListener::move | ( | const cVector3 | pos | ) | [virtual] |
Convenience function to automatically set the velocity and position for you in a single call.
Velocity will be set to new position - last position
| pos,: | New position to move the listener to. |
Implements cAudio::IListener.
Definition at line 43 of file cListener.cpp.
| void cAudio::cListener::setDirection | ( | const cVector3 | dir | ) | [virtual] |
Sets the direction the listener is facing.
| dir,: | New direction vector for the listener. |
Implements cAudio::IListener.
Definition at line 17 of file cListener.cpp.
| void cAudio::cListener::setMasterVolume | ( | const float | volume | ) | [virtual] |
Sets the global volume modifier (will effect all sources).
| volume,: | Volume to scale all sources by. Range: 0.0 to +inf. |
Implements cAudio::IListener.
Definition at line 37 of file cListener.cpp.
| void cAudio::cListener::setMetersPerUnit | ( | const float & | meters | ) | [virtual] |
Sets the meters per user world unit for use with sound effects.
| meters,: | Number of meters per world unit in your simulation. |
Implements cAudio::IListener.
Definition at line 53 of file cListener.cpp.
| void cAudio::cListener::setPosition | ( | const cVector3 | pos | ) | [virtual] |
Sets the position of the listener.
Note that you will still have to set velocity after this call for proper doppler effects. Use move() if you'd like to have cAudio automatically handle velocity for you.
| pos,: | New position for the listener. |
Implements cAudio::IListener.
Definition at line 11 of file cListener.cpp.
| void cAudio::cListener::setUpVector | ( | const cVector3 | up | ) | [virtual] |
Sets the up vector to use for the listener.
Default up vector is Y+, same as OpenGL.
| up,: | New up vector for the listener. |
Implements cAudio::IListener.
Definition at line 24 of file cListener.cpp.
| void cAudio::cListener::setVelocity | ( | const cVector3 | vel | ) | [virtual] |
Sets the current velocity of the listener for doppler effects.
| vel,: | New velocity for the listener. |
Implements cAudio::IListener.
Definition at line 31 of file cListener.cpp.
1.6.2