Add LEQ(m) when analysing audio (#1382).
[dcpomatic.git] / src / wx / audio_dialog.cc
index 2f1f1c8265f324f41cb1c2733dd0f02ad44267bc..efc506aff9a62bdec61946882308950c84fb3259 100644 (file)
@@ -89,6 +89,8 @@ AudioDialog::AudioDialog (wxWindow* parent, shared_ptr<Film> film, shared_ptr<Co
        left->Add (_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<bool>(_analysis->leqm())) {
+               _leqm->SetLabel(
+                       wxString::Format(
+                               _("LEQ(m) %.2fdB"), _analysis->leqm().get() + _analysis->gain_correction(_playlist)
+                               )
+                       );
+       }
 }
 
 bool