Do not try to apply replaygain when bps < 4 or bps > 24
This commit is contained in:
parent
defad5b544
commit
215d1aa633
@ -1592,6 +1592,14 @@ void metadata_callback(const FLAC__StreamDecoder *decoder, const FLAC__StreamMet
|
||||
}
|
||||
decoder_session->replaygain.apply = false;
|
||||
}
|
||||
else if(decoder_session->bps < 4 || decoder_session->bps > 24) {
|
||||
flac__utils_printf(stderr, 1, "%s: WARNING: can't apply ReplayGain, bit-per-sample value must be between 4 and 24\n", decoder_session->inbasefilename);
|
||||
if(decoder_session->treat_warnings_as_errors) {
|
||||
decoder_session->abort_flag = true;
|
||||
return;
|
||||
}
|
||||
decoder_session->replaygain.apply = false;
|
||||
}
|
||||
else {
|
||||
const char *ls[] = { "no", "peak", "hard" };
|
||||
const char *ns[] = { "no", "low", "medium", "high" };
|
||||
|
Loading…
Reference in New Issue
Block a user