OpenMW
|
Interface for sound manager (implemented in MWSound) More...
#include <soundmanager.hpp>
Public Member Functions | |
SoundManager () | |
virtual | ~SoundManager () |
virtual void | processChangedSettings (const std::set< std::pair< std::string, std::string > > &settings)=0 |
virtual void | stopMusic ()=0 |
Stops music if it's playing. More... | |
virtual void | streamMusic (const std::string &filename)=0 |
virtual bool | isMusicPlaying ()=0 |
Returns true if music is playing. More... | |
virtual void | playPlaylist (const std::string &playlist)=0 |
virtual void | say (const MWWorld::ConstPtr &reference, const std::string &filename)=0 |
virtual void | say (const std::string &filename)=0 |
virtual bool | sayDone (const MWWorld::ConstPtr &reference=MWWorld::ConstPtr()) const =0 |
Is actor not speaking? More... | |
virtual void | stopSay (const MWWorld::ConstPtr &reference=MWWorld::ConstPtr())=0 |
Stop an actor speaking. More... | |
virtual float | getSaySoundLoudness (const MWWorld::ConstPtr &reference) const =0 |
virtual SoundStream * | playTrack (const MWSound::DecoderPtr &decoder, Type type)=0 |
virtual void | stopTrack (SoundStream *stream)=0 |
Stop the given audio track from playing. More... | |
virtual double | getTrackTimeDelay (SoundStream *stream)=0 |
virtual Sound * | playSound (const std::string &soundId, float volume, float pitch, Type type=Type::Sfx, PlayMode mode=PlayMode::Normal, float offset=0)=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)=0 |
virtual Sound * | playSound3D (const osg::Vec3f &initialPos, const std::string &soundId, float volume, float pitch, Type type=Type::Sfx, PlayMode mode=PlayMode::Normal, float offset=0)=0 |
Play a 3D sound at initialPos. If the sound should be moving, it must be updated using Sound::setPosition. More... | |
virtual void | stopSound (Sound *sound)=0 |
Stop the given sound from playing. More... | |
virtual void | stopSound3D (const MWWorld::ConstPtr &reference, const std::string &soundId)=0 |
Stop the given object from playing the given sound,. More... | |
virtual void | stopSound3D (const MWWorld::ConstPtr &reference)=0 |
Stop the given object from playing all sounds. More... | |
virtual void | stopSound (const MWWorld::CellStore *cell)=0 |
Stop all sounds for the given cell. More... | |
virtual void | stopSound (const std::string &soundId)=0 |
Stop a non-3d looping sound. More... | |
virtual void | fadeOutSound3D (const MWWorld::ConstPtr &reference, const std::string &soundId, float duration)=0 |
virtual bool | getSoundPlaying (const MWWorld::ConstPtr &reference, const std::string &soundId) const =0 |
virtual void | pauseSounds (int types=static_cast< int >(Type::Mask))=0 |
Pauses all currently playing sounds, including music. More... | |
virtual void | resumeSounds (int types=static_cast< int >(Type::Mask))=0 |
Resumes all previously paused sounds. More... | |
virtual void | update (float duration)=0 |
virtual void | setListenerPosDir (const osg::Vec3f &pos, const osg::Vec3f &dir, const osg::Vec3f &up, bool underwater)=0 |
virtual void | updatePtr (const MWWorld::ConstPtr &old, const MWWorld::ConstPtr &updated)=0 |
virtual void | clear ()=0 |
Protected Types | |
using | PlayMode = MWSound::PlayMode |
using | Type = MWSound::Type |
Private Member Functions | |
SoundManager (const SoundManager &) | |
not implemented More... | |
SoundManager & | operator= (const SoundManager &) |
not implemented More... | |
Interface for sound manager (implemented in MWSound)
|
protected |
|
protected |
|
private |
not implemented
|
inline |
|
inlinevirtual |
Reimplemented in MWSound::SoundManager.
|
pure virtual |
|
pure 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. |
Implemented in MWSound::SoundManager.
|
pure 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.
Implemented in MWSound::SoundManager.
|
pure virtual |
Is the given sound currently playing on the given object? If you want to check if sound played with playSound is playing, use empty Ptr
Implemented in MWSound::SoundManager.
|
pure 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.
Implemented in MWSound::SoundManager.
|
pure virtual |
Returns true if music is playing.
Implemented in MWSound::SoundManager.
|
private |
not implemented
|
pure virtual |
Pauses all currently playing sounds, including music.
Implemented in MWSound::SoundManager.
|
pure virtual |
Start playing music from the selected folder
name | of the folder that contains the playlist |
Implemented in MWSound::SoundManager.
|
pure virtual |
Play a sound, independently of 3D-position
offset | Number of seconds into the sound to start playback. |
Implemented in MWSound::SoundManager.
|
pure 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. |
Implemented in MWSound::SoundManager.
|
pure virtual |
Play a 3D sound at initialPos. If the sound should be moving, it must be updated using Sound::setPosition.
Implemented in MWSound::SoundManager.
|
pure virtual |
Play a 2D audio track, using a custom decoder. The caller is expected to call stopTrack with the returned handle when done.
Implemented in MWSound::SoundManager.
|
pure virtual |
|
pure virtual |
Resumes all previously paused sounds.
Implemented in MWSound::SoundManager.
|
pure virtual |
Make an actor say some text.
filename | name of a sound file in "Sound/" in the data directory. |
Implemented in MWSound::SoundManager.
|
pure virtual |
Say some text, without an actor ref
filename | name of a sound file in "Sound/" in the data directory. |
Implemented in MWSound::SoundManager.
|
pure virtual |
Is actor not speaking?
Implemented in MWSound::SoundManager.
|
pure virtual |
|
pure virtual |
Stops music if it's playing.
Implemented in MWSound::SoundManager.
|
pure virtual |
Stop an actor speaking.
Implemented in MWSound::SoundManager.
|
pure virtual |
Stop the given sound from playing.
Implemented in MWSound::SoundManager.
|
pure virtual |
Stop all sounds for the given cell.
Implemented in MWSound::SoundManager.
|
pure virtual |
Stop a non-3d looping sound.
Implemented in MWSound::SoundManager.
|
pure virtual |
Stop the given object from playing the given sound,.
Implemented in MWSound::SoundManager.
|
pure virtual |
Stop the given object from playing all sounds.
Implemented in MWSound::SoundManager.
|
pure virtual |
Stop the given audio track from playing.
Implemented in MWSound::SoundManager.
|
pure virtual |
Play a soundifle
filename | name of a sound file in "Music/" in the data directory. |
Implemented in MWSound::SoundManager.
|
pure virtual |
Implemented in MWSound::SoundManager.
|
pure virtual |