summaryrefslogtreecommitdiff
path: root/src/sound.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-07-15 13:39:21 +0300
committerAndrei Karas <akaras@inbox.ru>2012-07-15 13:39:21 +0300
commite1e411459e9c9aae819eee474d48d0cc20f6ca07 (patch)
tree888635263691e73bfcb22d67618ef6c8e3eb931c /src/sound.cpp
parentd21513f3d6c7b5263ee50f1969d89293b2041b59 (diff)
downloadManaVerse-e1e411459e9c9aae819eee474d48d0cc20f6ca07.tar.gz
ManaVerse-e1e411459e9c9aae819eee474d48d0cc20f6ca07.tar.bz2
ManaVerse-e1e411459e9c9aae819eee474d48d0cc20f6ca07.tar.xz
ManaVerse-e1e411459e9c9aae819eee474d48d0cc20f6ca07.zip
Add fallback from unsupported audio modes to default 22011/stereo.
Diffstat (limited to 'src/sound.cpp')
-rw-r--r--src/sound.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/sound.cpp b/src/sound.cpp
index 8777625df..edabe6bf8 100644
--- a/src/sound.cpp
+++ b/src/sound.cpp
@@ -130,7 +130,9 @@ void Sound::init()
{
logger->log("Sound::init Could not initialize audio: %s",
Mix_GetError());
- return;
+ if (Mix_OpenAudio(22010, MIX_DEFAULT_FORMAT, 2, audioBuffer) < 0)
+ return;
+ logger->log("Fallback to stereo audio");
}
Mix_AllocateChannels(16);