Merge branch 'master' of github.com:/pokerth/pokerth

This commit is contained in:
lotodore
2012-11-24 12:29:22 +01:00
3 changed files with 13 additions and 10 deletions
+2 -1
View File
@@ -347,6 +347,7 @@ win32 {
../mysql/lib \ ../mysql/lib \
../zlib ../zlib
LIBS += -lSDL_mixer \ LIBS += -lSDL_mixer \
-lsmpeg \
-lSDL \ -lSDL \
-lSDLmain \ -lSDLmain \
-ltinyxml \ -ltinyxml \
@@ -365,7 +366,7 @@ win32 {
debug:LIBPATH += debug/lib debug:LIBPATH += debug/lib
release:LIBPATH += release/lib release:LIBPATH += release/lib
LIBS += -lsqlite3 LIBS += -lsqlite3
LIBS += -lntlm -lmodplug -lddraw -ldxguid -lsmpeg -lvorbisfile -lvorbis -logg LIBS += -lntlm -lmodplug -lddraw -ldxguid -lvorbisfile -lvorbis -logg
LIBS += -lboost_thread_win32-mt LIBS += -lboost_thread_win32-mt
LIBS += -lboost_filesystem-mt LIBS += -lboost_filesystem-mt
LIBS += -lboost_regex-mt LIBS += -lboost_regex-mt
+1 -1
View File
@@ -841,8 +841,8 @@ void gameTableImpl::applySettings(settingsDialogImpl* mySettingsDialog)
} }
// Re-init audio. // Re-init audio.
mySDLPlayer->closeAudio();
mySDLPlayer->initAudio(); mySDLPlayer->initAudio();
mySDLPlayer->closeAudio();
} }
void gameTableImpl::initGui(int speed) void gameTableImpl::initGui(int speed)
+9 -7
View File
@@ -41,14 +41,15 @@ SDLPlayer::SDLPlayer(ConfigFile *c)
SDLPlayer::~SDLPlayer() SDLPlayer::~SDLPlayer()
{ {
#ifndef ANDROID #ifndef ANDROID
// closeAudio(); closeAudio();
#endif #endif
} }
void SDLPlayer::initAudio() void SDLPlayer::initAudio()
{ {
#ifndef ANDROID #ifndef ANDROID
// SDL_Init(SDL_INIT_AUDIO); SDL_Init(SDL_INIT_AUDIO);
qDebug() << "SDL_Init()";
// if (!audioEnabled && myConfig->readConfigInt("PlaySoundEffects")) { // if (!audioEnabled && myConfig->readConfigInt("PlaySoundEffects")) {
// int audio_rate = 44100; // int audio_rate = 44100;
// Uint16 audio_format = AUDIO_S16; /* 16-bit stereo */ // Uint16 audio_format = AUDIO_S16; /* 16-bit stereo */
@@ -70,7 +71,7 @@ void SDLPlayer::initAudio()
void SDLPlayer::playSound(string audioString, int playerID) void SDLPlayer::playSound(string audioString, int playerID)
{ {
#ifndef ANDROID #ifndef ANDROID
// initAudio(); initAudio();
// if(audioEnabled && myConfig->readConfigInt("PlaySoundEffects")) { // if(audioEnabled && myConfig->readConfigInt("PlaySoundEffects")) {
// QFile myFile(myAppDataPath + "sounds/default/" + QString::fromStdString(audioString)+".wav"); // QFile myFile(myAppDataPath + "sounds/default/" + QString::fromStdString(audioString)+".wav");
@@ -142,9 +143,9 @@ void SDLPlayer::playSound(string audioString, int playerID)
// } // }
// //TESTING: release audio after every sound when there is no other sound currently played // //TESTING: release audio after every sound when there is no other sound currently played
// if(SDL_GetAudioStatus() != SDL_AUDIO_PLAYING) { if(SDL_GetAudioStatus() != SDL_AUDIO_PLAYING) {
// closeAudio(); closeAudio();
// } }
// } // }
#endif #endif
} }
@@ -162,6 +163,7 @@ void SDLPlayer::closeAudio()
// audioEnabled = false; // audioEnabled = false;
// } // }
// SDL_Quit(); SDL_Quit();
qDebug() << "SDL_Quit()";
#endif #endif
} }