diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-08-25 11:41:21 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-08-25 16:16:37 +0100 |
| commit | 54038beb4437c027e584fc95110f6fd4dbf2207d (patch) | |
| tree | d72963f95eaa0f0aba26dfa1db90838f1c6292f2 /src/wx/audio_panel.cc | |
| parent | b42066b7d664ac322e6d2c79c5b0fa8bb0eb75c9 (diff) | |
Add channel details to high-audio-level hints (#822).
Diffstat (limited to 'src/wx/audio_panel.cc')
| -rw-r--r-- | src/wx/audio_panel.cc | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/wx/audio_panel.cc b/src/wx/audio_panel.cc index cda38eaf6..4801fab00 100644 --- a/src/wx/audio_panel.cc +++ b/src/wx/audio_panel.cc @@ -320,15 +320,11 @@ AudioPanel::setup_peak () playlist->add (sel.front ()); try { shared_ptr<AudioAnalysis> analysis (new AudioAnalysis (_parent->film()->audio_analysis_path (playlist))); - if (analysis->sample_peak ()) { - float const peak_dB = 20 * log10 (analysis->sample_peak().get()) + analysis->gain_correction (playlist); - if (peak_dB > -3) { - alert = true; - } - _peak->SetLabel (wxString::Format (_("Peak: %.2fdB"), peak_dB)); - } else { - _peak->SetLabel (_("Peak: unknown")); + float const peak_dB = 20 * log10 (analysis->overall_sample_peak().first.peak) + analysis->gain_correction (playlist); + if (peak_dB > -3) { + alert = true; } + _peak->SetLabel (wxString::Format (_("Peak: %.2fdB"), peak_dB)); } catch (...) { _peak->SetLabel (_("Peak: unknown")); } |
