diff --git a/src/gui/qt/sound/sdlplayer.cpp b/src/gui/qt/sound/sdlplayer.cpp index d9e8dea5..c17d8f04 100644 --- a/src/gui/qt/sound/sdlplayer.cpp +++ b/src/gui/qt/sound/sdlplayer.cpp @@ -17,7 +17,7 @@ *****************************************************************************/ #include "sdlplayer.h" -#ifndef __ANDROID_API__ +#ifndef ANDROID #if (defined __APPLE__) #include #else @@ -28,11 +28,11 @@ using namespace std; SDLPlayer::SDLPlayer(ConfigFile *c) -#ifndef __ANDROID_API__ +#ifndef ANDROID : soundData(NULL), currentChannel(0) , audioEnabled(0), myConfig(c) #endif { -#ifndef __ANDROID_API__ +#ifndef ANDROID SDL_Init(SDL_INIT_AUDIO); initAudio(); @@ -43,7 +43,7 @@ SDLPlayer::SDLPlayer(ConfigFile *c) SDLPlayer::~SDLPlayer() { -#ifndef __ANDROID_API__ +#ifndef ANDROID closeAudio(); SDL_Quit(); #endif @@ -51,7 +51,7 @@ SDLPlayer::~SDLPlayer() void SDLPlayer::initAudio() { -#ifndef __ANDROID_API__ +#ifndef ANDROID if (!audioEnabled && myConfig->readConfigInt("PlaySoundEffects")) { int audio_rate = 44100; Uint16 audio_format = AUDIO_S16; /* 16-bit stereo */ @@ -69,7 +69,7 @@ void SDLPlayer::initAudio() void SDLPlayer::playSound(string audioString, int playerID) { -#ifndef __ANDROID_API__ +#ifndef ANDROID if(audioEnabled && myConfig->readConfigInt("PlaySoundEffects")) { QFile myFile(myAppDataPath + "sounds/default/" + QString::fromStdString(audioString)+".wav"); @@ -156,7 +156,7 @@ void SDLPlayer::playSound(string audioString, int playerID) void SDLPlayer::audioDone() { -#ifndef __ANDROID_API__ +#ifndef ANDROID if(audioEnabled) { Mix_HaltChannel(currentChannel); Mix_FreeChunk(sound); @@ -169,7 +169,7 @@ void SDLPlayer::audioDone() void SDLPlayer::closeAudio() { -#ifndef __ANDROID_API__ +#ifndef ANDROID if(audioEnabled) { audioDone(); Mix_CloseAudio(); diff --git a/src/gui/qt/sound/sdlplayer.h b/src/gui/qt/sound/sdlplayer.h index bffc34e9..0c1aaa35 100644 --- a/src/gui/qt/sound/sdlplayer.h +++ b/src/gui/qt/sound/sdlplayer.h @@ -23,7 +23,7 @@ #include "configfile.h" #include -#ifndef __ANDROID_API__ +#ifndef ANDROID #ifdef __APPLE__ #include #else @@ -52,7 +52,7 @@ public: private: -#ifndef __ANDROID_API__ +#ifndef ANDROID Mix_Chunk *sound; unsigned char *soundData; int currentChannel;