update via PR comments

This commit is contained in:
cam900 2023-07-23 17:39:38 +09:00
parent a675494fc2
commit 3bafd4f6c0

View file

@ -1599,7 +1599,7 @@ void DivPlatformOPL::reset() {
} }
*/ */
if (downsample) { if (downsample) {
const unsigned int downsampledRate=(unsigned int)((double)rate*49716.0/(double)chipRateBase); const unsigned int downsampledRate=(unsigned int)((double)rate*round(COLOR_NTSC/72.0)/(double)chipRateBase);
OPL3_Reset(&fm,downsampledRate); OPL3_Reset(&fm,downsampledRate);
} else { } else {
OPL3_Reset(&fm,rate); OPL3_Reset(&fm,rate);
@ -1865,7 +1865,7 @@ void DivPlatformOPL::setFlags(const DivConfig& flags) {
break; break;
} }
if (downsample) { if (downsample) {
const unsigned int downsampledRate=(unsigned int)((double)rate*49716.0/(double)chipRateBase); const unsigned int downsampledRate=(unsigned int)((double)rate*round(COLOR_NTSC/72.0)/(double)chipRateBase);
OPL3_Resample(&fm,downsampledRate); OPL3_Resample(&fm,downsampledRate);
} else { } else {
OPL3_Resample(&fm,rate); OPL3_Resample(&fm,rate);