Minetest  5.4.0
ISoundManager Class Referenceabstract

#include <sound.h>

+ Inheritance diagram for ISoundManager:

Public Member Functions

virtual ~ISoundManager ()=default
 
virtual bool loadSoundFile (const std::string &name, const std::string &filepath)=0
 
virtual bool loadSoundData (const std::string &name, const std::string &filedata)=0
 
virtual void updateListener (const v3f &pos, const v3f &vel, const v3f &at, const v3f &up)=0
 
virtual void setListenerGain (float gain)=0
 
virtual int playSound (const std::string &name, bool loop, float volume, float fade=0.0f, float pitch=1.0f)=0
 
virtual int playSoundAt (const std::string &name, bool loop, float volume, v3f pos, float pitch=1.0f)=0
 
virtual void stopSound (int sound)=0
 
virtual bool soundExists (int sound)=0
 
virtual void updateSoundPosition (int sound, v3f pos)=0
 
virtual bool updateSoundGain (int id, float gain)=0
 
virtual float getSoundGain (int id)=0
 
virtual void step (float dtime)=0
 
virtual void fadeSound (int sound, float step, float gain)=0
 
int playSound (const SimpleSoundSpec &spec, bool loop)
 
int playSoundAt (const SimpleSoundSpec &spec, bool loop, const v3f &pos)
 

Constructor & Destructor Documentation

◆ ~ISoundManager()

virtual ISoundManager::~ISoundManager ( )
virtualdefault

Member Function Documentation

◆ fadeSound()

virtual void ISoundManager::fadeSound ( int  sound,
float  step,
float  gain 
)
pure virtual

Implemented in OpenALSoundManager, and DummySoundManager.

Referenced by Client::handleCommand_FadeSound(), and ModApiClient::l_sound_fade().

+ Here is the caller graph for this function:

◆ getSoundGain()

virtual float ISoundManager::getSoundGain ( int  id)
pure virtual

Implemented in OpenALSoundManager, and DummySoundManager.

◆ loadSoundData()

virtual bool ISoundManager::loadSoundData ( const std::string &  name,
const std::string &  filedata 
)
pure virtual

Implemented in OpenALSoundManager, and DummySoundManager.

Referenced by Client::loadMedia().

+ Here is the caller graph for this function:

◆ loadSoundFile()

virtual bool ISoundManager::loadSoundFile ( const std::string &  name,
const std::string &  filepath 
)
pure virtual

Implemented in OpenALSoundManager, and DummySoundManager.

◆ playSound() [1/2]

int ISoundManager::playSound ( const SimpleSoundSpec spec,
bool  loop 
)
inline

References SimpleSoundSpec::fade, SimpleSoundSpec::gain, SimpleSoundSpec::name, SimpleSoundSpec::pitch, and playSound().

+ Here is the call graph for this function:

◆ playSound() [2/2]

virtual int ISoundManager::playSound ( const std::string &  name,
bool  loop,
float  volume,
float  fade = 0.0f,
float  pitch = 1.0f 
)
pure virtual

◆ playSoundAt() [1/2]

int ISoundManager::playSoundAt ( const SimpleSoundSpec spec,
bool  loop,
const v3f pos 
)
inline

References SimpleSoundSpec::gain, SimpleSoundSpec::name, SimpleSoundSpec::pitch, and playSoundAt().

+ Here is the call graph for this function:

◆ playSoundAt() [2/2]

virtual int ISoundManager::playSoundAt ( const std::string &  name,
bool  loop,
float  volume,
v3f  pos,
float  pitch = 1.0f 
)
pure virtual

Implemented in OpenALSoundManager, and DummySoundManager.

Referenced by Client::handleCommand_PlaySound(), ModApiClient::l_sound_play(), playSoundAt(), and GenericCAO::step().

+ Here is the caller graph for this function:

◆ setListenerGain()

virtual void ISoundManager::setListenerGain ( float  gain)
pure virtual

Implemented in OpenALSoundManager, and DummySoundManager.

Referenced by Game::updateSound().

+ Here is the caller graph for this function:

◆ soundExists()

virtual bool ISoundManager::soundExists ( int  sound)
pure virtual

Implemented in OpenALSoundManager, and DummySoundManager.

Referenced by Client::step().

+ Here is the caller graph for this function:

◆ step()

virtual void ISoundManager::step ( float  dtime)
pure virtual

Implemented in OpenALSoundManager, and DummySoundManager.

Referenced by Client::step().

+ Here is the caller graph for this function:

◆ stopSound()

virtual void ISoundManager::stopSound ( int  sound)
pure virtual

Implemented in OpenALSoundManager, and DummySoundManager.

Referenced by Client::handleCommand_StopSound(), ModApiClient::l_sound_stop(), and GUIEngine::stopSound().

+ Here is the caller graph for this function:

◆ updateListener()

virtual void ISoundManager::updateListener ( const v3f pos,
const v3f vel,
const v3f at,
const v3f up 
)
pure virtual

Implemented in OpenALSoundManager, and DummySoundManager.

Referenced by Game::updateSound().

+ Here is the caller graph for this function:

◆ updateSoundGain()

virtual bool ISoundManager::updateSoundGain ( int  id,
float  gain 
)
pure virtual

Implemented in OpenALSoundManager, and DummySoundManager.

◆ updateSoundPosition()

virtual void ISoundManager::updateSoundPosition ( int  sound,
v3f  pos 
)
pure virtual

Implemented in DummySoundManager, and OpenALSoundManager.

Referenced by Client::step().

+ Here is the caller graph for this function:

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