diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-07-15 13:39:21 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-07-15 13:39:21 +0300 |
commit | e1e411459e9c9aae819eee474d48d0cc20f6ca07 (patch) | |
tree | 888635263691e73bfcb22d67618ef6c8e3eb931c | |
parent | d21513f3d6c7b5263ee50f1969d89293b2041b59 (diff) | |
download | mv-e1e411459e9c9aae819eee474d48d0cc20f6ca07.tar.gz mv-e1e411459e9c9aae819eee474d48d0cc20f6ca07.tar.bz2 mv-e1e411459e9c9aae819eee474d48d0cc20f6ca07.tar.xz mv-e1e411459e9c9aae819eee474d48d0cc20f6ca07.zip |
Add fallback from unsupported audio modes to default 22011/stereo.
-rw-r--r-- | src/sound.cpp | 4 |
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); |