1 #ifndef GAME_MWBASE_SOUNDMANAGER_H
2 #define GAME_MWBASE_SOUNDMANAGER_H
8 #include "../mwworld/ptr.hpp"
20 typedef std::shared_ptr<Sound_Decoder>
DecoderPtr;
81 virtual void streamMusic(
const std::string& filename) = 0;
88 virtual void playPlaylist(
const std::string &playlist) = 0;
96 virtual void say(
const std::string& filename) = 0;
123 virtual Sound *
playSound(
const std::string& soundId,
float volume,
float pitch,
130 float volume,
float pitch,
Type type=Type::Sfx,
131 PlayMode mode=PlayMode::Normal,
float offset=0) = 0;
135 virtual Sound *
playSound3D(
const osg::Vec3f& initialPos,
const std::string& soundId,
136 float volume,
float pitch,
Type type=Type::Sfx,
137 PlayMode mode=PlayMode::Normal,
float offset=0) = 0;
152 virtual void stopSound(
const std::string& soundId) = 0;
171 virtual void update(
float duration) = 0;
173 virtual void setListenerPosDir(
const osg::Vec3f &pos,
const osg::Vec3f &dir,
const osg::Vec3f &up,
bool underwater) = 0;
177 virtual void clear() = 0;
virtual void playPlaylist(const std::string &playlist)=0
SoundManager & operator=(const SoundManager &)
not implemented
virtual void stopSound(Sound *sound)=0
Stop the given sound from playing.
virtual void setListenerPosDir(const osg::Vec3f &pos, const osg::Vec3f &dir, const osg::Vec3f &up, bool underwater)=0
MWSound::Type Type
Definition: soundmanager.hpp:70
virtual Sound * playSound(const std::string &soundId, float volume, float pitch, Type type=Type::Sfx, PlayMode mode=PlayMode::Normal, float offset=0)=0
int operator~(Type a)
Definition: soundmanager.hpp:48
MWSound::Sound Sound
Definition: soundmanager.hpp:56
virtual double getTrackTimeDelay(SoundStream *stream)=0
PlayMode
Definition: soundmanager.hpp:23
virtual void resumeSounds(int types=static_cast< int >(Type::Mask))=0
Resumes all previously paused sounds.
virtual void stopMusic()=0
Stops music if it's playing.
virtual bool sayDone(const MWWorld::ConstPtr &reference=MWWorld::ConstPtr()) const =0
Is actor not speaking?
virtual Sound * playSound3D(const MWWorld::ConstPtr &reference, const std::string &soundId, float volume, float pitch, Type type=Type::Sfx, PlayMode mode=PlayMode::Normal, float offset=0)=0
virtual void streamMusic(const std::string &filename)=0
virtual void say(const MWWorld::ConstPtr &reference, const std::string &filename)=0
int operator|(Type a, Type b)
Definition: soundmanager.hpp:51
virtual void updatePtr(const MWWorld::ConstPtr &old, const MWWorld::ConstPtr &updated)=0
virtual bool isMusicPlaying()=0
Returns true if music is playing.
int operator&(Type a, Type b)
Definition: soundmanager.hpp:49
virtual void update(float duration)=0
Mutable state of a cell.
Definition: cellstore.hpp:51
virtual void processChangedSettings(const std::set< std::pair< std::string, std::string > > &settings)=0
virtual void stopTrack(SoundStream *stream)=0
Stop the given audio track from playing.
Pointer to a const LiveCellRef.
Definition: ptr.hpp:90
virtual float getSaySoundLoudness(const MWWorld::ConstPtr &reference) const =0
virtual bool getSoundPlaying(const MWWorld::ConstPtr &reference, const std::string &soundId) const =0
MWSound::PlayMode PlayMode
Definition: soundmanager.hpp:69
Interface for sound manager (implemented in MWSound)
Definition: soundmanager.hpp:60
virtual void fadeOutSound3D(const MWWorld::ConstPtr &reference, const std::string &soundId, float duration)=0
virtual ~SoundManager()
Definition: soundmanager.hpp:74
virtual void stopSound3D(const MWWorld::ConstPtr &reference, const std::string &soundId)=0
Stop the given object from playing the given sound,.
virtual void pauseSounds(int types=static_cast< int >(Type::Mask))=0
Pauses all currently playing sounds, including music.
virtual void stopSay(const MWWorld::ConstPtr &reference=MWWorld::ConstPtr())=0
Stop an actor speaking.
SoundManager()
Definition: soundmanager.hpp:73
std::shared_ptr< Sound_Decoder > DecoderPtr
Definition: soundmanager.hpp:19
Mask
Definition: mask.hpp:11
Definition: sound_decoder.hpp:33
virtual SoundStream * playTrack(const MWSound::DecoderPtr &decoder, Type type)=0
Type
Definition: soundmanager.hpp:39
Definition: sound.hpp:104