From 12ade13580df60fa9832f038a02ab5499eaeb1d5 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Wed, 30 Mar 2022 00:33:29 -0500 Subject: [PATCH] SegaPCM: fix pitched samples on VGM export fixes #291 --- src/engine/platform/segapcm.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine/platform/segapcm.cpp b/src/engine/platform/segapcm.cpp index 361cef63c..69d8bd6e7 100644 --- a/src/engine/platform/segapcm.cpp +++ b/src/engine/platform/segapcm.cpp @@ -114,8 +114,8 @@ void DivPlatformSegaPCM::tick() { off=(double)s->centerRate/8363.0; } chan[i].pcm.freq=MIN(255,(15625+(off*parent->song.tuning*pow(2.0,double(chan[i].freq+256)/(64.0*12.0)))*255)/31250); - if (dumpWrites && i>=8) { - addWrite(0x10007+((i-8)<<3),chan[i].pcm.freq); + if (dumpWrites) { + addWrite(0x10007+(i<<3),chan[i].pcm.freq); } } chan[i].freqChanged=false;