From 03378679c6e7b5833ddca59d9aacc22a22f7654c Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 25 Oct 2017 23:54:03 +0300 Subject: Add sdlmusichelper with some SDL/SDL2 functions. --- src/soundmanager.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/soundmanager.cpp') 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"); } -- cgit v1.2.3-60-g2f50