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

Handle failing openal init properly, add enable_sound and sound_volume settings

This commit is contained in:
Perttu Ahola 2012-04-06 15:30:36 +03:00
parent a67540807a
commit 6a57eabb14
5 changed files with 31 additions and 6 deletions

View file

@ -58,6 +58,7 @@ public:
const std::string &filedata) = 0;
virtual void updateListener(v3f pos, v3f vel, v3f at, v3f up) = 0;
virtual void setListenerGain(float gain) = 0;
// playSound functions return -1 on failure, otherwise a handle to the
// sound. If name=="", call should be ignored without error.
@ -83,6 +84,7 @@ public:
virtual bool loadSoundData(const std::string &name,
const std::string &filedata) {return true;}
void updateListener(v3f pos, v3f vel, v3f at, v3f up) {}
void setListenerGain(float gain) {}
int playSound(const std::string &name, bool loop,
float volume) {return 0;}
int playSoundAt(const std::string &name, bool loop,