Basic adaptations for changes to libdcp1 colour conversion handling.
[dcpomatic.git] / src / wx / audio_panel.cc
index b7d6979d35f20e0988f0b3135c5f0e0acc6fac5f..f1d832d869d80ae7b3d514c8055fbce1f22f249f 100644 (file)
@@ -178,9 +178,9 @@ void
 AudioPanel::gain_calculate_button_clicked ()
 {
        GainCalculatorDialog* d = new GainCalculatorDialog (this);
-       d->ShowModal ();
+       int const r = d->ShowModal ();
 
-       if (d->wanted_fader() == 0 || d->actual_fader() == 0) {
+       if (r == wxID_CANCEL || d->wanted_fader() == 0 || d->actual_fader() == 0) {
                d->Destroy ();
                return;
        }
@@ -268,16 +268,7 @@ AudioPanel::setup_description ()
                return;
        }
 
-       shared_ptr<AudioContent> acs = ac.front ();
-       if (acs->audio_frame_rate() != acs->resampled_audio_frame_rate ()) {
-               _description->SetLabel (wxString::Format (
-                                               _("Audio will be resampled from %.3fkHz to %.3fkHz."),
-                                               acs->audio_frame_rate() / 1000.0,
-                                               acs->resampled_audio_frame_rate() / 1000.0
-                                               ));
-       } else {
-               _description->SetLabel (_("Audio will not be resampled."));
-       }
+       _description->SetLabel (std_to_wx (ac.front()->processing_description ()));
 }
 
 void