diff --git a/src/gui/qt/mainwindow/mainwindowimpl.cpp b/src/gui/qt/mainwindow/mainwindowimpl.cpp index ef040cf4..f7497e0b 100755 --- a/src/gui/qt/mainwindow/mainwindowimpl.cpp +++ b/src/gui/qt/mainwindow/mainwindowimpl.cpp @@ -839,7 +839,6 @@ void mainWindowImpl::callSettingsDialog() { } } // Re-init audio. - mySDLPlayer->closeAudio(); mySDLPlayer->initAudio(); } } diff --git a/src/gui/qt/sound/sdlplayer.cpp b/src/gui/qt/sound/sdlplayer.cpp index ef6b1dcd..f3aa15e2 100644 --- a/src/gui/qt/sound/sdlplayer.cpp +++ b/src/gui/qt/sound/sdlplayer.cpp @@ -31,7 +31,7 @@ SDLPlayer::~SDLPlayer() void SDLPlayer::initAudio() { - if (myConfig->readConfigInt("PlaySoundEffects")) + if (!audioEnabled && myConfig->readConfigInt("PlaySoundEffects")) { audio_rate = 44100; audio_format = AUDIO_S16; /* 16-bit stereo */ @@ -48,7 +48,7 @@ void SDLPlayer::initAudio() { void SDLPlayer::playSound(string audioString, int playerID) { - if(audioEnabled) { + if(audioEnabled && myConfig->readConfigInt("PlaySoundEffects")) { QFile myFile(":sounds/resources/sounds/"+QString::fromStdString(audioString)+".wav");