Audaspace 1.5.0
A high level audio library.
|
This class stores the azimuth and elevation angles of a sound and allows to change them dynamically. More...
#include <Source.h>
Public Member Functions | |
Source (float azimuth, float elevation, float distance=0.0) | |
Creates a Source instance with an initial value. | |
float | getAzimuth () |
Retrieves the current azimuth value. | |
float | getElevation () |
Retrieves the current elevation value. | |
float | getDistance () |
Retrieves the current distance value. | |
float | getVolume () |
Retrieves the current volume value based on the distance. | |
void | setAzimuth (float azimuth) |
Changes the azimuth value. | |
void | setElevation (float elevation) |
Changes the elevation value. | |
void | setDistance (float distance) |
Changes the distance value. | |
This class stores the azimuth and elevation angles of a sound and allows to change them dynamically.
The azimuth angle goes clockwise. For a sound source situated at the right of the listener the azimuth angle is 90.
Source::Source | ( | float | azimuth, |
float | elevation, | ||
float | distance = 0.0 ) |
Creates a Source instance with an initial value.
azimuth | The value of the azimuth. |
elevation | The value of the elevation. |
distance | The distance from the listener. Max distance is 1, min distance is 0. |
float Source::getAzimuth | ( | ) |
Retrieves the current azimuth value.
float Source::getDistance | ( | ) |
Retrieves the current distance value.
float Source::getElevation | ( | ) |
Retrieves the current elevation value.
float Source::getVolume | ( | ) |
Retrieves the current volume value based on the distance.
void Source::setAzimuth | ( | float | azimuth | ) |
Changes the azimuth value.
azimuth | The new value for the azimuth. |
void Source::setDistance | ( | float | distance | ) |
Changes the distance value.
distance | The new value for the distance. Max distance is 1, min distance is 0. |
void Source::setElevation | ( | float | elevation | ) |
Changes the elevation value.
elevation | The new value for the elevation. |