exch-bms2 / beatoraja

Cross-platform rhythm game based on Java and libGDX.
GNU General Public License v3.0
623 stars 146 forks source link

Fix for the corrupted preview music playback #778

Closed Kolyasisan closed 6 months ago

Kolyasisan commented 6 months ago

-The PreviewMusicProcessor class manages the playback of the song select menu music and the preview music. -The very first instance of the defaultMusic playback that is scheduled at the start of the thread is not tracked. -When using random menu bgm selection, skins without much animations and fast PCs, this can result in the PreviewThread not processing any requests and going straight to exit. -At exit, the thread tries to stop the playback of a currently tracked music, but since the first playback is untracked, it fails to be stopped, resulting in overlaying BGM playback if you have random BGM selection. -Fixed by making this first playback schedule trackable.

Kolyasisan commented 6 months ago

Whoopsie, made the commit from a wrong account somehow. Gonna re-make it real quick, sorry for the hassle