summaryrefslogtreecommitdiff
path: root/src/soundmanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-10-25 23:54:03 +0300
committerAndrei Karas <akaras@inbox.ru>2017-10-25 23:54:03 +0300
commit03378679c6e7b5833ddca59d9aacc22a22f7654c (patch)
treefd3849e22cc1a6fc3e8858a0e530122a94ddd281 /src/soundmanager.cpp
parentc1090f81650347ef03a1d50783f8b77b02646f9e (diff)
downloadplus-03378679c6e7b5833ddca59d9aacc22a22f7654c.tar.gz
plus-03378679c6e7b5833ddca59d9aacc22a22f7654c.tar.bz2
plus-03378679c6e7b5833ddca59d9aacc22a22f7654c.tar.xz
plus-03378679c6e7b5833ddca59d9aacc22a22f7654c.zip
Add sdlmusichelper with some SDL/SDL2 functions.
Diffstat (limited to 'src/soundmanager.cpp')
-rw-r--r--src/soundmanager.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/soundmanager.cpp b/src/soundmanager.cpp
index d08b58c1f..5a9ddb333 100644
--- a/src/soundmanager.cpp
+++ b/src/soundmanager.cpp
@@ -42,6 +42,7 @@
#include "utils/cast.h"
#endif
#include "utils/checkutils.h"
+#include "utils/sdlmusichelper.h"
PRAGMA48(GCC diagnostic push)
PRAGMA48(GCC diagnostic ignored "-Wshadow")
@@ -168,14 +169,14 @@ void SoundManager::init()
break;
}
- const int res = Mix_OpenAudio(config.getIntValue("audioFrequency"),
+ const int res = SDL::MixOpenAudio(config.getIntValue("audioFrequency"),
MIX_DEFAULT_FORMAT, channels, audioBuffer);
if (res < 0)
{
logger->log("SoundManager::init Could not initialize audio: %s",
SDL_GetError());
- if (Mix_OpenAudio(22010, MIX_DEFAULT_FORMAT, 2, audioBuffer) < 0)
+ if (SDL::MixOpenAudio(22010, MIX_DEFAULT_FORMAT, 2, audioBuffer) < 0)
return;
logger->log("Fallback to stereo audio");
}