|
XPMP2
X-Plane multiplayer library 2 - using instancing
|
Base class for sound systems, practically empty. More...
#include <Sound.h>
Inheritance diagram for XPMP2::SoundSystem:Public Member Functions | |
| SoundSystem () | |
| Construtor. More... | |
| virtual | ~SoundSystem () |
| Destructor. More... | |
| virtual bool | LoadSoundFile (const std::string &_sndName, const std::string &_filePath, bool _bLoop, float _coneDir, float _conePitch, float _coneInAngle, float _coneOutAngle, float _coneOutVol)=0 |
| Loads a sound file so it becomes ready to play. More... | |
| const char * | EnumerateSounds (const char *prevName, const char **ppFilePath) |
| Enumerate all loaded sounds. More... | |
| virtual uint64_t | Play (const std::string &sndName, float vol, const Aircraft &ac)=0 |
| Play a new sound, returns an id for that sound. More... | |
| virtual void | Unpause (uint64_t sndId)=0 |
| Unpause a sound, which got started in a paused state to avoid crackling. More... | |
| virtual void | Stop (uint64_t sndId)=0 |
| Stop the sound. More... | |
| virtual void | SetPosOrientation (uint64_t sndId, const Aircraft &ac, bool bDoOrientation)=0 |
| Update sound's position and orientation. More... | |
| virtual void | SetVolume (uint64_t sndId, float vol)=0 |
| Set sound's volume. More... | |
| virtual void | SetMute (uint64_t sndId, bool bMute)=0 |
| Mute the sound (temporarily) More... | |
| virtual void | Update ()=0 |
| Any updates to be done at the end of the frame. More... | |
| virtual void | SetMasterVolume (float volMaster)=0 |
| Set Master Volume, effectively a multiplicator to SetVolume() More... | |
| virtual void | SetAllMute (bool bMute)=0 |
| Mute all sounds (temporarily) More... | |
| virtual bool | IsValid (uint64_t sndId) |
| Is the sound id available? More... | |
Protected Member Functions | |
| std::pair< uint64_t, SoundChannel * > | AddChn (SoundFile *pSnd, float vol, FMOD_CHANNEL *pChn=nullptr) |
| Add one more channel, returning the newly created id. More... | |
| SoundChannel * | GetChn (uint64_t sndId) |
Return the SoundChannel object for a given id, or nullptr if not found. More... | |
| void | RemoveChn (uint64_t sndId) |
| Remove a channel from out tracking. More... | |
Protected Attributes | |
| mapSoundPtrTy | mapSounds |
| Map of all sounds, indexed by a sound name (type) More... | |
| std::map< uint64_t, SoundChannel > | mapChn |
| Keeps track of currently playing sounds, their key serving as id. More... | |
Base class for sound systems, practically empty.
|
inline |
Construtor.
|
inlinevirtual |
Destructor.
|
protected |
Add one more channel, returning the newly created id.
| const char * XPMP2::SoundSystem::EnumerateSounds | ( | const char * | prevName, |
| const char ** | ppFilePath | ||
| ) |
Enumerate all loaded sounds.
|
protected |
Return the SoundChannel object for a given id, or nullptr if not found.
|
virtual |
Is the sound id available?
Reimplemented in XPMP2::SoundSystemFMOD.
|
pure virtual |
Loads a sound file so it becomes ready to play.
Implemented in XPMP2::SoundSystemFMOD, and XPMP2::SoundSystemXP.
|
pure virtual |
Play a new sound, returns an id for that sound.
Implemented in XPMP2::SoundSystemFMOD, and XPMP2::SoundSystemXP.
|
protected |
Remove a channel from out tracking.
|
pure virtual |
Mute all sounds (temporarily)
Implemented in XPMP2::SoundSystemFMOD, and XPMP2::SoundSystemXP.
|
pure virtual |
Set Master Volume, effectively a multiplicator to SetVolume()
Implemented in XPMP2::SoundSystemFMOD, and XPMP2::SoundSystemXP.
|
pure virtual |
Mute the sound (temporarily)
Implemented in XPMP2::SoundSystemFMOD, and XPMP2::SoundSystemXP.
|
pure virtual |
Update sound's position and orientation.
Implemented in XPMP2::SoundSystemFMOD, and XPMP2::SoundSystemXP.
|
pure virtual |
Set sound's volume.
Implemented in XPMP2::SoundSystemFMOD, and XPMP2::SoundSystemXP.
|
pure virtual |
Stop the sound.
Implemented in XPMP2::SoundSystemFMOD, and XPMP2::SoundSystemXP.
|
pure virtual |
Unpause a sound, which got started in a paused state to avoid crackling.
Implemented in XPMP2::SoundSystemFMOD, and XPMP2::SoundSystemXP.
|
pure virtual |
Any updates to be done at the end of the frame.
Implemented in XPMP2::SoundSystemFMOD, and XPMP2::SoundSystemXP.
|
protected |
Keeps track of currently playing sounds, their key serving as id.
|
protected |
Map of all sounds, indexed by a sound name (type)