1
0
mirror of https://github.com/minetest/minetest.git synced 2025-07-04 08:50:22 +02:00

Update sound.h

This commit is contained in:
Ian Giestas Pauli
2017-01-27 22:24:32 -02:00
committed by GitHub
parent b57bc59c94
commit 2aab9be249

View File

@ -67,11 +67,14 @@ public:
virtual int playSoundAt(const std::string &name, bool loop, virtual int playSoundAt(const std::string &name, bool loop,
float volume, v3f pos) = 0; float volume, v3f pos) = 0;
virtual void stopSound(int sound) = 0; virtual void stopSound(int sound) = 0;
virtual void resumeSound(int sound) = 0;
virtual void pauseSound(int sound) = 0;
virtual bool soundExists(int sound) = 0; virtual bool soundExists(int sound) = 0;
virtual void updateSoundPosition(int sound, v3f pos) = 0; virtual void updateSoundPosition(int sound, v3f pos) = 0;
int playSound(const SimpleSoundSpec &spec, bool loop) int playSound(const SimpleSoundSpec &spec, bool loop)
{ return playSound(spec.name, loop, spec.gain); } { return playSound(spec.name, loop, spec.gain); }
int playSoundAt(const SimpleSoundSpec &spec, bool loop, v3f pos) int playSoundAt(const SimpleSoundSpec &spec, bool loop, v3f pos)
{ return playSoundAt(spec.name, loop, spec.gain, pos); } { return playSoundAt(spec.name, loop, spec.gain, pos); }
}; };
@ -90,6 +93,8 @@ public:
int playSoundAt(const std::string &name, bool loop, int playSoundAt(const std::string &name, bool loop,
float volume, v3f pos) {return 0;} float volume, v3f pos) {return 0;}
void stopSound(int sound) {} void stopSound(int sound) {}
void resumeSound(int sound) {}
void pauseSound(int sound) {}
bool soundExists(int sound) {return false;} bool soundExists(int sound) {return false;}
void updateSoundPosition(int sound, v3f pos) {} void updateSoundPosition(int sound, v3f pos) {}
}; };
@ -98,4 +103,3 @@ public:
extern DummySoundManager dummySoundManager; extern DummySoundManager dummySoundManager;
#endif #endif