This class implements an audio device context.
More...
#include <CAudioDevice.h>
|
bool | open () |
| This method opens this audio device context. More...
|
|
bool | close () |
| This method closes this audio device context. More...
|
|
bool | checkError () |
| This method checks for any OpenAL errors. More...
|
|
This class implements an audio display context for outputting sounds to loud speakers. Optionally, 3D spatial sound is modeled by defining the position and orientation of a listener placed inside the virtual world (cWorld)
chai3d::cAudioDevice::cAudioDevice |
( |
bool |
a_createAudioContext = true | ) |
|
Constructor of cAudioDevice. The constructor takes a parameter which indicates if an audio context must be create. In principle this option should be set to true unless you are already using a movie player or any other component that is already creating an audio context under OpenAL. Creating multiple contexts is not recommended as the behavior is not predictable across different operating systems.
- Parameters
-
a_createAudioContext | Indicates if audio contexts should be created. |
chai3d::cAudioDevice::~cAudioDevice |
( |
| ) |
|
|
virtual |
bool chai3d::cAudioDevice::setListenerPos |
( |
const cVector3d & |
a_listenerPos | ) |
|
This method sets the position of the listener in world coordinates.
- Parameters
-
a_listenerPos | Position of listener in world coordinates. |
- Returns
- true if no errors occurred, false otherwise.
cVector3d chai3d::cAudioDevice::getListenerPos |
( |
| ) |
|
|
inline |
bool chai3d::cAudioDevice::setListenerRot |
( |
const cMatrix3d & |
a_listenerRot | ) |
|
This method sets the orientation of the listener in world coordinates.
- Parameters
-
a_listenerRot | Orientation of the listener in world coordinates. |
- Returns
- true if no errors occurred, false otherwise.
bool chai3d::cAudioDevice::setListenerRot |
( |
const cVector3d & |
a_lookAt, |
|
|
const cVector3d & |
a_up |
|
) |
| |
This method sets the orientation of the listener in world coordinates.
- Parameters
-
a_lookAt | Look at position of listener. |
a_up | Up vector of listener. |
- Returns
- true if no errors occurred, false otherwise.
cMatrix3d chai3d::cAudioDevice::getListenerRot |
( |
| ) |
|
|
inline |
bool chai3d::cAudioDevice::setListenerVel |
( |
const cVector3d & |
a_listenerVel | ) |
|
This method sets the linear velocity of the listener in world coordinates.
- Parameters
-
a_listenerVel | Linear velocity of listener in world coordinates. |
- Returns
- true if no errors occurred, false otherwise.
cVector3d chai3d::cAudioDevice::getListenerVel |
( |
| ) |
|
|
inline |
bool chai3d::cAudioDevice::open |
( |
| ) |
|
|
protected |
This method opens this audio device context.
- Returns
- true if no errors occurred, false otherwise.
bool chai3d::cAudioDevice::close |
( |
| ) |
|
|
protected |
This method closes this audio device context.
- Returns
- true if no errors occurred, false otherwise.
bool chai3d::cAudioDevice::checkError |
( |
| ) |
|
|
protected |
This method checks for any OpenAL errors.
- Returns
- true if no errors occurred, false otherwise.
void* chai3d::cAudioDevice::m_device |
|
protected |
void* chai3d::cAudioDevice::m_context |
|
protected |
cVector3d chai3d::cAudioDevice::m_listenerPos |
|
protected |
cMatrix3d chai3d::cAudioDevice::m_listenerRot |
|
protected |
cVector3d chai3d::cAudioDevice::m_listenerVel |
|
protected |
bool chai3d::cAudioDevice::m_active |
|
protected |
bool chai3d::cAudioDevice::m_createAudioContext |
|
protected |
The documentation for this class was generated from the following files: