Commit f788c0d4 authored by nekrozar's avatar nekrozar

fix sound volume

parent d0abf558
......@@ -49,6 +49,7 @@ void SoundManager::PlaySoundEffect(int sound) {
#ifdef YGOPRO_USE_IRRKLANG
if(!mainGame->chkEnableSound->isChecked())
return;
engineSound->setSoundVolume(mainGame->gameConf.sound_volume);
switch(sound) {
case SOUND_SUMMON: {
engineSound->play2D("./sound/summon.wav");
......@@ -173,7 +174,6 @@ void SoundManager::PlaySoundEffect(int sound) {
default:
break;
}
engineSound->setSoundVolume(mainGame->gameConf.sound_volume);
#endif
}
void SoundManager::PlayDialogSound(irr::gui::IGUIElement * element) {
......@@ -205,8 +205,8 @@ void SoundManager::PlayMusic(char* song, bool loop) {
return;
if(!engineMusic->isCurrentlyPlaying(song)) {
engineMusic->stopAllSounds();
soundBGM = engineMusic->play2D(song, loop, false, true);
engineMusic->setSoundVolume(mainGame->gameConf.music_volume);
soundBGM = engineMusic->play2D(song, loop, false, true);
}
#endif
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment