... but don't do so ad infinitum, if some processing problem is causing implausibly high output values

This commit is contained in:
Chris Cannam
2020-09-15 13:43:31 +01:00
parent 1992688155
commit 334f1b891d

View File

@@ -725,6 +725,14 @@ int main(int argc, char **argv)
<< "reduced gain of " << gain
<< " (supply --ignore-clipping to avoid this)" << endl;
}
const float mingain = 0.75f;
if (gain < mingain) {
cerr << "WARNING: Clipped values were implausibly high: "
<< "something wrong with input or process - "
<< "not reducing gain below " << mingain << endl;
gain = mingain;
ignoreClipping = true;
}
successful = false;
break;
}