From: Carl Hetherington Date: Wed, 4 Jul 2018 23:02:06 +0000 (+0100) Subject: Add audio gain to timeline content view. X-Git-Tag: v2.13.33~6 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=886ef57aeac4772c0f8078925d83e78a6e30ec03 Add audio gain to timeline content view. --- diff --git a/src/wx/timeline_audio_content_view.cc b/src/wx/timeline_audio_content_view.cc index fe098c48b..330196a97 100644 --- a/src/wx/timeline_audio_content_view.cc +++ b/src/wx/timeline_audio_content_view.cc @@ -55,6 +55,13 @@ TimelineAudioContentView::label () const wxString s = TimelineContentView::label (); shared_ptr ac = content()->audio; DCPOMATIC_ASSERT (ac); + + if (ac->gain() > 0.01) { + s += wxString::Format (" +%.1fdB", ac->gain()); + } else if (ac->gain() < -0.01) { + s += wxString::Format (" %.1fdB", ac->gain()); + } + list mapped = ac->mapping().mapped_output_channels(); if (!mapped.empty ()) { s += " → "; @@ -63,5 +70,6 @@ TimelineAudioContentView::label () const } s = s.Left(s.Length() - 2); } + return s; }