ScummVM API documentation
Nancy::SoundManager Class Reference

Classes

struct  Channel
 

Public Types

enum  PlayCommandFlags {
  kPlaySequential = 0x0001 , kPlaySequentialPosition = 0x0003 , kPlaySequentialFrameAnchor = 0x0007 , kPlayRandomTime = 0x0010 ,
  kPlayRandomPosition = 0x0020 , kPlayMoveLinear = 0x0100 , kPlayMoveCircular = 0x0300 , kPlayRandomMove = 0x0500
}
 

Public Member Functions

void loadCommonSounds (IFF *boot)
 
void initSoundChannels ()
 
void loadSound (const SoundDescription &description, SoundEffectDescription **effectData=nullptr, bool forceReload=false)
 
void playSound (uint16 channelID)
 
void playSound (const SoundDescription &description)
 
void playSound (const Common::String &chunkName)
 
void pauseSound (uint16 channelID, bool pause)
 
void pauseSound (const SoundDescription &description, bool pause)
 
void pauseSound (const Common::String &chunkName, bool pause)
 
void pauseAllSounds (bool pause)
 
bool isSoundPlaying (uint16 channelID) const
 
bool isSoundPlaying (const SoundDescription &description) const
 
bool isSoundPlaying (const Common::String &chunkName) const
 
void stopSound (uint16 channelID)
 
void stopSound (const SoundDescription &description)
 
void stopSound (const Common::String &chunkName)
 
void stopAllSounds ()
 
byte getVolume (uint16 channelID)
 
byte getVolume (const SoundDescription &description)
 
byte getVolume (const Common::String &chunkName)
 
void setVolume (uint16 channelID, uint16 volume)
 
void setVolume (const SoundDescription &description, uint16 volume)
 
void setVolume (const Common::String &chunkName, uint16 volume)
 
uint16 getRequestedVolume (uint16 channelID) const
 
void update3DSoundPosition (uint16 channelID, int32 x, int32 y, int32 z)
 
void update3DSoundMinDistance (uint16 channelID, uint32 minDistance)
 
void update3DSoundMaxDistance (uint16 channelID, uint32 maxDistance)
 
void setListenerPosition (const Math::Vector3d &position)
 
void clearListenerPositionOverride ()
 
uint32 getRate (uint16 channelID)
 
uint32 getRate (const SoundDescription &description)
 
uint32 getRate (const Common::String &chunkName)
 
uint32 getBaseRate (uint16 channelID)
 
uint32 getBaseRate (const SoundDescription &description)
 
uint32 getBaseRate (const Common::String &chunkName)
 
void setRate (uint16 channelID, uint32 rate)
 
void setRate (const SoundDescription &description, uint32 rate)
 
void setRate (const Common::String &chunkName, uint32 rate)
 
Audio::Timestamp getLength (uint16 channelID)
 
Audio::Timestamp getLength (const SoundDescription &description)
 
Audio::Timestamp getLength (const Common::String &chunkName)
 
bool isCommonSound (const Common::String &soundName) const
 
void soundEffectMaintenance ()
 
void recalculateSoundEffects ()
 
Math::Vector3d & getOrientation ()
 
Common::String getChannelInfo (uint16 channelID)
 
void stopAndUnloadSceneSpecificSounds ()
 
void pauseSceneSpecificSounds (bool pause)
 

Static Public Member Functions

static Audio::SeekableAudioStream * makeHISStream (Common::SeekableReadStream *stream, DisposeAfterUse::Flag disposeAfterUse, uint32 overrideSamplesPerSec=0)
 

Protected Member Functions

void soundEffectMaintenance (uint16 channelID, bool force=false)
 
Common::String resolveMusicMix (const Common::String &name) const
 
Math::Vector3d getListenerPosition () const
 

Protected Attributes

Audio::Mixer * _mixer
 
Common::Array< Channel > _channels
 
Common::HashMap< Common::String, SoundDescription > _commonSounds
 
bool _shouldRecalculate
 
Math::Vector3d _orientation
 
Math::Vector3d _position
 
uint _positionLerp = 0
 
Math::Vector3d _listenerPositionOverride
 
bool _hasListenerPositionOverride = false
 

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