Apply fader-based gain calculations to the current gain, not 0dB.
[dcpomatic.git] / src / wx / audio_panel.cc
index 0cb062efd3f2c4cc127b093c29f8df3b12b233f3..5523d25393088196d88655581121b43f740c6522 100644 (file)
@@ -88,7 +88,7 @@ AudioPanel::AudioPanel (ContentPanel* p)
        /// TRANSLATORS: this is an abbreviation for milliseconds, the unit of time
        _delay_ms_label = create_label (this, _("ms"), false);
 
-       _mapping = new AudioMappingView (this);
+       _mapping = new AudioMappingView (this, _("Content"), _("content"), _("DCP"), _("DCP"));
        _sizer->Add (_mapping, 1, wxEXPAND | wxALL, 6);
 
        _description = new StaticText (this, wxT(" \n"), wxDefaultPosition, wxDefaultSize);
@@ -258,7 +258,7 @@ AudioPanel::gain_calculate_button_clicked ()
                return;
        }
 
-       _gain->wrapped()->SetValue (*c);
+       _gain->wrapped()->SetValue(_gain->wrapped()->GetValue() + *c);
 
        /* This appears to be necessary, as the change is not signalled,
           I think.
@@ -316,7 +316,13 @@ AudioPanel::setup_sensitivity ()
 
        string why_not;
        bool const can_reference = dcp && dcp->can_reference_audio (_parent->film(), why_not);
-       setup_refer_button (_reference, _reference_note, dcp, can_reference, why_not);
+       wxString cannot;
+       if (why_not.empty()) {
+               cannot = _("Cannot reference this DCP's audio.");
+       } else {
+               cannot = _("Cannot reference this DCP's audio: ") + std_to_wx(why_not);
+       }
+       setup_refer_button (_reference, _reference_note, dcp, can_reference, cannot);
 
        if (_reference->GetValue ()) {
                _gain->wrapped()->Enable (false);