From 3992a1c677e49fb0d0e9a04338c5e8c1d422c166 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Fri, 23 Sep 2022 23:29:19 -0500 Subject: [PATCH] AY: clockSel PCM fix --- src/engine/platform/ay.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/platform/ay.cpp b/src/engine/platform/ay.cpp index 5d982371..9f4e0dc2 100644 --- a/src/engine/platform/ay.cpp +++ b/src/engine/platform/ay.cpp @@ -329,7 +329,7 @@ void DivPlatformAY8910::tick(bool sysTick) { off=8363.0/(double)s->centerRate; } } - chan[i].dac.rate=((double)rate*16.0)/(double)(MAX(1,off*chan[i].freq)); + chan[i].dac.rate=((double)rate*((sunsoft||clockSel)?8.0:16.0))/(double)(MAX(1,off*chan[i].freq)); if (dumpWrites) addWrite(0xffff0001+(i<<8),chan[i].dac.rate); } if (chan[i].freq>4095) chan[i].freq=4095;