TDME2 1.9.121
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
Audio Class Referencefinal

Interface to audio module. More...

#include <tdme/audio/Audio.h>

Collaboration diagram for Audio:
Collaboration graph

Public Member Functions

const Vector3getListenerPosition () const
 
void setListenerPosition (const Vector3 &listenerPosition)
 Set listener position. More...
 
const Vector3getListenerVelocity () const
 
void setListenerVelocity (const Vector3 &listenerVelocity)
 Set listener velocity. More...
 
const Vector3getListenerOrientationAt () const
 
void setListenerOrientationAt (const Vector3 &listenerOrientationAt)
 Set listener orientation at. More...
 
const Vector3getListenerOrientationUp () const
 
void setListenerOrientationUp (const Vector3 &listenerOrientationUp)
 Set listener orientation up. More...
 
AudioEntitygetEntity (const string &id)
 Returns an audio entity identified by given id. More...
 
void addEntity (AudioEntity *entity)
 Adds a audio entity. More...
 
void removeEntity (const string &id)
 Removes an audio entity. More...
 
void reset ()
 Clears all audio entities. More...
 
void shutdown ()
 Shuts the audio down. More...
 
void update ()
 Update and transfer audio entity states to open AL. More...
 

Static Public Member Functions

static AudiogetInstance ()
 

Private Member Functions

 Audio ()
 Private constructor. More...
 

Private Attributes

ALCdevice * device { nullptr }
 
ALCcontext * context { nullptr }
 
map< string, AudioEntity * > audioEntities
 
AudioBufferManager audioBufferManager
 
Vector3 listenerPosition
 
Vector3 listenerVelocity
 
Vector3 listenerOrientationAt
 
Vector3 listenerOrientationUp
 

Static Private Attributes

static constexpr int32_t ALBUFFERID_NONE { -1 }
 
static constexpr int32_t ALSOURCEID_NONE { -1 }
 
static STATIC_DLL_IMPEXT Audioinstance = nullptr
 

Friends

class AudioBufferManager
 
class AudioStream
 
class Sound
 

Detailed Description

Interface to audio module.

Author
Andreas Drewke
Version
$Id$

Definition at line 29 of file Audio.h.

Constructor & Destructor Documentation

◆ Audio()

Audio ( )
private

Private constructor.

Definition at line 31 of file Audio.cpp.

Member Function Documentation

◆ addEntity()

void addEntity ( AudioEntity entity)

Adds a audio entity.

Parameters
entityaudio entity

Definition at line 57 of file Audio.cpp.

◆ getEntity()

AudioEntity * getEntity ( const string &  id)

Returns an audio entity identified by given id.

Parameters
idid
Returns
audio entity

Definition at line 50 of file Audio.cpp.

◆ getInstance()

static Audio * getInstance ( )
inlinestatic
Returns
audio singleton instance

Definition at line 60 of file Audio.h.

◆ getListenerOrientationAt()

const Vector3 & getListenerOrientationAt ( ) const
inline
Returns
listener orientation at

Definition at line 100 of file Audio.h.

◆ getListenerOrientationUp()

const Vector3 & getListenerOrientationUp ( ) const
inline
Returns
listener orientation up

Definition at line 115 of file Audio.h.

◆ getListenerPosition()

const Vector3 & getListenerPosition ( ) const
inline
Returns
listener position

Definition at line 70 of file Audio.h.

◆ getListenerVelocity()

const Vector3 & getListenerVelocity ( ) const
inline
Returns
listener velocity

Definition at line 85 of file Audio.h.

◆ removeEntity()

void removeEntity ( const string &  id)

Removes an audio entity.

Parameters
idid

Definition at line 76 of file Audio.cpp.

◆ reset()

void reset ( )

Clears all audio entities.

Definition at line 88 of file Audio.cpp.

◆ setListenerOrientationAt()

void setListenerOrientationAt ( const Vector3 listenerOrientationAt)
inline

Set listener orientation at.

Parameters
listenerOrientationAtlistener orientation at

Definition at line 108 of file Audio.h.

◆ setListenerOrientationUp()

void setListenerOrientationUp ( const Vector3 listenerOrientationUp)
inline

Set listener orientation up.

Returns
listener orientation up

Definition at line 123 of file Audio.h.

◆ setListenerPosition()

void setListenerPosition ( const Vector3 listenerPosition)
inline

Set listener position.

Parameters
listenerPositionlistener position

Definition at line 78 of file Audio.h.

◆ setListenerVelocity()

void setListenerVelocity ( const Vector3 listenerVelocity)
inline

Set listener velocity.

Parameters
listenerVelocitylistener velocity

Definition at line 93 of file Audio.h.

◆ shutdown()

void shutdown ( )

Shuts the audio down.

Definition at line 102 of file Audio.cpp.

◆ update()

void update ( )

Update and transfer audio entity states to open AL.

Definition at line 108 of file Audio.cpp.

Friends And Related Function Documentation

◆ AudioBufferManager

friend class AudioBufferManager
friend

Definition at line 31 of file Audio.h.

◆ AudioStream

friend class AudioStream
friend

Definition at line 32 of file Audio.h.

◆ Sound

friend class Sound
friend

Definition at line 33 of file Audio.h.

Member Data Documentation

◆ ALBUFFERID_NONE

constexpr int32_t ALBUFFERID_NONE { -1 }
staticconstexprprivate

Definition at line 36 of file Audio.h.

◆ ALSOURCEID_NONE

constexpr int32_t ALSOURCEID_NONE { -1 }
staticconstexprprivate

Definition at line 37 of file Audio.h.

◆ audioBufferManager

AudioBufferManager audioBufferManager
private

Definition at line 45 of file Audio.h.

◆ audioEntities

map<string, AudioEntity*> audioEntities
private

Definition at line 43 of file Audio.h.

◆ context

ALCcontext* context { nullptr }
private

Definition at line 41 of file Audio.h.

◆ device

ALCdevice* device { nullptr }
private

Definition at line 40 of file Audio.h.

◆ instance

Audio * instance = nullptr
staticprivate

Definition at line 38 of file Audio.h.

◆ listenerOrientationAt

Vector3 listenerOrientationAt
private

Definition at line 48 of file Audio.h.

◆ listenerOrientationUp

Vector3 listenerOrientationUp
private

Definition at line 49 of file Audio.h.

◆ listenerPosition

Vector3 listenerPosition
private

Definition at line 46 of file Audio.h.

◆ listenerVelocity

Vector3 listenerVelocity
private

Definition at line 47 of file Audio.h.


The documentation for this class was generated from the following files: