bbbradsmith / nsfplay

Nintendo NES sound file NSF music player
https://bbbradsmith.github.io/nsfplay/
279 stars 43 forks source link

NSFplug: bug with NSFe playback (temporary wrong track count) #14

Closed koitsu closed 5 years ago

koitsu commented 5 years ago

Upon loading this NSFe and double-clicking on the song title in Winamp (to open the NSFplug dialog), the song selector states there are 45 tracks -- tracks 0-15 are music, whilst tracks 16-44 are SFX. The Misc area reads Start track: 1 of 45. There is an NSFe playlist -- NSFe plst order: 12, 6, 0, 1, 8, 5, 4, 2, 3, 9, 14, 11, 13, 7, 10.

Upon playing the first track/song in the playlist (track 12), the Song Selector slider shows 45 ticks. However, once that song is done, the slider shows a total of 15 song and the Misc area changes to show Start track: 1 of 15. Closing the NSFplug dialog and re-opening it again shows 45 tracks until the next song plays or next/previous track is chosen.

Also, attempting to switch to an SFX track (ex. 39) when this quirk is present causes NSFplug to switch to a different seemingly-random song.

I do have Use NSFe Playlist checked/enabled in Options -> Settings -> General.

I'm under the impression that this checkbox should basically inhibit any display of the non-NSFe-playlist tracks, i.e. under no circumstance should the Song Selector be showing 45 ticks.

1943 - The Battle of Midway.zip

bbbradsmith commented 5 years ago

Thanks.

There's this awful vestigial behaviour where a second copy of the NSF is loaded and parsed for the info displayed in the UI rather than reusing the one already loaded. It occasionally leads to me missing a second execution path for stuff like this. :(

Should be fixed with the change above, try the latest auto-build.

koitsu commented 4 years ago

Can confirm this is fixed as of cb007ddb020607815327f68bf1d12b7915df95a1. Thanks!