Fix downsampled rate accuracy

This commit is contained in:
cam900 2023-01-16 10:25:59 +09:00
parent 371c82338f
commit 9ae12241a4

View file

@ -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);
}