fix fprintf % error

This commit is contained in:
Zilog80 2022-09-02 19:59:29 +02:00
parent ce3fea3747
commit 6c93d9b2fa

View File

@ -141,7 +141,7 @@ namespace dsp::multirate {
double actualOutSR = (double)IntSR * (double)interp / (double)decim; double actualOutSR = (double)IntSR * (double)interp / (double)decim;
double error = abs((actualOutSR - _outSamplerate) / _outSamplerate) * 100.0; double error = abs((actualOutSR - _outSamplerate) / _outSamplerate) * 100.0;
if (error > 0.01) { if (error > 0.01) {
fprintf(stderr, "Warning: resampling error is over 0.01%: %lf\n", error); fprintf(stderr, "Warning: resampling error is over 0.01%%: %lf\n", error);
} }
// If the power decimator already did all the work, don't use the resampler // If the power decimator already did all the work, don't use the resampler
@ -171,4 +171,4 @@ namespace dsp::multirate {
double _outSamplerate; double _outSamplerate;
Mode mode; Mode mode;
}; };
} }