1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Lua API for playing sounds

This commit is contained in:
Perttu Ahola 2012-03-24 19:01:26 +02:00
parent 06e93f8d95
commit 601d1936c9
11 changed files with 533 additions and 21 deletions

View file

@ -67,6 +67,8 @@ public:
virtual int playSoundAt(const std::string &name, bool loop,
float volume, v3f pos) = 0;
virtual void stopSound(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); }
@ -87,6 +89,8 @@ public:
int playSoundAt(const std::string &name, bool loop,
float volume, v3f pos) {return 0;}
void stopSound(int sound) {}
bool soundExists(int sound) {return false;}
void updateSoundPosition(int sound, v3f pos) {}
};
// Global DummySoundManager singleton