mirror of https://github.com/mgba-emu/mgba.git
GB Audio: Fix restarting envelope when writing to register (fixes #3067)
This commit is contained in:
parent
f8112aee59
commit
9a45bf94aa
1
CHANGES
1
CHANGES
|
@ -4,6 +4,7 @@ Emulation fixes:
|
|||
- ARM: Fake bpkt instruction should take no cycles (fixes mgba.io/i/2551)
|
||||
- GB Audio: Fix channels 1/2 staying muted if restarted after long silence
|
||||
- GB Audio: Fix channel 1 restarting if sweep applies after stop (fixes mgba.io/i/2965)
|
||||
- GB Audio: Fix restarting envelope when writing to register (fixes mgba.io/i/3067)
|
||||
- GB I/O: Read back proper SVBK value after writing 0 (fixes mgba.io/i/2921)
|
||||
- GB SIO: Disabling SIO should cancel pending transfers (fixes mgba.io/i/2537)
|
||||
- GBA Audio: Fix sample timing drifting when changing sample interval
|
||||
|
|
|
@ -850,9 +850,6 @@ static void _sample(struct mTiming* timing, void* user, uint32_t cyclesLate) {
|
|||
bool _resetEnvelope(struct GBAudioEnvelope* envelope) {
|
||||
envelope->currentVolume = envelope->initialVolume;
|
||||
_updateEnvelopeDead(envelope);
|
||||
if (!envelope->dead) {
|
||||
envelope->nextStep = envelope->stepTime;
|
||||
}
|
||||
return envelope->initialVolume || envelope->direction;
|
||||
}
|
||||
|
||||
|
@ -937,6 +934,7 @@ static void _updateEnvelopeDead(struct GBAudioEnvelope* envelope) {
|
|||
envelope->dead = 1;
|
||||
} else {
|
||||
envelope->dead = 0;
|
||||
envelope->nextStep = envelope->stepTime;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue