SFXSoundscapeManager
Engine/source/sfx/sfxSoundscape.h
The soundscape manager produces a dynamic mix between multiple active soundscapes.
Public Types
Parent
Protected Attributes
Index into mStack for the soundscape that defines the current reverb settings.
Default global SFXAmbience. Not a registered object.
Vector< SFXSoundscape * >
Stack of soundscape that are currently being faded out.
Vector< SFXSoundscape * >
Linear stack of soundscapes.
Protected Functions
_findOnStack(SFXAmbience * ambience, const Vector< SFXSoundscape * > & stack)
Found the topmost instance on the given stack associated with the given ambient space.
_findTopmostReverbOnStack(const Vector< SFXSoundscape * > & stack)
Find the topmost soundscape on the given stack that has a reverb environment defined on its ambient space.
_notifyAmbienceChanged(SFXAmbience * ambience)
Method hooked up to the SFXAmbience change signal to automatically make soundscapes using the given ambience as dirty and trigger a recomputation of their properties.
Public Functions
Return the topmost soundscape.
Return the total number of soundscape instances currently on the stack.
insertSoundscape(U32 index, SFXAmbience * ambience)
Insert a new soundscape instance associated with the given ambient space at the given stack index.
removeSoundscape(SFXSoundscape * soundscape)
Remove the given soundscape from the stack.
Detailed Description
The soundscape manager produces a dynamic mix between multiple active soundscapes.
note:The more layered soundscapes there are, the costlier ambient sound updates will get.
Public Types
typedef void Parent
Protected Attributes
FreeListChunker< SFXSoundscape > mChunker
Memory manager of soundscape instances.
S32 mCurrentReverbIndex
Index into mStack for the soundscape that defines the current reverb settings.
-1 if no current ambience has reverb settings.
SFXAmbience * mDefaultGlobalAmbience
Default global SFXAmbience. Not a registered object.
Vector< SFXSoundscape * > mFadeStack
Stack of soundscape that are currently being faded out.
These are kept around so that when their ambient spaces are activated again, they can be brought back with their fades simply being reversed.
All soundscapes on this stack are unique.
Vector< SFXSoundscape * > mStack
Linear stack of soundscapes.
Evaluated bottom to top. Scapes being faded out are always last on the stack.
Protected Functions
_findOnStack(SFXAmbience * ambience, const Vector< SFXSoundscape * > & stack)
Found the topmost instance on the given stack associated with the given ambient space.
_findTopmostReverbOnStack(const Vector< SFXSoundscape * > & stack)
Find the topmost soundscape on the given stack that has a reverb environment defined on its ambient space.
_notifyAmbienceChanged(SFXAmbience * ambience)
Method hooked up to the SFXAmbience change signal to automatically make soundscapes using the given ambience as dirty and trigger a recomputation of their properties.
Public Functions
SFXSoundscapeManager()
~SFXSoundscapeManager()
getGlobalSoundscape()
Return the topmost soundscape.
This soundscape is always defined and cannot be removed.
getNumTotalSoundscapes()
Return the total number of soundscape instances currently on the stack.
Always >=1.
insertSoundscape(U32 index, SFXAmbience * ambience)
Insert a new soundscape instance associated with the given ambient space at the given stack index.
removeSoundscape(SFXSoundscape * soundscape)
Remove the given soundscape from the stack.
update()
Update the current soundscape mix.