jtothebell / fake-08

A Pico-8 player/emulator for console homebrew
Other
559 stars 49 forks source link

sfx() with channel -2 to stop sound not working #206

Closed rikimbo closed 5 months ago

rikimbo commented 11 months ago

Calling sfx() with the [channel] argument set to -2 should interrupt (stop) a given sound from playing on any channels it's playing on. I noticed that isn't working properly in this cart: Pico Joust 2600

In the linked cart, you can notice the effect when you die and respawn. There's a sound that plays for a long time, increasing up in frequency. It's supposed to be interrupted when you start moving again, with a call to sfx(6,-2) in the code. Instead, it plays for its full duration.

jtothebell commented 11 months ago

Thank you for the detailed report. I've just pushed a fix for it, and it will be included in the next release (I'm not sure when that will be)

rikimbo commented 11 months ago

I downloaded the artifacts from commit https://github.com/jtothebell/fake-08/commit/aebd6b9648d1c450910ad79c78f9280dfbd20b25 and tried it out on Android (RG405m) with the cart I linked above. Seems to work well!

I'm not sure if you normally wait until a release before closing the issue, but as far as I can tell, this is resolved. Thanks so much!