FIFE  6e1afdbeda11afe9ac53e6023a4be96ef88f1dc6
FIFE::SoundManager Class Reference

#include <soundmanager.h>

+ Inheritance diagram for FIFE::SoundManager:
+ Collaboration diagram for FIFE::SoundManager:

Public Member Functions

 SoundManager ()
 
 ~SoundManager ()
 
void init ()
 Initializes the audio system. More...
 
bool isActive () const
 Returns true if audio module is active. 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 play ()
 Plays all SoundEmitters. More...
 
void pause ()
 Pauses all SoundEmitters. More...
 
void stop ()
 Stops all SoundEmitters. More...
 
void rewind ()
 Rewinds all SoundEmitters. More...
 
void setDistanceModel (SoundDistanceModelType model)
 Sets the distance model. More...
 
SoundDistanceModelType getDistanceModel () const
 Return the distance mode. More...
 
void setListenerPosition (const AudioSpaceCoordinate &position)
 Sets the position of the listener (alter ego). More...
 
AudioSpaceCoordinate getListenerPosition () const
 Return the position of the listener (alter ego). More...
 
void setListenerOrientation (const AudioSpaceCoordinate &orientation)
 Sets the orientation of the listener (alter ego). More...
 
AudioSpaceCoordinate getListenerOrientation () const
 Return the orientation of the listener (alter ego). More...
 
void setListenerVelocity (const AudioSpaceCoordinate &velocity)
 Sets the velocity of the listener (alter ego). More...
 
AudioSpaceCoordinate getListenerVelocity () const
 Return the velocity of the listener (alter ego). More...
 
void setDopplerFactor (float factor)
 Sets factor for doppler effect. More...
 
float getDopplerFactor () const
 Return factor for doppler effect. More...
 
void setListenerMaxDistance (float distance)
 Sets the maximal listener distance. More...
 
float getListenerMaxDistance () const
 Return the maximal listener distance. More...
 
void update ()
 Called once a frame and updates the sound objects. 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...
 
SoundEmittercreateEmitter (const std::string &name)
 Returns a pointer to an allocated emitter-instance. More...
 
void releaseEmitter (uint32_t emitterId)
 Release an emitter-instance given by emitter-id. More...
 
void deleteEmitter (SoundEmitter *emitter)
 Release given emitter. More...
 
void releaseSource (SoundEmitter *emitter)
 Release the source handle. More...
 
SoundEffectcreateSoundEffect (SoundEffectType type)
 Creates SoundEffect of the specific type. More...
 
SoundEffectcreateSoundEffectPreset (SoundEffectPreset type)
 Creates EaxReverb SoundEffect and loads the specific preset type. More...
 
void deleteSoundEffect (SoundEffect *effect)
 Deletes given SoundEffect. More...
 
void enableSoundEffect (SoundEffect *effect)
 Enables given SoundEffect. More...
 
void disableSoundEffect (SoundEffect *effect)
 Disables given SoundEffect. More...
 
void addEmitterToSoundEffect (SoundEffect *effect, SoundEmitter *emitter)
 Adds given SoundEmitter to the specific SoundEffect. More...
 
void removeEmitterFromSoundEffect (SoundEffect *effect, SoundEmitter *emitter)
 Removes given SoundEmitter from the specific SoundEffect. More...
 
void addSoundFilterToSoundEffect (SoundEffect *effect, SoundFilter *filter)
 Adds given SoundFilter to the SoundEffect. More...
 
void removeSoundFilterFromSoundEffect (SoundEffect *effect, SoundFilter *filter)
 Removes given SoundFilter from the SoundEffect. More...
 
void activateEffect (SoundEffect *effect, SoundEmitter *emitter)
 Internal function to do the OpenAL calls to activate the SoundEffect for the SoundEmitter. More...
 
void deactivateEffect (SoundEffect *effect, SoundEmitter *emitter)
 Internal function to do the OpenAL calls to deactivate the SoundEffect for the SoundEmitter. More...
 
SoundFiltercreateSoundFilter (SoundFilterType type)
 Creates SoundFilter of the specific type. More...
 
void deleteSoundFilter (SoundFilter *filter)
 Deletes given SoundFilter. More...
 
void enableDirectSoundFilter (SoundFilter *filter)
 Enables given direct SoundFilter. More...
 
void disableDirectSoundFilter (SoundFilter *filter)
 Disables given SoundFilter. More...
 
void addEmitterToDirectSoundFilter (SoundFilter *filter, SoundEmitter *emitter)
 Adds given SoundEmitter to the specific direct SoundFilter Note: A SoundEmitter can only have one direct filter. More...
 
void removeEmitterFromDirectSoundFilter (SoundFilter *filter, SoundEmitter *emitter)
 Removes given SoundEmitter from the specific direct SoundFilter. More...
 
void activateFilter (SoundFilter *filter, SoundEmitter *emitter)
 Internal function to do the OpenAL calls to activate the SoundFilter for the SoundEmitter. More...
 
void deactivateFilter (SoundFilter *filter, SoundEmitter *emitter)
 Internal function to do the OpenAL calls to deactivate the SoundFilter for the SoundEmitter. More...
 
void addToGroup (SoundEmitter *emitter)
 Adds the emitter to group. More...
 
void removeFromGroup (SoundEmitter *emitter)
 Removes the emitter from group. More...
 
void removeGroup (const std::string &group)
 Remove group and resets the group for the affected emitters. More...
 
void removeAllGroups ()
 Remove all groups and resets the group of affected emitters. More...
 
void play (const std::string &group)
 Plays all emitters of the group. More...
 
void pause (const std::string &group)
 Pauses all emitters of the group. More...
 
void stop (const std::string &group)
 Stops all emitters of the group. More...
 
void rewind (const std::string &group)
 Rewinds all emitters of the group. More...
 
void setGain (const std::string &group, float gain)
 Sets gain for all emitters of the group. More...
 
void setMaxGain (const std::string &group, float gain)
 Sets max gain for all emitters of the group. More...
 
void setMinGain (const std::string &group, float gain)
 Sets min gain for all emitters of the group. More...
 
- Public Member Functions inherited from FIFE::DynamicSingleton< SoundManager >
 DynamicSingleton ()
 
virtual ~DynamicSingleton ()
 

Private Types

typedef std::map< std::string, std::vector< SoundEmitter * > > EmitterGroups
 
typedef EmitterGroups::iterator EmitterGroupsIterator
 

Private Member Functions

void setEmitterSource (SoundEmitter *emitter)
 Sets the source handle. More...
 

Private Attributes

std::vector< SoundEmitter * > m_emitterVec
 emitter-vector, holds all emitters More...
 
ALCcontext * m_context
 OpenAL context. More...
 
ALCdevice * m_device
 OpenAL device. More...
 
float m_muteVol
 volume before mute() was called More...
 
float m_volume
 volume to support setVolume-calls before initialization More...
 
float m_maxDistance
 distance that removes a active Emitter More...
 
SoundDistanceModelType m_distanceModel
 Selected distance model. More...
 
SoundManagerState m_state
 State of the SoundManager. More...
 
ALuint m_sources [MAX_SOURCES]
 Holds handles for sources. More...
 
uint16_t m_createdSources
 Maximal created sources, can be different to MAX_SOURCES. More...
 
std::queue< ALuint > m_freeSources
 Holds free handles for sources. More...
 
std::map< SoundEmitter *, ALuint > m_activeEmitters
 Map that holds active Emitters together with the used source handle. More...
 
SoundEffectManagerm_effectManager
 
EmitterGroups m_groups
 A map that holds the groups together with the appended emitters. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from FIFE::DynamicSingleton< SoundManager >
static SoundManagerinstance ()
 

Detailed Description

Definition at line 70 of file soundmanager.h.

Member Typedef Documentation

typedef std::map<std::string, std::vector<SoundEmitter*> > FIFE::SoundManager::EmitterGroups
private

Definition at line 365 of file soundmanager.h.

typedef EmitterGroups::iterator FIFE::SoundManager::EmitterGroupsIterator
private

Definition at line 366 of file soundmanager.h.

Constructor & Destructor Documentation

FIFE::SoundManager::SoundManager ( )

Definition at line 47 of file soundmanager.cpp.

FIFE::SoundManager::~SoundManager ( )

Member Function Documentation

void FIFE::SoundManager::activateEffect ( SoundEffect effect,
SoundEmitter emitter 
)

Internal function to do the OpenAL calls to activate the SoundEffect for the SoundEmitter.

Definition at line 464 of file soundmanager.cpp.

References FIFE::SoundEffectManager::activateEffect(), and m_effectManager.

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

+ Here is the caller graph for this function:

void FIFE::SoundManager::activateFilter ( SoundFilter filter,
SoundEmitter emitter 
)

Internal function to do the OpenAL calls to activate the SoundFilter for the SoundEmitter.

Definition at line 496 of file soundmanager.cpp.

References FIFE::SoundEffectManager::activateFilter(), and m_effectManager.

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

+ Here is the caller graph for this function:

void FIFE::SoundManager::addEmitterToDirectSoundFilter ( SoundFilter filter,
SoundEmitter emitter 
)

Adds given SoundEmitter to the specific direct SoundFilter Note: A SoundEmitter can only have one direct filter.

Definition at line 488 of file soundmanager.cpp.

References FIFE::SoundEffectManager::addEmitterToDirectSoundFilter(), and m_effectManager.

void FIFE::SoundManager::addEmitterToSoundEffect ( SoundEffect effect,
SoundEmitter emitter 
)

Adds given SoundEmitter to the specific SoundEffect.

Note: A SoundEmitter can only have a limited number of effects, usually 4.

Definition at line 448 of file soundmanager.cpp.

References FIFE::SoundEffectManager::addEmitterToSoundEffect(), and m_effectManager.

void FIFE::SoundManager::addSoundFilterToSoundEffect ( SoundEffect effect,
SoundFilter filter 
)

Adds given SoundFilter to the SoundEffect.

Note: A SoundEffect can only have one SoundFilter.

Definition at line 456 of file soundmanager.cpp.

References FIFE::SoundEffectManager::addSoundFilterToSoundEffect(), and m_effectManager.

void FIFE::SoundManager::addToGroup ( SoundEmitter emitter)

Adds the emitter to group.

Called from the emitter after a setGroup() call.

Parameters
emitterThe emitter-instance.

Definition at line 504 of file soundmanager.cpp.

References FIFE::SoundEmitter::getGroup(), and m_groups.

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

+ Here is the caller graph for this function:

SoundEmitter * FIFE::SoundManager::createEmitter ( )

Returns a pointer to an allocated emitter-instance.

Definition at line 370 of file soundmanager.cpp.

References m_emitterVec.

Referenced by createEmitter(), and FIFE::SoundSource::SoundSource().

+ Here is the caller graph for this function:

SoundEmitter * FIFE::SoundManager::createEmitter ( const std::string &  name)

Returns a pointer to an allocated emitter-instance.

Parameters
nameThe name of the SoundClip.

Definition at line 386 of file soundmanager.cpp.

References createEmitter(), FIFE::DynamicSingleton< SoundClipManager >::instance(), and FIFE::SoundEmitter::setSoundClip().

SoundEffect * FIFE::SoundManager::createSoundEffect ( SoundEffectType  type)

Creates SoundEffect of the specific type.

Parameters
typeSee SoundEffectType

Definition at line 428 of file soundmanager.cpp.

References FIFE::SoundEffectManager::createSoundEffect(), and m_effectManager.

SoundEffect * FIFE::SoundManager::createSoundEffectPreset ( SoundEffectPreset  type)

Creates EaxReverb SoundEffect and loads the specific preset type.

Parameters
typeSee SoundEffectPreset

Definition at line 432 of file soundmanager.cpp.

References FIFE::SoundEffectManager::createSoundEffectPreset(), and m_effectManager.

SoundFilter * FIFE::SoundManager::createSoundFilter ( SoundFilterType  type)

Creates SoundFilter of the specific type.

Parameters
typeSee SoundFilterType

Definition at line 472 of file soundmanager.cpp.

References FIFE::SoundEffectManager::createSoundFilter(), and m_effectManager.

void FIFE::SoundManager::deactivateEffect ( SoundEffect effect,
SoundEmitter emitter 
)

Internal function to do the OpenAL calls to deactivate the SoundEffect for the SoundEmitter.

Definition at line 468 of file soundmanager.cpp.

References FIFE::SoundEffectManager::deactivateEffect(), and m_effectManager.

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

+ Here is the caller graph for this function:

void FIFE::SoundManager::deactivateFilter ( SoundFilter filter,
SoundEmitter emitter 
)

Internal function to do the OpenAL calls to deactivate the SoundFilter for the SoundEmitter.

Definition at line 500 of file soundmanager.cpp.

References FIFE::SoundEffectManager::deactivateFilter(), and m_effectManager.

Referenced by FIFE::SoundEmitter::deactivateEffects(), and FIFE::SoundEmitter::reset().

+ Here is the caller graph for this function:

void FIFE::SoundManager::deleteEmitter ( SoundEmitter emitter)

Release given emitter.

Parameters
emitterThe emitter-instance to destroy.

Definition at line 401 of file soundmanager.cpp.

References FIFE::SoundEmitter::getId(), and releaseEmitter().

void FIFE::SoundManager::deleteSoundEffect ( SoundEffect effect)

Deletes given SoundEffect.

Deactivates for SoundEmitters are automatically done.

Definition at line 436 of file soundmanager.cpp.

References FIFE::SoundEffectManager::deleteSoundEffect(), and m_effectManager.

void FIFE::SoundManager::deleteSoundFilter ( SoundFilter filter)

Deletes given SoundFilter.

Deactivates for SoundEmitters and Effects are automatically done.

Definition at line 476 of file soundmanager.cpp.

References FIFE::SoundEffectManager::deleteSoundFilter(), and m_effectManager.

void FIFE::SoundManager::disableDirectSoundFilter ( SoundFilter filter)

Disables given SoundFilter.

Only SoundFilters for SoundEmitters are meant.

Definition at line 484 of file soundmanager.cpp.

References FIFE::SoundEffectManager::disableDirectSoundFilter(), and m_effectManager.

void FIFE::SoundManager::disableSoundEffect ( SoundEffect effect)

Disables given SoundEffect.

Definition at line 444 of file soundmanager.cpp.

References FIFE::SoundEffectManager::disableSoundEffect(), and m_effectManager.

void FIFE::SoundManager::enableDirectSoundFilter ( SoundFilter filter)

Enables given direct SoundFilter.

Only SoundFilters for SoundEmitters are meant.

Definition at line 480 of file soundmanager.cpp.

References FIFE::SoundEffectManager::enableDirectSoundFilter(), and m_effectManager.

void FIFE::SoundManager::enableSoundEffect ( SoundEffect effect)

Enables given SoundEffect.

Definition at line 440 of file soundmanager.cpp.

References FIFE::SoundEffectManager::enableSoundEffect(), and m_effectManager.

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

Returns an openAL context.

Definition at line 135 of file soundmanager.cpp.

References m_context.

SoundDistanceModelType FIFE::SoundManager::getDistanceModel ( ) const

Return the distance mode.

Definition at line 240 of file soundmanager.cpp.

References m_distanceModel.

float FIFE::SoundManager::getDopplerFactor ( ) const

Return factor for doppler effect.

Definition at line 299 of file soundmanager.cpp.

References isActive().

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 366 of file soundmanager.cpp.

References m_emitterVec.

float FIFE::SoundManager::getListenerMaxDistance ( ) const

Return the maximal listener distance.

Definition at line 310 of file soundmanager.cpp.

References m_maxDistance.

AudioSpaceCoordinate FIFE::SoundManager::getListenerOrientation ( ) const

Return the orientation of the listener (alter ego).

Definition at line 267 of file soundmanager.cpp.

References isActive().

AudioSpaceCoordinate FIFE::SoundManager::getListenerPosition ( ) const

Return the position of the listener (alter ego).

Definition at line 250 of file soundmanager.cpp.

References isActive().

Referenced by update().

+ Here is the caller graph for this function:

AudioSpaceCoordinate FIFE::SoundManager::getListenerVelocity ( ) const

Return the velocity of the listener (alter ego).

Definition at line 282 of file soundmanager.cpp.

References isActive().

float FIFE::SoundManager::getVolume ( ) const

Return the Master Volume.

Definition at line 147 of file soundmanager.cpp.

References m_volume.

void FIFE::SoundManager::init ( )
bool FIFE::SoundManager::isActive ( ) const
void FIFE::SoundManager::mute ( )

Mute.

Definition at line 151 of file soundmanager.cpp.

References isActive(), and m_muteVol.

void FIFE::SoundManager::pause ( )

Pauses all SoundEmitters.

Definition at line 175 of file soundmanager.cpp.

References m_emitterVec, m_state, FIFE::SoundEmitter::pause(), and FIFE::SM_STATE_PAUSE.

void FIFE::SoundManager::pause ( const std::string &  group)

Pauses all emitters of the group.

Parameters
groupThe group name.

Definition at line 576 of file soundmanager.cpp.

References FIFE::_log, FL_WARN, and m_groups.

void FIFE::SoundManager::play ( )

Plays all SoundEmitters.

Definition at line 164 of file soundmanager.cpp.

References m_emitterVec, m_state, FIFE::SoundEmitter::play(), and FIFE::SM_STATE_PLAY.

void FIFE::SoundManager::play ( const std::string &  group)

Plays all emitters of the group.

Parameters
groupThe group name.

Definition at line 564 of file soundmanager.cpp.

References FIFE::_log, FL_WARN, and m_groups.

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

Release an emitter-instance given by emitter-id.

Parameters
emitterIdThe id of the Emitter.

Definition at line 392 of file soundmanager.cpp.

References m_emitterVec, and releaseSource().

Referenced by deleteEmitter(), FIFE::SoundEmitter::release(), and FIFE::SoundSource::~SoundSource().

+ Here is the caller graph for this function:

void FIFE::SoundManager::releaseSource ( SoundEmitter emitter)

Release the source handle.

Parameters
emitterThe emitter-instance.

Definition at line 415 of file soundmanager.cpp.

References FIFE::_log, FL_WARN, FIFE::SoundEmitter::isActive(), m_activeEmitters, m_freeSources, and FIFE::SoundEmitter::setSource().

Referenced by releaseEmitter(), FIFE::SoundEmitter::reset(), and update().

+ Here is the caller graph for this function:

void FIFE::SoundManager::removeAllGroups ( )

Remove all groups and resets the group of affected emitters.

Definition at line 553 of file soundmanager.cpp.

References m_groups, and removeGroup().

void FIFE::SoundManager::removeEmitterFromDirectSoundFilter ( SoundFilter filter,
SoundEmitter emitter 
)

Removes given SoundEmitter from the specific direct SoundFilter.

Definition at line 492 of file soundmanager.cpp.

References m_effectManager, and FIFE::SoundEffectManager::removeEmitterFromDirectSoundFilter().

void FIFE::SoundManager::removeEmitterFromSoundEffect ( SoundEffect effect,
SoundEmitter emitter 
)

Removes given SoundEmitter from the specific SoundEffect.

Definition at line 452 of file soundmanager.cpp.

References m_effectManager, and FIFE::SoundEffectManager::removeEmitterFromSoundEffect().

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

+ Here is the caller graph for this function:

void FIFE::SoundManager::removeFromGroup ( SoundEmitter emitter)

Removes the emitter from group.

Called from the emitter if new group is different as the old.

Parameters
emitterThe emitter-instance.

Definition at line 510 of file soundmanager.cpp.

References FIFE::_log, FL_WARN, FIFE::SoundEmitter::getGroup(), and m_groups.

Referenced by FIFE::SoundEmitter::reset(), and FIFE::SoundEmitter::setGroup().

+ Here is the caller graph for this function:

void FIFE::SoundManager::removeGroup ( const std::string &  group)

Remove group and resets the group for the affected emitters.

Parameters
groupThe group name.

Definition at line 537 of file soundmanager.cpp.

References FIFE::_log, FL_WARN, and m_groups.

Referenced by removeAllGroups().

+ Here is the caller graph for this function:

void FIFE::SoundManager::removeSoundFilterFromSoundEffect ( SoundEffect effect,
SoundFilter filter 
)
void FIFE::SoundManager::rewind ( )

Rewinds all SoundEmitters.

Definition at line 197 of file soundmanager.cpp.

References m_emitterVec, and FIFE::SoundEmitter::rewind().

void FIFE::SoundManager::rewind ( const std::string &  group)

Rewinds all emitters of the group.

Parameters
groupThe group name.

Definition at line 600 of file soundmanager.cpp.

References FIFE::_log, FL_WARN, and m_groups.

void FIFE::SoundManager::setDopplerFactor ( float  factor)

Sets factor for doppler effect.

Definition at line 291 of file soundmanager.cpp.

References isActive().

void FIFE::SoundManager::setEmitterSource ( SoundEmitter emitter)
private

Sets the source handle.

Parameters
emitterThe Emitter pointer.

Definition at line 405 of file soundmanager.cpp.

References FIFE::_log, FL_WARN, m_activeEmitters, m_freeSources, and FIFE::SoundEmitter::setSource().

Referenced by update().

+ Here is the caller graph for this function:

void FIFE::SoundManager::setGain ( const std::string &  group,
float  gain 
)

Sets gain for all emitters of the group.

Parameters
groupThe group name.
gainThe gain value.

Definition at line 612 of file soundmanager.cpp.

References FIFE::_log, FL_WARN, and m_groups.

void FIFE::SoundManager::setListenerMaxDistance ( float  distance)

Sets the maximal listener distance.

If it is larger the emitter turns off, or on if it is smaller.

Definition at line 306 of file soundmanager.cpp.

References utf8::distance(), and m_maxDistance.

void FIFE::SoundManager::setListenerOrientation ( const AudioSpaceCoordinate orientation)

Sets the orientation of the listener (alter ego).

Definition at line 259 of file soundmanager.cpp.

References isActive(), FIFE::PointType3D< T >::x, FIFE::PointType3D< T >::y, and FIFE::PointType3D< T >::z.

void FIFE::SoundManager::setListenerPosition ( const AudioSpaceCoordinate position)

Sets the position of the listener (alter ego).

Definition at line 244 of file soundmanager.cpp.

References isActive(), FIFE::PointType3D< T >::x, FIFE::PointType3D< T >::y, and FIFE::PointType3D< T >::z.

void FIFE::SoundManager::setListenerVelocity ( const AudioSpaceCoordinate velocity)

Sets the velocity of the listener (alter ego).

Definition at line 276 of file soundmanager.cpp.

References isActive(), FIFE::PointType3D< T >::x, FIFE::PointType3D< T >::y, and FIFE::PointType3D< T >::z.

void FIFE::SoundManager::setMaxGain ( const std::string &  group,
float  gain 
)

Sets max gain for all emitters of the group.

Parameters
groupThe group name.
gainThe max gain value.

Definition at line 624 of file soundmanager.cpp.

References FIFE::_log, FL_WARN, and m_groups.

void FIFE::SoundManager::setMinGain ( const std::string &  group,
float  gain 
)

Sets min gain for all emitters of the group.

Parameters
groupThe group name.
gainThe min gain value.

Definition at line 636 of file soundmanager.cpp.

References FIFE::_log, FL_WARN, and m_groups.

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

Sets the Master Volume.

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

Definition at line 139 of file soundmanager.cpp.

References isActive(), m_muteVol, and m_volume.

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

+ Here is the caller graph for this function:

void FIFE::SoundManager::stop ( )

Stops all SoundEmitters.

Definition at line 186 of file soundmanager.cpp.

References m_emitterVec, m_state, FIFE::SM_STATE_STOP, and FIFE::SoundEmitter::stop().

void FIFE::SoundManager::stop ( const std::string &  group)

Stops all emitters of the group.

Parameters
groupThe group name.

Definition at line 588 of file soundmanager.cpp.

References FIFE::_log, FL_WARN, and m_groups.

void FIFE::SoundManager::unmute ( )

Unmutes to volume before mute() was called.

Definition at line 158 of file soundmanager.cpp.

References isActive(), and m_muteVol.

Member Data Documentation

std::map<SoundEmitter*, ALuint> FIFE::SoundManager::m_activeEmitters
private

Map that holds active Emitters together with the used source handle.

Definition at line 398 of file soundmanager.h.

Referenced by releaseSource(), setEmitterSource(), and update().

ALCcontext* FIFE::SoundManager::m_context
private

OpenAL context.

Definition at line 377 of file soundmanager.h.

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

uint16_t FIFE::SoundManager::m_createdSources
private

Maximal created sources, can be different to MAX_SOURCES.

Definition at line 394 of file soundmanager.h.

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

ALCdevice* FIFE::SoundManager::m_device
private

OpenAL device.

Definition at line 379 of file soundmanager.h.

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

SoundDistanceModelType FIFE::SoundManager::m_distanceModel
private

Selected distance model.

Definition at line 387 of file soundmanager.h.

Referenced by getDistanceModel(), and setDistanceModel().

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

emitter-vector, holds all emitters

Definition at line 375 of file soundmanager.h.

Referenced by createEmitter(), getEmitter(), pause(), play(), releaseEmitter(), rewind(), stop(), update(), and ~SoundManager().

std::queue<ALuint> FIFE::SoundManager::m_freeSources
private

Holds free handles for sources.

Definition at line 396 of file soundmanager.h.

Referenced by init(), releaseSource(), setEmitterSource(), and update().

EmitterGroups FIFE::SoundManager::m_groups
private

A map that holds the groups together with the appended emitters.

Definition at line 403 of file soundmanager.h.

Referenced by addToGroup(), pause(), play(), removeAllGroups(), removeFromGroup(), removeGroup(), rewind(), setGain(), setMaxGain(), setMinGain(), and stop().

float FIFE::SoundManager::m_maxDistance
private

distance that removes a active Emitter

Definition at line 385 of file soundmanager.h.

Referenced by getListenerMaxDistance(), setListenerMaxDistance(), and update().

float FIFE::SoundManager::m_muteVol
private

volume before mute() was called

Definition at line 381 of file soundmanager.h.

Referenced by mute(), setVolume(), and unmute().

ALuint FIFE::SoundManager::m_sources[MAX_SOURCES]
private

Holds handles for sources.

Definition at line 392 of file soundmanager.h.

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

SoundManagerState FIFE::SoundManager::m_state
private

State of the SoundManager.

Definition at line 389 of file soundmanager.h.

Referenced by init(), isActive(), pause(), play(), stop(), and update().

float FIFE::SoundManager::m_volume
private

volume to support setVolume-calls before initialization

Definition at line 383 of file soundmanager.h.

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


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