Commit 77c9b43b authored by nanahira's avatar nanahira

Merge branch 'master' into server

parents b7c0df7c 8e548735
......@@ -156,7 +156,7 @@ void SoundManager::PlaySoundEffect(int sound) {
break;
}
case SOUND_RECOVER: {
strcpy(soundName, "recover");
strcpy(soundName, "gainlp");
break;
}
case SOUND_COUNTER_ADD: {
......@@ -168,11 +168,11 @@ void SoundManager::PlaySoundEffect(int sound) {
break;
}
case SOUND_COIN: {
strcpy(soundName, "coin");
strcpy(soundName, "coinflip");
break;
}
case SOUND_DICE: {
strcpy(soundName, "dice");
strcpy(soundName, "diceroll");
break;
}
case SOUND_NEXT_TURN: {
......@@ -212,7 +212,7 @@ void SoundManager::PlaySoundEffect(int sound) {
break;
}
case SOUND_CHAT: {
strcpy(soundName, "chat");
strcpy(soundName, "chatmessage");
break;
}
default:
......@@ -270,7 +270,13 @@ void SoundManager::PlayMusic(char* song, bool loop) {
StopBGM();
#ifdef YGOPRO_USE_MINIAUDIO
strcpy(currentPlayingMusic, song);
#ifdef _WIN32
wchar_t song_w[1024];
BufferIO::DecodeUTF8(song, song_w);
ma_sound_init_from_file_w(&engineMusic, song_w, MA_SOUND_FLAG_ASYNC | MA_SOUND_FLAG_STREAM, nullptr, nullptr, &soundBGM);
#else
ma_sound_init_from_file(&engineMusic, song, MA_SOUND_FLAG_ASYNC | MA_SOUND_FLAG_STREAM, nullptr, nullptr, &soundBGM);
#endif
ma_sound_set_looping(&soundBGM, loop);
ma_sound_start(&soundBGM);
#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