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
1 changed files with 5 additions and 1 deletions

View File

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