Ancurio / mkxp

Free Software implementation of the Ruby Game Scripting System (RGSS)
GNU General Public License v2.0
509 stars 128 forks source link

BGM should not be played before ME when calling me_play and bgm_play together #234

Open khiav223577 opened 3 years ago

khiav223577 commented 3 years ago

I call me_play and bgm_play in order. It is expected to play the ME first, and then play the BGM when the ME stops. It works in RPG Maker XP. But in mkxp, sometimes BGM will briefly play and then stop in less than one second.

Audio.me_play(prelude_name, 80, 100)
Audio.bgm_play('bgm_name', 80, 100)

I guess it is because ME is checked for every 10ms. In between every checks, BGM may play. https://github.com/Ancurio/mkxp/blob/ae59fcd112ef6ae323c7b72b50a01c8d78085306/src/audio.cpp#L235