From fa5f3a8bf77209da27acc33cf144e2e4500a2600 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 20 Apr 2020 00:10:31 +0200 Subject: Add LEQ(m) when analysing audio (#1382). --- src/wx/audio_dialog.cc | 10 ++++++++++ src/wx/audio_dialog.h | 1 + 2 files changed, 11 insertions(+) (limited to 'src/wx') diff --git a/src/wx/audio_dialog.cc b/src/wx/audio_dialog.cc index 2f1f1c826..efc506aff 100644 --- a/src/wx/audio_dialog.cc +++ b/src/wx/audio_dialog.cc @@ -89,6 +89,8 @@ AudioDialog::AudioDialog (wxWindow* parent, shared_ptr film, shared_ptrAdd (_integrated_loudness, 0, wxTOP, DCPOMATIC_SIZER_Y_GAP); _loudness_range = new StaticText (this, wxT ("")); left->Add (_loudness_range, 0, wxTOP, DCPOMATIC_SIZER_Y_GAP); + _leqm = new StaticText (this, wxT("")); + left->Add (_leqm, 0, wxTOP, DCPOMATIC_SIZER_Y_GAP); lr_sizer->Add (left, 1, wxALL | wxEXPAND, 12); @@ -414,6 +416,14 @@ AudioDialog::setup_statistics () ) ); } + + if (static_cast(_analysis->leqm())) { + _leqm->SetLabel( + wxString::Format( + _("LEQ(m) %.2fdB"), _analysis->leqm().get() + _analysis->gain_correction(_playlist) + ) + ); + } } bool diff --git a/src/wx/audio_dialog.h b/src/wx/audio_dialog.h index 3a02fd87f..34c174cf4 100644 --- a/src/wx/audio_dialog.h +++ b/src/wx/audio_dialog.h @@ -59,6 +59,7 @@ private: wxStaticText* _true_peak; wxStaticText* _integrated_loudness; wxStaticText* _loudness_range; + wxStaticText* _leqm; wxCheckBox* _channel_checkbox[MAX_DCP_AUDIO_CHANNELS]; wxCheckBox* _type_checkbox[AudioPoint::COUNT]; wxSlider* _smoothing; -- cgit v1.2.3