Fixed bug introduced by the stereo support

This commit is contained in:
Lior Halphon 2016-06-10 16:38:20 +03:00
parent aca5873de2
commit 759b497c07

View File

@ -89,6 +89,7 @@ void apu_render(GB_gameboy_t *gb, unsigned long sample_rate, unsigned long n_sam
gb->io_registers[GB_IO_PCM_12] |= (((int)sample) * 0xF / MAX_CH_AMP) << 4; gb->io_registers[GB_IO_PCM_12] |= (((int)sample) * 0xF / MAX_CH_AMP) << 4;
} }
if (gb->apu.wave_enable)
{ {
int16_t sample = generate_wave(gb->apu.wave_channels[2].phase, int16_t sample = generate_wave(gb->apu.wave_channels[2].phase,
MAX_CH_AMP, MAX_CH_AMP,