FIFE
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
FIFE::SoundManager Class Reference

#include <soundmanager.h>

+ Collaboration diagram for FIFE::SoundManager:

Public Member Functions

 SoundManager ()
 
 ~SoundManager ()
 
void init ()
 Initializes the audio system. More...
 
SoundEmittergetEmitter (uint32_t emitterid) const
 Returns a pointer to an emitter-instance given by emitterid. More...
 
SoundEmittercreateEmitter ()
 Returns a pointer to an allocated emitter-instance. More...
 
void releaseEmitter (uint32_t emitterid)
 Release an emitter-instance given by emitter-id. More...
 
ALCcontext * getContext () const
 Returns an openAL context. More...
 
void setVolume (float vol)
 Sets the Master Volume. More...
 
float getVolume () const
 Return the Master Volume. More...
 
void mute ()
 Mute. More...
 
void unmute ()
 Unmutes to volume before mute() was called. More...
 
void setListenerPosition (float x, float y, float z)
 Sets the position of the listener (alter ego). More...
 
void setListenerOrientation (float x, float y, float z)
 Sets the orientation of the listener (alter ego). More...
 
void setListenerVelocity (float x, float y, float z)
 Sets the velocity of the listener (alter ego). More...
 
bool isActive () const
 Returns true if audio module is active. More...
 

Private Attributes

std::vector< SoundEmitter * > m_emittervec
 
ALCcontext * m_context
 
ALCdevice * m_device
 
float m_mutevol
 
float m_volume
 

Detailed Description

Definition at line 40 of file soundmanager.h.

Constructor & Destructor Documentation

FIFE::SoundManager::SoundManager ( )

Definition at line 45 of file soundmanager.cpp.

FIFE::SoundManager::~SoundManager ( )

Definition at line 51 of file soundmanager.cpp.

References FIFE::_log, FL_ERR, m_context, m_device, and m_emittervec.

Member Function Documentation

SoundEmitter * FIFE::SoundManager::createEmitter ( )

Returns a pointer to an allocated emitter-instance.

Definition at line 110 of file soundmanager.cpp.

References m_emittervec.

ALCcontext* FIFE::SoundManager::getContext ( ) const
inline

Returns an openAL context.

Definition at line 68 of file soundmanager.h.

References m_context.

SoundEmitter * FIFE::SoundManager::getEmitter ( uint32_t  emitterid) const

Returns a pointer to an emitter-instance given by emitterid.

Parameters
emitteridThe id of the Emitter

Definition at line 106 of file soundmanager.cpp.

References m_emittervec.

float FIFE::SoundManager::getVolume ( ) const
inline

Return the Master Volume.

Definition at line 85 of file soundmanager.h.

References m_volume.

void FIFE::SoundManager::init ( )

Initializes the audio system.

Definition at line 74 of file soundmanager.cpp.

References FIFE::_log, FL_ERR, m_context, m_device, and m_volume.

bool FIFE::SoundManager::isActive ( ) const
inline

Returns true if audio module is active.

Definition at line 121 of file soundmanager.h.

References m_device.

Referenced by FIFE::SoundEmitter::SoundEmitter(), and FIFE::SoundEmitter::~SoundEmitter().

+ Here is the caller graph for this function:

void FIFE::SoundManager::mute ( )
inline

Mute.

Definition at line 91 of file soundmanager.h.

References m_mutevol.

void FIFE::SoundManager::releaseEmitter ( uint32_t  emitterid)

Release an emitter-instance given by emitter-id.

Definition at line 116 of file soundmanager.cpp.

References m_emittervec.

Referenced by FIFE::SoundEmitter::release().

+ Here is the caller graph for this function:

void FIFE::SoundManager::setListenerOrientation ( float  x,
float  y,
float  z 
)
inline

Sets the orientation of the listener (alter ego).

Definition at line 110 of file soundmanager.h.

void FIFE::SoundManager::setListenerPosition ( float  x,
float  y,
float  z 
)
inline

Sets the position of the listener (alter ego).

Definition at line 104 of file soundmanager.h.

void FIFE::SoundManager::setListenerVelocity ( float  x,
float  y,
float  z 
)

Sets the velocity of the listener (alter ego).

void FIFE::SoundManager::setVolume ( float  vol)
inline

Sets the Master Volume.

Parameters
volThe volume value. 0=silence ... 1.0=normal loudness.

Definition at line 76 of file soundmanager.h.

References m_device, and m_volume.

Referenced by FIFE::Engine::init().

+ Here is the caller graph for this function:

void FIFE::SoundManager::unmute ( )
inline

Unmutes to volume before mute() was called.

Definition at line 98 of file soundmanager.h.

References m_mutevol.

Member Data Documentation

ALCcontext* FIFE::SoundManager::m_context
private

Definition at line 128 of file soundmanager.h.

Referenced by getContext(), init(), and ~SoundManager().

ALCdevice* FIFE::SoundManager::m_device
private

Definition at line 129 of file soundmanager.h.

Referenced by init(), isActive(), setVolume(), and ~SoundManager().

std::vector<SoundEmitter*> FIFE::SoundManager::m_emittervec
private

Definition at line 127 of file soundmanager.h.

Referenced by createEmitter(), getEmitter(), releaseEmitter(), and ~SoundManager().

float FIFE::SoundManager::m_mutevol
private

Definition at line 130 of file soundmanager.h.

Referenced by mute(), and unmute().

float FIFE::SoundManager::m_volume
private

Definition at line 131 of file soundmanager.h.

Referenced by getVolume(), init(), and setVolume().


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