From 9ae12241a455316e5d5cecf8a9ff1925c65dc153 Mon Sep 17 00:00:00 2001 From: cam900 Date: Mon, 16 Jan 2023 10:25:59 +0900 Subject: [PATCH] Fix downsampled rate accuracy --- src/engine/platform/opl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine/platform/opl.cpp b/src/engine/platform/opl.cpp index 6ac489bfc..f3accd24a 100644 --- a/src/engine/platform/opl.cpp +++ b/src/engine/platform/opl.cpp @@ -1548,8 +1548,8 @@ void DivPlatformOPL::reset() { } */ if (downsample) { - //const unsigned int downsampledRate=(unsigned int)((double)rate*rate/chipRateBase); - OPL3_Reset(&fm,44100); + const unsigned int downsampledRate=(unsigned int)((double)rate*49716.0/(double)chipRateBase); + OPL3_Reset(&fm,downsampledRate); } else { OPL3_Reset(&fm,rate); }