|
OpenMW
|
#include <soundmanagerimp.hpp>
Public Member Functions | |
| SoundManager (const VFS::Manager *vfs, const std::map< std::string, std::string > &fallbackMap, bool useSound) | |
| virtual | ~SoundManager () |
| virtual void | processChangedSettings (const Settings::CategorySettingVector &settings) |
| virtual void | stopMusic () |
| Stops music if it's playing. More... | |
| virtual void | streamMusic (const std::string &filename) |
| virtual bool | isMusicPlaying () |
| Returns true if music is playing. More... | |
| virtual void | playPlaylist (const std::string &playlist) |
| virtual void | say (const MWWorld::ConstPtr &reference, const std::string &filename) |
| virtual void | say (const std::string &filename) |
| virtual bool | sayDone (const MWWorld::ConstPtr &reference=MWWorld::ConstPtr()) const |
| Is actor not speaking? More... | |
| virtual void | stopSay (const MWWorld::ConstPtr &reference=MWWorld::ConstPtr()) |
| Stop an actor speaking. More... | |
| virtual float | getSaySoundLoudness (const MWWorld::ConstPtr &reference) const |
| virtual Stream * | playTrack (const DecoderPtr &decoder, Type type) |
| Play a 2D audio track, using a custom decoder. More... | |
| virtual void | stopTrack (Stream *stream) |
| Stop the given audio track from playing. More... | |
| virtual double | getTrackTimeDelay (Stream *stream) |
| virtual Sound * | playSound (const std::string &soundId, float volume, float pitch, Type type=Type::Sfx, PlayMode mode=PlayMode::Normal, float offset=0) |
| 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) |
| virtual Sound * | playSound3D (const osg::Vec3f &initialPos, const std::string &soundId, float volume, float pitch, Type type, PlayMode mode, float offset=0) |
| virtual void | stopSound (Sound *sound) |
| virtual void | stopSound3D (const MWWorld::ConstPtr &reference, const std::string &soundId) |
| Stop the given object from playing the given sound,. More... | |
| virtual void | stopSound3D (const MWWorld::ConstPtr &reference) |
| Stop the given object from playing all sounds. More... | |
| virtual void | stopSound (const MWWorld::CellStore *cell) |
| Stop all sounds for the given cell. More... | |
| virtual void | stopSound (const std::string &soundId) |
| Stop a non-3d looping sound. More... | |
| virtual void | fadeOutSound3D (const MWWorld::ConstPtr &reference, const std::string &soundId, float duration) |
| virtual bool | getSoundPlaying (const MWWorld::ConstPtr &reference, const std::string &soundId) const |
| Is the given sound currently playing on the given object? More... | |
| virtual void | pauseSounds (int types) |
| Pauses all currently playing sounds, including music. More... | |
| virtual void | resumeSounds (int types) |
| Resumes all previously paused sounds. More... | |
| virtual void | update (float duration) |
| virtual void | setListenerPosDir (const osg::Vec3f &pos, const osg::Vec3f &dir, const osg::Vec3f &up, bool underwater) |
| virtual void | updatePtr (const MWWorld::ConstPtr &old, const MWWorld::ConstPtr &updated) |
| virtual void | clear () |
Public Member Functions inherited from MWBase::SoundManager | |
| SoundManager () | |
| virtual void | processChangedSettings (const std::set< std::pair< std::string, std::string > > &settings)=0 |
Protected Member Functions | |
| DecoderPtr | getDecoder () |
| void | stopSound (Sound_Buffer *sfx, const MWWorld::ConstPtr &ptr) |
| Stop the given object from playing given sound buffer. More... | |
Private Types | |
| typedef std::unique_ptr < std::deque< Sound_Buffer > > | SoundBufferList |
| typedef std::unordered_map < std::string, Sound_Buffer * > | NameBufferMap |
| typedef std::deque < Sound_Buffer * > | SoundList |
| typedef std::pair < MWBase::Sound *, Sound_Buffer * > | SoundBufferRefPair |
| typedef std::vector < SoundBufferRefPair > | SoundBufferRefPairList |
| typedef std::map < MWWorld::ConstPtr, SoundBufferRefPairList > | SoundMap |
| typedef std::map < MWWorld::ConstPtr, Stream * > | SaySoundMap |
| typedef std::vector< Stream * > | TrackList |
Private Member Functions | |
| Sound_Buffer * | insertSound (const std::string &soundId, const ESM::Sound *sound) |
| Sound_Buffer * | lookupSound (const std::string &soundId) const |
| Sound_Buffer * | loadSound (const std::string &soundId) |
| DecoderPtr | loadVoice (const std::string &voicefile) |
| Sound * | getSoundRef () |
| Stream * | getStreamRef () |
| Stream * | playVoice (DecoderPtr decoder, const osg::Vec3f &pos, bool playlocal) |
| void | streamMusicFull (const std::string &filename) |
| void | advanceMusic (const std::string &filename) |
| void | startRandomTitle () |
| void | updateSounds (float duration) |
| void | updateRegionSound (float duration) |
| void | updateWaterSound (float duration) |
| void | updateMusic (float duration) |
| float | volumeFromType (Type type) const |
| SoundManager (const SoundManager &rhs) | |
| SoundManager & | operator= (const SoundManager &rhs) |
Friends | |
| class | OpenAL_Output |
Additional Inherited Members | |
Protected Types inherited from MWBase::SoundManager | |
| using | PlayMode = MWSound::PlayMode |
| using | Type = MWSound::Type |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
| MWSound::SoundManager::SoundManager | ( | const VFS::Manager * | vfs, |
| const std::map< std::string, std::string > & | fallbackMap, | ||
| bool | useSound | ||
| ) |
|
virtual |
|
private |
|
virtual |
Implements MWBase::SoundManager.
|
virtual |
Fade out given sound (that is already playing) of given object
| reference | Reference to object, whose sound is faded out |
| soundId | ID of the sound to fade out. |
| duration | Time until volume reaches 0. |
Implements MWBase::SoundManager.
|
protected |
|
virtual |
Check the currently playing say sound for this actor and get an average loudness value (scale [0,1]) at the current time position. If the actor is not saying anything, returns 0.
Implements MWBase::SoundManager.
|
virtual |
Is the given sound currently playing on the given object?
Implements MWBase::SoundManager.
|
private |
|
private |
|
virtual |
Retives the time delay, in seconds, of the audio track (must be a sound returned by playTrack). Only intended to be called by the track decoder's read method.
Implements MWBase::SoundManager.
|
private |
|
virtual |
Returns true if music is playing.
Implements MWBase::SoundManager.
|
private |
|
private |
|
private |
|
private |
|
virtual |
Pauses all currently playing sounds, including music.
Implements MWBase::SoundManager.
|
virtual |
Start playing music from the selected folder
| name | of the folder that contains the playlist |
Implements MWBase::SoundManager.
|
virtual |
Play a sound, independently of 3D-position
| offset | Number of seconds into the sound to start playback. |
Implements MWBase::SoundManager.
|
virtual |
Play a 3D sound attached to an MWWorld::Ptr. Will be updated automatically with the Ptr's position, unless Play_NoTrack is specified.
| offset | Number of seconds into the sound to start playback. |
Implements MWBase::SoundManager.
|
virtual |
Play a 3D sound at initialPos. If the sound should be moving, it must be updated using Sound::setPosition.
| offset | Number of seconds into the sound to start playback. |
Implements MWBase::SoundManager.
|
virtual |
Play a 2D audio track, using a custom decoder.
Implements MWBase::SoundManager.
|
private |
|
virtual |
|
virtual |
Resumes all previously paused sounds.
Implements MWBase::SoundManager.
|
virtual |
Make an actor say some text.
| filename | name of a sound file in "Sound/" in the data directory. |
Implements MWBase::SoundManager.
|
virtual |
Say some text, without an actor ref
| filename | name of a sound file in "Sound/" in the data directory. |
Implements MWBase::SoundManager.
|
virtual |
Is actor not speaking?
Implements MWBase::SoundManager.
|
virtual |
Implements MWBase::SoundManager.
|
private |
|
virtual |
Stops music if it's playing.
Implements MWBase::SoundManager.
|
virtual |
Stop an actor speaking.
Implements MWBase::SoundManager.
|
protected |
Stop the given object from playing given sound buffer.
|
virtual |
|
virtual |
Stop all sounds for the given cell.
Implements MWBase::SoundManager.
|
virtual |
Stop a non-3d looping sound.
Implements MWBase::SoundManager.
|
virtual |
Stop the given object from playing the given sound,.
Implements MWBase::SoundManager.
|
virtual |
Stop the given object from playing all sounds.
Implements MWBase::SoundManager.
|
virtual |
Stop the given audio track from playing.
Implements MWBase::SoundManager.
|
virtual |
Play a soundifle
| filename | name of a sound file in "Music/" in the data directory. |
Implements MWBase::SoundManager.
|
private |
|
virtual |
|
private |
|
virtual |
Implements MWBase::SoundManager.
|
private |
|
private |
|
private |
|
private |
|
friend |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
1.8.6