1 #ifndef GAME_SOUND_SOUNDMANAGER_H
2 #define GAME_SOUND_SOUNDMANAGER_H
10 #include <boost/shared_ptr.hpp>
16 #include "../mwbase/soundmanager.hpp"
88 typedef std::map<MWWorld::ConstPtr,SoundBufferRefPairList>
SoundMap;
91 typedef std::map<MWWorld::ConstPtr,MWBase::SoundStreamPtr>
SaySoundMap;
94 typedef std::vector<MWBase::SoundStreamPtr>
TrackList;
143 virtual void streamMusic(
const std::string& filename);
161 virtual void say(
const std::string& filename);
215 virtual void stopSound(
const std::string& soundId);
233 virtual void update(
float duration);
235 virtual void setListenerPosDir(
const osg::Vec3f &pos,
const osg::Vec3f &dir,
const osg::Vec3f &up,
bool underwater);
239 virtual void clear();
float mNearWaterIndoorTolerance
Definition: soundmanagerimp.hpp:65
float mNearWaterOutdoorTolerance
Definition: soundmanagerimp.hpp:66
NameBufferMap mBufferNameMap
Definition: soundmanagerimp.hpp:80
virtual void resumeSounds(int types=Play_TypeMask)
Resumes all previously paused sounds.
Definition: soundmanagerimp.cpp:736
std::auto_ptr< std::deque< Sound_Buffer > > SoundBufferList
Definition: soundmanagerimp.hpp:70
Definition: openal_output.hpp:19
int mNearWaterRadius
Definition: soundmanagerimp.hpp:63
std::map< MWWorld::ConstPtr, MWBase::SoundStreamPtr > SaySoundMap
Definition: soundmanagerimp.hpp:91
Definition: soundmanagerimp.hpp:37
Definition: sound_buffer.hpp:10
void updateRegionSound(float duration)
Definition: soundmanagerimp.cpp:747
int mPausedSoundTypes
Definition: soundmanagerimp.hpp:105
virtual void say(const MWWorld::ConstPtr &reference, const std::string &filename)
Definition: soundmanagerimp.cpp:388
osg::Vec3f mListenerUp
Definition: soundmanagerimp.hpp:103
float mSFXVolume
Definition: soundmanagerimp.hpp:58
virtual bool isMusicPlaying()
Returns true if music is playing.
Definition: soundmanagerimp.cpp:376
virtual void clear()
Definition: soundmanagerimp.cpp:1183
SoundBufferList mSoundBuffers
Definition: soundmanagerimp.hpp:74
Definition: soundmanager.hpp:54
std::vector< MWBase::SoundStreamPtr > TrackList
Definition: soundmanagerimp.hpp:94
virtual ~SoundManager()
Definition: soundmanagerimp.cpp:122
Definition: soundmanager.hpp:49
const VFS::Manager * mVFS
Definition: soundmanagerimp.hpp:47
osg::Vec3f mListenerPos
Definition: soundmanagerimp.hpp:101
contains settings imported from the Morrowind INI file.
Definition: fallback.hpp:12
std::map< MWWorld::ConstPtr, SoundBufferRefPairList > SoundMap
Definition: soundmanagerimp.hpp:88
float mVoiceVolume
Definition: soundmanagerimp.hpp:60
float volumeFromType(PlayType type) const
Definition: soundmanagerimp.cpp:276
void streamMusicFull(const std::string &filename)
Definition: soundmanagerimp.cpp:309
virtual void stopSay(const MWWorld::ConstPtr &reference=MWWorld::ConstPtr())
Stop an actor speaking.
Definition: soundmanagerimp.cpp:470
std::vector< SoundBufferRefPair > SoundBufferRefPairList
Definition: soundmanagerimp.hpp:87
osg::Vec3f mListenerDir
Definition: soundmanagerimp.hpp:102
PlayType
Definition: soundmanager.hpp:48
float mFootstepsVolume
Definition: soundmanagerimp.hpp:61
Definition: soundmanager.hpp:34
std::set< std::pair< std::string, std::string > > CategorySettingVector
Definition: settings.hpp:11
Definition: soundmanagerimp.hpp:42
virtual void updatePtr(const MWWorld::ConstPtr &old, const MWWorld::ConstPtr &updated)
Definition: soundmanagerimp.cpp:1100
virtual bool getSoundPlaying(const MWWorld::ConstPtr &reference, const std::string &soundId) const
Is the given sound currently playing on the given object?
Definition: soundmanagerimp.cpp:709
float mMasterVolume
Definition: soundmanagerimp.hpp:57
virtual void pauseSounds(int types=Play_TypeMask)
Pauses all currently playing sounds, including music.
Definition: soundmanagerimp.cpp:726
virtual double getTrackTimeDelay(MWBase::SoundStreamPtr stream)
Definition: soundmanagerimp.cpp:509
virtual void update(float duration)
Definition: soundmanagerimp.cpp:1032
virtual bool sayDone(const MWWorld::ConstPtr &reference=MWWorld::ConstPtr()) const
Is actor not speaking?
Definition: soundmanagerimp.cpp:458
std::auto_ptr< Sound_Output > mOutput
Definition: soundmanagerimp.hpp:51
boost::shared_ptr< Sound_Decoder > DecoderPtr
Definition: soundmanager.hpp:19
Definition: soundmanagerimp.hpp:41
std::map< std::string, Sound_Buffer * > NameBufferMap
Definition: soundmanagerimp.hpp:79
virtual void playPlaylist(const std::string &playlist)
Definition: soundmanagerimp.cpp:381
boost::shared_ptr< MWSound::Stream > SoundStreamPtr
Definition: soundmanager.hpp:26
SoundManager & operator=(const SoundManager &rhs)
virtual float getSaySoundLoudness(const MWWorld::ConstPtr &reference) const
Definition: soundmanagerimp.cpp:419
Sound_Buffer * lookupSound(const std::string &soundId) const
Definition: soundmanagerimp.cpp:180
Definition: soundmanagerimp.hpp:36
Mutable state of a cell.
Definition: cellstore.hpp:53
std::pair< MWBase::SoundPtr, Sound_Buffer * > SoundBufferRefPair
Definition: soundmanagerimp.hpp:86
SoundList mUnusedBuffers
Definition: soundmanagerimp.hpp:84
Pointer to a const LiveCellRef.
Definition: ptr.hpp:90
Fallback::Map mFallback
Definition: soundmanagerimp.hpp:49
virtual void startRandomTitle()
Starts a random track from the current playlist.
Definition: soundmanagerimp.cpp:336
Definition: loadsoun.hpp:17
virtual MWBase::SoundStreamPtr playTrack(const DecoderPtr &decoder, PlayType type)
Play a 2D audio track, using a custom decoder.
Definition: soundmanagerimp.cpp:481
virtual MWBase::SoundPtr playSound3D(const MWWorld::ConstPtr &reference, const std::string &soundId, float volume, float pitch, PlayType type=Play_TypeSfx, PlayMode mode=Play_Normal, float offset=0)
Definition: soundmanagerimp.cpp:543
void updateWaterSound(float duration)
Definition: soundmanagerimp.cpp:807
virtual void stopTrack(MWBase::SoundStreamPtr stream)
Stop the given audio track from playing.
Definition: soundmanagerimp.cpp:501
SaySoundMap mActiveSaySounds
Definition: soundmanagerimp.hpp:92
virtual void stopSound3D(const MWWorld::ConstPtr &reference, const std::string &soundId)
Stop the given object from playing the given sound,.
Definition: soundmanagerimp.cpp:624
MWBase::SoundPtr mNearWaterSound
Definition: soundmanagerimp.hpp:108
Sound_Buffer * loadSound(const std::string &soundId)
Definition: soundmanagerimp.cpp:189
TrackList mActiveTracks
Definition: soundmanagerimp.hpp:95
PlayMode
Definition: soundmanager.hpp:33
float mMusicVolume
Definition: soundmanagerimp.hpp:59
void updateSounds(float duration)
Definition: soundmanagerimp.cpp:897
Interface for sound manager (implemented in MWSound)
Definition: soundmanager.hpp:29
SoundMap mActiveSounds
Definition: soundmanagerimp.hpp:89
virtual void stopMusic()
Stops music if it's playing.
Definition: soundmanagerimp.cpp:302
size_t mBufferCacheMax
Definition: soundmanagerimp.hpp:76
std::string mNearWaterOutdoorID
Definition: soundmanagerimp.hpp:68
Definition: soundmanagerimp.hpp:45
size_t mBufferCacheSize
Definition: soundmanagerimp.hpp:77
virtual void streamMusic(const std::string &filename)
Definition: soundmanagerimp.cpp:331
virtual void stopSound(MWBase::SoundPtr sound)
Definition: soundmanagerimp.cpp:618
DecoderPtr loadVoice(const std::string &voicefile)
Definition: soundmanagerimp.cpp:230
PlayModeEx
Definition: soundmanagerimp.hpp:40
bool mListenerUnderwater
Definition: soundmanagerimp.hpp:100
std::string mNearWaterIndoorID
Definition: soundmanagerimp.hpp:67
The main class responsible for loading files from a virtual file system.
Definition: manager.hpp:20
SoundManager()
Definition: soundmanager.hpp:67
virtual void setListenerPosDir(const osg::Vec3f &pos, const osg::Vec3f &dir, const osg::Vec3f &up, bool underwater)
Definition: soundmanagerimp.cpp:1091
MWBase::SoundStreamPtr mMusic
Definition: soundmanagerimp.hpp:97
DecoderPtr getDecoder()
Definition: soundmanagerimp.cpp:137
int mNearWaterPoints
Definition: soundmanagerimp.hpp:64
virtual void fadeOutSound3D(const MWWorld::ConstPtr &reference, const std::string &soundId, float duration)
Definition: soundmanagerimp.cpp:693
boost::shared_ptr< MWSound::Sound > SoundPtr
Definition: soundmanager.hpp:25
std::map< std::string, std::vector< std::string > > mMusicFiles
Definition: soundmanagerimp.hpp:54
MWBase::SoundPtr mUnderwaterSound
Definition: soundmanagerimp.hpp:107
std::string mCurrentPlaylist
Definition: soundmanagerimp.hpp:98
virtual MWBase::SoundPtr playSound(const std::string &soundId, float volume, float pitch, PlayType type=Play_TypeSfx, PlayMode mode=Play_Normal, float offset=0)
Definition: soundmanagerimp.cpp:515
std::string mLastPlayedMusic
Definition: soundmanagerimp.hpp:55
Environment
Definition: soundmanagerimp.hpp:35
Sound_Buffer * insertSound(const std::string &soundId, const ESM::Sound *sound)
Definition: soundmanagerimp.cpp:142
std::deque< Sound_Buffer * > SoundList
Definition: soundmanagerimp.hpp:83
virtual void processChangedSettings(const Settings::CategorySettingVector &settings)
Definition: soundmanagerimp.cpp:1047
MWBase::SoundStreamPtr playVoice(DecoderPtr decoder, const osg::Vec3f &pos, bool playlocal)
Definition: soundmanagerimp.cpp:248
size_t mBufferCacheMin
Definition: soundmanagerimp.hpp:75