OpenMW
Public Types | Public Member Functions | Private Member Functions
MWBase::SoundManager Class Reference

Interface for sound manager (implemented in MWSound) More...

#include <soundmanager.hpp>

List of all members.

Public Types

enum  PlayMode {
  Play_Normal = 0, Play_Loop = 1<<0, Play_NoEnv = 1<<1, Play_NoTrack = 1<<2,
  Play_LoopNoEnv = Play_Loop | Play_NoEnv
}
enum  PlayType {
  Play_TypeSfx = 1<<3, Play_TypeVoice = 1<<4, Play_TypeFoot = 1<<5, Play_TypeMusic = 1<<6,
  Play_TypeMovie = 1<<7, Play_TypeMask = Play_TypeSfx|Play_TypeVoice|Play_TypeFoot|Play_TypeMusic|Play_TypeMovie
}

Public Member Functions

 SoundManager ()
virtual ~SoundManager ()
virtual void processChangedSettings (const Settings::CategorySettingVector &settings)=0
virtual void stopMusic ()=0
 Stops music if it's playing.
virtual void streamMusic (const std::string &filename)=0
virtual void startRandomTitle ()=0
 Starts a random track from the current playlist.
virtual bool isMusicPlaying ()=0
 Returns true if music is playing.
virtual void playPlaylist (const std::string &playlist)=0
virtual void say (const MWWorld::Ptr &reference, const std::string &filename)=0
virtual void say (const std::string &filename)=0
virtual bool sayDone (const MWWorld::Ptr &reference=MWWorld::Ptr()) const =0
 Is actor not speaking?
virtual void stopSay (const MWWorld::Ptr &reference=MWWorld::Ptr())=0
 Stop an actor speaking.
virtual SoundPtr playTrack (const MWSound::DecoderPtr &decoder, PlayType type)=0
 Play a 2D audio track, using a custom decoder.
virtual SoundPtr playSound (const std::string &soundId, float volume, float pitch, PlayType type=Play_TypeSfx, PlayMode mode=Play_Normal, float offset=0)=0
virtual SoundPtr playSound3D (const MWWorld::Ptr &reference, const std::string &soundId, float volume, float pitch, PlayType type=Play_TypeSfx, PlayMode mode=Play_Normal, float offset=0)=0
virtual void stopSound3D (const MWWorld::Ptr &reference, const std::string &soundId)=0
 Stop the given object from playing the given sound,.
virtual void stopSound3D (const MWWorld::Ptr &reference)=0
 Stop the given object from playing all sounds.
virtual void stopSound (const MWWorld::CellStore *cell)=0
 Stop all sounds for the given cell.
virtual void stopSound (const std::string &soundId)=0
 Stop a non-3d looping sound.
virtual void fadeOutSound3D (const MWWorld::Ptr &reference, const std::string &soundId, float duration)=0
virtual bool getSoundPlaying (const MWWorld::Ptr &reference, const std::string &soundId) const =0
virtual void pauseSounds (int types=Play_TypeMask)=0
 Pauses all currently playing sounds, including music.
virtual void resumeSounds (int types=Play_TypeMask)=0
 Resumes all previously paused sounds.
virtual void update (float duration)=0
virtual void setListenerPosDir (const Ogre::Vector3 &pos, const Ogre::Vector3 &dir, const Ogre::Vector3 &up)=0

Private Member Functions

 SoundManager (const SoundManager &)
 not implemented
SoundManageroperator= (const SoundManager &)
 not implemented

Detailed Description

Interface for sound manager (implemented in MWSound)


Member Enumeration Documentation

Enumerator:
Play_Normal 
Play_Loop 
Play_NoEnv 
Play_NoTrack 
Play_LoopNoEnv 
Enumerator:
Play_TypeSfx 
Play_TypeVoice 
Play_TypeFoot 
Play_TypeMusic 
Play_TypeMovie 
Play_TypeMask 

Constructor & Destructor Documentation

not implemented

virtual MWBase::SoundManager::~SoundManager ( ) [inline, virtual]

Reimplemented in MWSound::SoundManager.


Member Function Documentation

virtual void MWBase::SoundManager::fadeOutSound3D ( const MWWorld::Ptr reference,
const std::string &  soundId,
float  duration 
) [pure virtual]

Fade out given sound (that is already playing) of given object

Parameters:
referenceReference to object, whose sound is faded out
soundIdID of the sound to fade out.
durationTime until volume reaches 0.

Implemented in MWSound::SoundManager.

virtual bool MWBase::SoundManager::getSoundPlaying ( const MWWorld::Ptr reference,
const std::string &  soundId 
) const [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.

virtual bool MWBase::SoundManager::isMusicPlaying ( ) [pure virtual]

Returns true if music is playing.

Implemented in MWSound::SoundManager.

SoundManager& MWBase::SoundManager::operator= ( const SoundManager ) [private]

not implemented

virtual void MWBase::SoundManager::pauseSounds ( int  types = Play_TypeMask) [pure virtual]

Pauses all currently playing sounds, including music.

Implemented in MWSound::SoundManager.

virtual void MWBase::SoundManager::playPlaylist ( const std::string &  playlist) [pure virtual]

Start playing music from the selected folder

Parameters:
nameof the folder that contains the playlist

Implemented in MWSound::SoundManager.

virtual SoundPtr MWBase::SoundManager::playSound ( const std::string &  soundId,
float  volume,
float  pitch,
PlayType  type = Play_TypeSfx,
PlayMode  mode = Play_Normal,
float  offset = 0 
) [pure virtual]

Play a sound, independently of 3D-position

Parameters:
offsetValue from [0,1] meaning from which fraction the sound the playback starts.

Implemented in MWSound::SoundManager.

virtual SoundPtr MWBase::SoundManager::playSound3D ( const MWWorld::Ptr reference,
const std::string &  soundId,
float  volume,
float  pitch,
PlayType  type = Play_TypeSfx,
PlayMode  mode = Play_Normal,
float  offset = 0 
) [pure virtual]

Play a sound from an object

Parameters:
offsetValue from [0,1] meaning from which fraction the sound the playback starts.

Implemented in MWSound::SoundManager.

virtual SoundPtr MWBase::SoundManager::playTrack ( const MWSound::DecoderPtr decoder,
PlayType  type 
) [pure virtual]

Play a 2D audio track, using a custom decoder.

Implemented in MWSound::SoundManager.

virtual void MWBase::SoundManager::processChangedSettings ( const Settings::CategorySettingVector settings) [pure virtual]

Implemented in MWSound::SoundManager.

virtual void MWBase::SoundManager::resumeSounds ( int  types = Play_TypeMask) [pure virtual]

Resumes all previously paused sounds.

Implemented in MWSound::SoundManager.

virtual void MWBase::SoundManager::say ( const MWWorld::Ptr reference,
const std::string &  filename 
) [pure virtual]

Make an actor say some text.

Parameters:
filenamename of a sound file in "Sound/" in the data directory.

Implemented in MWSound::SoundManager.

virtual void MWBase::SoundManager::say ( const std::string &  filename) [pure virtual]

Say some text, without an actor ref

Parameters:
filenamename of a sound file in "Sound/" in the data directory.

Implemented in MWSound::SoundManager.

virtual bool MWBase::SoundManager::sayDone ( const MWWorld::Ptr reference = MWWorld::Ptr()) const [pure virtual]

Is actor not speaking?

Implemented in MWSound::SoundManager.

virtual void MWBase::SoundManager::setListenerPosDir ( const Ogre::Vector3 &  pos,
const Ogre::Vector3 &  dir,
const Ogre::Vector3 &  up 
) [pure virtual]

Implemented in MWSound::SoundManager.

virtual void MWBase::SoundManager::startRandomTitle ( ) [pure virtual]

Starts a random track from the current playlist.

Implemented in MWSound::SoundManager.

virtual void MWBase::SoundManager::stopMusic ( ) [pure virtual]

Stops music if it's playing.

Implemented in MWSound::SoundManager.

virtual void MWBase::SoundManager::stopSay ( const MWWorld::Ptr reference = MWWorld::Ptr()) [pure virtual]

Stop an actor speaking.

Implemented in MWSound::SoundManager.

virtual void MWBase::SoundManager::stopSound ( const MWWorld::CellStore cell) [pure virtual]

Stop all sounds for the given cell.

Implemented in MWSound::SoundManager.

virtual void MWBase::SoundManager::stopSound ( const std::string &  soundId) [pure virtual]

Stop a non-3d looping sound.

Implemented in MWSound::SoundManager.

virtual void MWBase::SoundManager::stopSound3D ( const MWWorld::Ptr reference,
const std::string &  soundId 
) [pure virtual]

Stop the given object from playing the given sound,.

Implemented in MWSound::SoundManager.

virtual void MWBase::SoundManager::stopSound3D ( const MWWorld::Ptr reference) [pure virtual]

Stop the given object from playing all sounds.

Implemented in MWSound::SoundManager.

virtual void MWBase::SoundManager::streamMusic ( const std::string &  filename) [pure virtual]

Play a soundifle

Parameters:
filenamename of a sound file in "Music/" in the data directory.

Implemented in MWSound::SoundManager.

virtual void MWBase::SoundManager::update ( float  duration) [pure virtual]

Implemented in MWSound::SoundManager.


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