GB Audio: Sample inactive channels (fixes #1455, fixes #1456)

This commit is contained in:
Vicki Pfau 2019-06-22 23:15:43 -07:00
parent 68fc62073d
commit 6d53c44422
2 changed files with 5 additions and 4 deletions

View File

@ -26,6 +26,7 @@ Emulation fixes:
- GBA Video: Fix wrapped sprite mosaic clamping (fixes mgba.io/i/1432)
- GBA Memory: Fix STM to VRAM (fixes mgba.io/i/1430)
- GB Audio: Only reset channel 3 sample in DMG mode
- GB Audio: Sample inactive channels (fixes mgba.io/i/1455, mgba.io/i/1456)
Other fixes:
- Qt: Fix some Qt display driver race conditions
- Core: Improved lockstep driver reliability (Le Hoang Quyen)

View File

@ -598,7 +598,7 @@ void GBAudioSamplePSG(struct GBAudio* audio, int16_t* left, int16_t* right) {
int sampleLeft = dcOffset;
int sampleRight = dcOffset;
if (audio->playingCh1 && !audio->forceDisableCh[0]) {
if (!audio->forceDisableCh[0]) {
if (audio->ch1Left) {
sampleLeft += audio->ch1.sample;
}
@ -608,7 +608,7 @@ void GBAudioSamplePSG(struct GBAudio* audio, int16_t* left, int16_t* right) {
}
}
if (audio->playingCh2 && !audio->forceDisableCh[1]) {
if (!audio->forceDisableCh[1]) {
if (audio->ch2Left) {
sampleLeft += audio->ch2.sample;
}
@ -618,7 +618,7 @@ void GBAudioSamplePSG(struct GBAudio* audio, int16_t* left, int16_t* right) {
}
}
if (audio->playingCh3 && !audio->forceDisableCh[2]) {
if (!audio->forceDisableCh[2]) {
if (audio->ch3Left) {
sampleLeft += audio->ch3.sample;
}
@ -628,7 +628,7 @@ void GBAudioSamplePSG(struct GBAudio* audio, int16_t* left, int16_t* right) {
}
}
if (audio->playingCh4 && !audio->forceDisableCh[3]) {
if (!audio->forceDisableCh[3]) {
int8_t sample = _coalesceNoiseChannel(&audio->ch4);
if (audio->ch4Left) {
sampleLeft += sample;