From 8f804f6e6b37f2132214789abfed457d3a2f2a67 Mon Sep 17 00:00:00 2001 From: cam900 Date: Sat, 27 Aug 2022 18:20:33 +0900 Subject: [PATCH] Correct pitch to sample preview --- src/engine/platform/ay.cpp | 2 +- src/engine/platform/ay8930.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine/platform/ay.cpp b/src/engine/platform/ay.cpp index 5cb5574b2..de5dd6e78 100644 --- a/src/engine/platform/ay.cpp +++ b/src/engine/platform/ay.cpp @@ -381,7 +381,7 @@ int DivPlatformAY8910::dispatch(DivCommand c) { } chan[c.chan].dac.pos=0; chan[c.chan].dac.period=0; - chan[c.chan].dac.rate=parent->getSample(chan[c.chan].dac.sample)->rate; + chan[c.chan].dac.rate=parent->getSample(chan[c.chan].dac.sample)->rate*2048; if (dumpWrites) { rWrite(0x08+c.chan,0); addWrite(0xffff0001+(c.chan<<8),chan[c.chan].dac.rate); diff --git a/src/engine/platform/ay8930.cpp b/src/engine/platform/ay8930.cpp index 5ab9c3489..2dd4ca8de 100644 --- a/src/engine/platform/ay8930.cpp +++ b/src/engine/platform/ay8930.cpp @@ -400,7 +400,7 @@ int DivPlatformAY8930::dispatch(DivCommand c) { } chan[c.chan].dac.pos=0; chan[c.chan].dac.period=0; - chan[c.chan].dac.rate=parent->getSample(chan[c.chan].dac.sample)->rate; + chan[c.chan].dac.rate=parent->getSample(chan[c.chan].dac.sample)->rate*4096; if (dumpWrites) { rWrite(0x08+c.chan,0); addWrite(0xffff0001+(c.chan<<8),chan[c.chan].dac.rate);