summaryrefslogtreecommitdiff
path: root/src/sound.h
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2012-04-06 15:30:36 +0300
committerPerttu Ahola <celeron55@gmail.com>2012-04-06 15:30:36 +0300
commit6a57eabb145e5000427e38ab0c8d3bb435b2c596 (patch)
treefb67244b0e56cc4de092f5301da68d9a91ef6792 /src/sound.h
parenta67540807a051c39d79203832383e8fc8829b5d6 (diff)
downloadminetest-6a57eabb145e5000427e38ab0c8d3bb435b2c596.tar.gz
minetest-6a57eabb145e5000427e38ab0c8d3bb435b2c596.tar.bz2
minetest-6a57eabb145e5000427e38ab0c8d3bb435b2c596.zip
Handle failing openal init properly, add enable_sound and sound_volume settings
Diffstat (limited to 'src/sound.h')
-rw-r--r--src/sound.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/sound.h b/src/sound.h
index c342f4e5e..c267a452f 100644
--- a/src/sound.h
+++ b/src/sound.h
@@ -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,