Fix pitch

This commit is contained in:
cam900 2023-01-05 08:51:25 +09:00
parent f5c1273c2d
commit 74e429fae2

View file

@ -1488,8 +1488,8 @@ void DivPlatformOPL::reset() {
} }
*/ */
if (downsample) { if (downsample) {
const unsigned int downsampledRate=(unsigned int)((double)rate*rate/chipRateBase); // const unsigned int downsampledRate=(unsigned int)((double)rate*rate/chipRateBase);
OPL3_Reset(&fm,downsampledRate); OPL3_Reset(&fm,44100);
} else { } else {
OPL3_Reset(&fm,rate); OPL3_Reset(&fm,rate);
} }
@ -1733,8 +1733,8 @@ void DivPlatformOPL::setFlags(const DivConfig& flags) {
switch (flags.getInt("chipType",0)) { switch (flags.getInt("chipType",0)) {
case 1: // YMF289B case 1: // YMF289B
chipFreqBase=32768*684; chipFreqBase=32768*684;
rate=chipClock/684; rate=chipClock/768;
chipRateBase=chipClock/768; chipRateBase=chipClock/684;
downsample=true; downsample=true;
break; break;
default: // YMF262 default: // YMF262