Skip to content
Permalink
Browse files
GB Audio: Fix changing channel properties mid-frame (fixes #2655)
  • Loading branch information
endrift committed Oct 3, 2022
1 parent 1807442 commit 9adad40b1ce14b00a19a8544ba0742f9bf3342fb
Showing 1 changed file with 2 additions and 0 deletions.
@@ -377,11 +377,13 @@ void GBAudioWriteNR44(struct GBAudio* audio, uint8_t value) {
}

void GBAudioWriteNR50(struct GBAudio* audio, uint8_t value) {
GBAudioRun(audio, mTimingCurrentTime(audio->timing), 0x2);
audio->volumeRight = GBRegisterNR50GetVolumeRight(value);
audio->volumeLeft = GBRegisterNR50GetVolumeLeft(value);
}

void GBAudioWriteNR51(struct GBAudio* audio, uint8_t value) {
GBAudioRun(audio, mTimingCurrentTime(audio->timing), 0x2);
audio->ch1Right = GBRegisterNR51GetCh1Right(value);
audio->ch2Right = GBRegisterNR51GetCh2Right(value);
audio->ch3Right = GBRegisterNR51GetCh3Right(value);

0 comments on commit 9adad40

Please sign in to comment.