AntonioND / gbt-player

A music player library for the PSG audio channels of the GB, GBC and GBA.
MIT License
281 stars 20 forks source link

Legacy_gbdk: Fix inverted pause behavior, Unmute volume when resuming playback #10

Closed bbbbbr closed 4 years ago

bbbbbr commented 4 years ago

Hi Again :)

I might be misunderstanding the use, but seems like gbt_pause() does not work entirely as expected.

EDIT: I see that I'm calling gbt_pause() with the opposite of the expected value. I think I was doing that because when called with (1) to pause and (0) to un-pause, it never resumes playback.

So I think there might be two different issues here:

Here's a proposed patch to mute on pause and unmute on unpause. I don't use ASM much so this may not be optimally written Hopefully no bugs (was not sure if AF needs to be push/popped?).

AntonioND commented 4 years ago

Sorry for the late reply! I totally lost the notification of this PR in a lot of other emails...

This PR changing the logic of the pause function, right? If so, I'd like it to go back to how it was before. It may not make logical sense, but there are games out there that may rely on the current behaviour.

The rest seems to be fine, though.

bbbbbr commented 4 years ago

No worries. :)

Here's an updated PR.

bbbbbr commented 4 years ago

Sure, here are two new commits. I don't have a RGBDS environment set up, so perhaps you can verify syntax & such is ok.

AntonioND commented 4 years ago

I've tested it and it works, thanks!