Commit 598639e2 authored by nanahira's avatar nanahira

move back to ma_sound_init_from_file_w

parent 21c6e382
Pipeline #34429 passed with stages
in 7 minutes and 36 seconds
......@@ -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