From 6dd24e0733910fd4b30f8ebe2c59b2566dceb9e2 Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Sat, 13 May 2017 17:04:05 +0300 Subject: [PATCH] Fixed hung note issue. Closes #7 --- Core/apu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/apu.c b/Core/apu.c index f493ff9..cb87e66 100755 --- a/Core/apu.c +++ b/Core/apu.c @@ -159,7 +159,7 @@ void GB_apu_get_samples_and_update_pcm_regs(GB_gameboy_t *gb, GB_sample_t *sampl gb->io_registers[GB_IO_PCM_12] |= (((int)sample) * 0xF / MAX_CH_AMP) << 4; } - if (gb->apu.wave_enable) + if (gb->apu.wave_channels[2].is_playing) { int16_t sample = generate_wave(gb->apu.wave_channels[2].phase, gb->apu.wave_channels[2].wave_length,