Commit 050f1c94 authored by nanahira's avatar nanahira

fix se uninit

parent 5a21ce9a
...@@ -93,6 +93,7 @@ void SoundManager::PlaySound(char* sound) { ...@@ -93,6 +93,7 @@ void SoundManager::PlaySound(char* sound) {
#ifdef YGOPRO_USE_MINIAUDIO #ifdef YGOPRO_USE_MINIAUDIO
StopSound(); StopSound();
SetSoundVolume(mainGame->gameConf.sound_volume); SetSoundVolume(mainGame->gameConf.sound_volume);
playingSoundEffect = TRUE;
#ifdef _WIN32 #ifdef _WIN32
wchar_t sound_w[1024]; wchar_t sound_w[1024];
BufferIO::DecodeUTF8(song, sound_w); BufferIO::DecodeUTF8(song, sound_w);
...@@ -368,7 +369,7 @@ void SoundManager::StopBGM() { ...@@ -368,7 +369,7 @@ void SoundManager::StopBGM() {
} }
void SoundManager::StopSound() { void SoundManager::StopSound() {
#ifdef YGOPRO_USE_MINIAUDIO #ifdef YGOPRO_USE_MINIAUDIO
if(!playingSoundEffect || !ma_sound_is_playing(&soundEffect)) if(!playingSoundEffect)
return; return;
playingSoundEffect = FALSE; playingSoundEffect = FALSE;
ma_sound_uninit(&soundEffect); ma_sound_uninit(&soundEffect);
......
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