elhobbs / prboom3ds

prboom for the 3ds
GNU General Public License v2.0
104 stars 26 forks source link

Musical note playing state is not cleared on loop #19

Closed Searinox closed 5 years ago

Searinox commented 5 years ago

When a music track loops without stopping all currently playing notes, those notes will continue to play indefinetly until the track once again asks for that note to play and then stops it.

A very noticeable offender of this is The Dave D. Taylor Blues in all its instances except for MAP08 in Doom 2. Once the song loops, a note will be stuck playing loudly and continuously for about another 2 minutes until the track toggles it again.

Further info here: https://www.doomworld.com/forum/topic/55534-doom-ii-map08-music-hanging-up-in-several-ports/ https://gbatemp.net/threads/doom.376939/page-41#post-8618416

To reproduce: -Start Doom 2 MAP14 -Wait for the music to loop(the track consists of the same piece playing 6 times with variations)

elhobbs commented 5 years ago

I took the easy path and stopped all channels when the music loops. It seems to fix the issue on map 14. Can you take a look and confirm? In any case the commit should show you were the loop is detected if you want to add something more.

Searinox commented 5 years ago

It works. The note hangs rather annoyingly for a few seconds but since all channels are stopped this has to be the fault of the track and not the music synth, track is buggy anyway.