13
0

LAN: Display messages for edge-case errors (#8437)

This commit is contained in:
Robin Gareus 2020-10-04 16:37:29 +02:00
parent f5c1830263
commit e76055d63d
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -499,6 +499,12 @@ LoudnessDialog::analyze ()
/* done */
_status->finish (TRS_UI);
if (!_status->aborted() && _status->result_map.size () != 1) {
ArdourMessageDialog (_("Loudness measurement returned no results. Likely because the analyzed range is to short."), false, MESSAGE_ERROR).run ();
return 1;
}
return _status->aborted() ? 1 : 0;
}
@ -576,6 +582,10 @@ LoudnessDialog::display_results ()
assert (ar.size () == 1);
ExportAnalysisPtr p = ar.begin()->second;
if (!p->have_loudness || !p->have_dbtp) {
ArdourMessageDialog (_("True-peak and loudness measurement failed. Likely Ardour's VAMP analysis plugin is missing from your installation. Please contact your vendor."), false, MESSAGE_ERROR).run ();
}
_dbfs = accurate_coefficient_to_dB (p->peak);
_dbtp = accurate_coefficient_to_dB (p->truepeak);
_lufs_i = p->integrated_loudness > -200 ? p->integrated_loudness : -std::numeric_limits<float>::infinity();