#include <audioenvironment.h>
Inheritance diagram for openalpp::AudioEnvironment:
Public Member Functions | |
AudioEnvironment () throw (InitError) | |
AudioEnvironment (int frequency, int refresh, bool synchronous) throw (InitError) | |
AudioEnvironment (int frequency, int refresh=-1) throw (InitError) | |
void | setSoundVelocity (float speed) throw (ValueError,FatalError) |
float | getSoundVelocity () throw (FatalError) |
void | setDopplerFactor (float factor) throw (ValueError,FatalError) |
float | getDopplerFactor () throw (FatalError) |
void | setGain (float gain) |
float | getGain () throw (FatalError) |
void | setDistanceModel (DistanceModel model) throw (FatalError) |
DistanceModel | getDistanceModel () throw (FatalError) |
void | initiateReverb () throw (InitError) |
openalpp::AudioEnvironment::AudioEnvironment | ( | ) | throw (InitError) |
Constructor.
openalpp::AudioEnvironment::AudioEnvironment | ( | int | frequency, | |
int | refresh, | |||
bool | synchronous | |||
) | throw (InitError) |
Constructor. The parameters are ignored if this isn't the first object to be instatiated of the AudioBase descendants.
frequency | is the playing frequency of the enviroment (in Hz) | |
refresh | is the refresh rate of the enviroment (in Hz) | |
synchronous | is true if the enviroment is synchronous |
openalpp::AudioEnvironment::AudioEnvironment | ( | int | frequency, | |
int | refresh = -1 | |||
) | throw (InitError) |
Constructor. The parameters are ignored if this isn't the first object to be instatiated of the AudioBase descendants.
frequency | is the playing frequency of the enviroment (in Hz) | |
refresh | is the refresh rate of the enviroment (in Hz) |
void openalpp::AudioEnvironment::setSoundVelocity | ( | float | speed | ) | throw (ValueError,FatalError) |
Sets the speed of sound in the enviroment. This is used in doppler calculations.
speed | is the speed of sound in length units per second. |
float openalpp::AudioEnvironment::getSoundVelocity | ( | ) | throw (FatalError) |
Get the speed of sound in the enviroment.
void openalpp::AudioEnvironment::setDopplerFactor | ( | float | factor | ) | throw (ValueError,FatalError) |
Sets the doppler factor. This can be used to exaggerate, deemphasize or completely turn off the doppler effect.
factor | has a default value of one. |
float openalpp::AudioEnvironment::getDopplerFactor | ( | ) | throw (FatalError) |
Gets the doppler factor.
void openalpp::AudioEnvironment::setGain | ( | float | gain | ) |
Sets global gain (volume). The volume a source will be played at will be multiplied by this _after_ the attenuation calculations. Note: In todays's implementation on Linux, gain is clamped to [0.0,1.0]. This will be changed in future releases of OpenAL.
gain | is the gain [0.0,... |
float openalpp::AudioEnvironment::getGain | ( | ) | throw (FatalError) |
Gets the global gain
void openalpp::AudioEnvironment::setDistanceModel | ( | DistanceModel | model | ) | throw (FatalError) |
Sets the distance model used in attenuation calculations.
model | is one of: None, InverseDistance, InverseDistanceClamped. |
DistanceModel openalpp::AudioEnvironment::getDistanceModel | ( | ) | throw (FatalError) |
Gets the distance model used in attenuation calculations.
void openalpp::AudioEnvironment::initiateReverb | ( | ) | throw (InitError) |
Initiates Loki's reverb implementation.