only:nicer error message

This commit is contained in:
Andrey 2024-08-18 15:03:19 -04:00
parent 4318055b56
commit e4d3a8c249
1 changed files with 4 additions and 1 deletions

View File

@ -30,7 +30,10 @@ static float getNorm(float K, float Q) {
}
void Biquad::configureBandpass(float samplingFrequency, float centerFrequency, float Q) {
criticalAssertVoid(samplingFrequency >= 2.5f * centerFrequency, "Invalid biquad parameters");
if (samplingFrequency < 2.5f * centerFrequency) {
criticalError("Invalid biquad parameters %f %f", samplingFrequency, centerFrequency);
return;
}
float K = getK(samplingFrequency, centerFrequency);
float norm = getNorm(K, Q);