nes_apu.cpp: Don't zero DPCM channel's output. Fixes some audio popping. (#9363)

This commit is contained in:
0kmg 2022-03-02 21:28:00 -09:00 committed by GitHub
parent a08184c8f0
commit c5deb22818
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -408,7 +408,6 @@ static inline void apu_dpcmreset(apu_t::dpcm_t *chan)
chan->bits_left = chan->length << 3;
chan->irq_occurred = false;
chan->enabled = true; /* Fixed * Proper DPCM channel ENABLE/DISABLE flag behaviour*/
chan->vol = 0; /* Fixed * DPCM DAC resets itself when restarted */
}
/* OUTPUT DPCM WAVE SAMPLE (VALUES FROM 0 to +127) */
@ -435,7 +434,6 @@ void nesapu_device::apu_dpcm(apu_t::dpcm_t *chan)
if (!chan->length)
{
chan->enabled = false; /* Fixed * Proper DPCM channel ENABLE/DISABLE flag behaviour*/
chan->vol = 0; /* Fixed * DPCM DAC resets itself when restarted */
if (chan->regs[0] & 0x40)
apu_dpcmreset(chan);
else