YSE sound engine
1.0
cross platform sound engine
|
Public Member Functions | |
Vec | getPosition () |
Vec | getVelocity () |
Vec | getForward () |
Vec | getUpward () |
listener & | setPosition (const Vec &pos) |
listener & | setOrientation (const Vec &forward, const Vec &up=Vec(0, 1, 0)) |
The Listener is a singleton object used to control your position in the virtual space.
With sound positions and listener position (and rotation) you control how the sound output is spread out over the available speakers.
Also the listener keeps track of its own velocity, ie. the speed at which the object is moving. This is used in doppler calculations.
Definition at line 29 of file listener.hpp.
Set the current position of the listener.
If you want to use doppler and velocity, you should update the position of the listener at a frequent interval. Usually you will update the position just as often as you use System().update().
Set the orientation of the listener.
The upward vector is optional, and assumes rotation on a horizontal plane by default.