This class implements an audio device context. More...
#include <CAudioDevice.h>
Public Member Functions | |
| cAudioDevice () | |
| Constructor of cAudioDevice. More... | |
| virtual | ~cAudioDevice () |
| Destructor of cAudioDevice. More... | |
| bool | setListenerPos (const cVector3d &a_listenerPos) |
| This method sets the position of the listener in world coordinates. More... | |
| cVector3d | getListenerPos () |
| This method returns the position of the listener in world coordinates. More... | |
| bool | setListenerRot (const cMatrix3d &a_listenerRot) |
| This method sets the orientation of the listener in world coordinates. More... | |
| bool | setListenerRot (const cVector3d &a_lookAt, const cVector3d &a_up) |
| This method sets orientation of the listener in world coordinates. More... | |
| cMatrix3d | getListenerRot () |
| This method returns the position of the listener in world coordinates. More... | |
| bool | setListenerVel (const cVector3d &a_listenerVel) |
| This method sets the linear velocity of the listener in world coordinates. More... | |
| cVector3d | getListenerVel () |
| This method sets the linear velocity of the listener in world coordinates. More... | |
| cAudioBuffer * | newAudioBuffer () |
| This method creates a new audio buffer that holds audio data. More... | |
| bool | deleteAudioBuffer (cAudioBuffer *a_audioBuffer) |
| This method deletes an audio buffer passed as argument. More... | |
| void | deleteAllAudioBuffers () |
| This method deletes all allocated audio buffers. More... | |
| cAudioSource * | newAudioSource () |
| This method creates a new audio source. More... | |
| bool | deleteAudioSource (cAudioSource *a_audioSource) |
| This method deletes an audio source passed as argument. More... | |
| void | deleteAllAudioSources () |
| This method deletes all audio buffers. More... | |
Protected Member Functions | |
| 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... | |
Protected Attributes | |
| void * | m_device |
| Audio device (of type ALCdevice*). More... | |
| void * | m_context |
| Audio context (of type ALCcontext*). More... | |
| cVector3d | m_listenerPos |
| Position of listener in world coordinates. More... | |
| cMatrix3d | m_listenerRot |
| Orientation of listener in world coordinates. More... | |
| cVector3d | m_listenerVel |
| Linear velocity of listener in world coordinates. More... | |
| bool | m_active |
| Flag that indicates if the connection to audio device was opened successfully by calling method open(). More... | |
| std::vector< cAudioBuffer * > | m_audioBuffers |
| List of allocated audio buffers. More... | |
| std::vector< cAudioSource * > | m_audioSources |
| List of allocated audio sources. 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 | ( | ) |
Constructor of cAudioDevice.
|
virtual |
Destructor of cAudioDevice.
| bool chai3d::cAudioDevice::setListenerPos | ( | const cVector3d & | a_listenerPos | ) |
This method sets the position of the listener in world coordinates.
| a_listenerPos | Position of listener in world coordinates. |
|
inline |
| bool chai3d::cAudioDevice::setListenerRot | ( | const cMatrix3d & | a_listenerRot | ) |
This method sets the orientation of the listener in world coordinates.
| a_listenerRot | Orientation of the listener in world coordinates. |
This method sets the orientation of the listener in world coordinates.
| a_lookAt | Look at position of listener. |
| a_up | Up vector of listener. |
|
inline |
| bool chai3d::cAudioDevice::setListenerVel | ( | const cVector3d & | a_listenerVel | ) |
This method sets the linear velocity of the listener in world coordinates.
| a_listenerVel | Linear velocity of listener in world coordinates. |
|
inline |
| cAudioBuffer * chai3d::cAudioDevice::newAudioBuffer | ( | ) |
This method creates a new audio buffer.
| bool chai3d::cAudioDevice::deleteAudioBuffer | ( | cAudioBuffer * | a_audioBuffer | ) |
This method deletes an audio buffer passed as argument.
| a_audioBuffer | Audio buffer. |
| void chai3d::cAudioDevice::deleteAllAudioBuffers | ( | ) |
This method deletes all audio buffers.
| cAudioSource * chai3d::cAudioDevice::newAudioSource | ( | ) |
This method creates a new audio source.
| bool chai3d::cAudioDevice::deleteAudioSource | ( | cAudioSource * | a_audioSource | ) |
This method deletes an audio source passed as argument.
| a_audioSource | Audio source. |
| void chai3d::cAudioDevice::deleteAllAudioSources | ( | ) |
This method deletes all audio sources.
|
protected |
This method opens this audio device context.
|
protected |
This method closes this audio device context.
|
protected |
This method checks for any OpenAL errors.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |