mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-12 16:15:20 +02:00
Lua API for playing sounds
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user