summaryrefslogtreecommitdiff
path: root/src/sound_openal.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2012-03-24 03:28:08 +0200
committerPerttu Ahola <celeron55@gmail.com>2012-03-24 04:24:26 +0200
commit93219e3b9d2eae11a447556dfe837706baeff22a (patch)
tree73b26a9e1bae4375d3c966ac037a3d2602f225ad /src/sound_openal.cpp
parent77120a021df955947841f9646cb61d67a272618b (diff)
downloadminetest-93219e3b9d2eae11a447556dfe837706baeff22a.tar.gz
minetest-93219e3b9d2eae11a447556dfe837706baeff22a.tar.bz2
minetest-93219e3b9d2eae11a447556dfe837706baeff22a.zip
Add sounds, tune things
Diffstat (limited to 'src/sound_openal.cpp')
-rw-r--r--src/sound_openal.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sound_openal.cpp b/src/sound_openal.cpp
index 4f056888b..edcb9e8d4 100644
--- a/src/sound_openal.cpp
+++ b/src/sound_openal.cpp
@@ -454,6 +454,8 @@ public:
int playSound(const std::string &name, bool loop, float volume)
{
maintain();
+ if(name == "")
+ return 0;
SoundBuffer *buf = getFetchBuffer(name);
if(!buf){
infostream<<"OpenALSoundManager: \""<<name<<"\" not found."
@@ -465,6 +467,8 @@ public:
int playSoundAt(const std::string &name, bool loop, float volume, v3f pos)
{
maintain();
+ if(name == "")
+ return 0;
SoundBuffer *buf = getFetchBuffer(name);
if(!buf){
infostream<<"OpenALSoundManager: \""<<name<<"\" not found."