Hacky window-on-top fix for OS X.
[dcpomatic.git] / src / wx / audio_panel.cc
index ddee3157f069374d15d7f1f205ce410d6a8706d6..4801fab00b8a062698e578b6d560616e4133553e 100644 (file)
@@ -141,7 +141,9 @@ AudioPanel::film_changed (Film::Property property)
                setup_description ();
                break;
        case Film::REEL_TYPE:
+       case Film::INTEROP:
                setup_sensitivity ();
+               break;
        default:
                break;
        }
@@ -318,15 +320,11 @@ AudioPanel::setup_peak ()
                playlist->add (sel.front ());
                try {
                        shared_ptr<AudioAnalysis> analysis (new AudioAnalysis (_parent->film()->audio_analysis_path (playlist)));
-                       if (analysis->sample_peak ()) {
-                               float const peak_dB = 20 * log10 (analysis->sample_peak().get()) + analysis->gain_correction (playlist);
-                               if (peak_dB > -3) {
-                                       alert = true;
-                               }
-                               _peak->SetLabel (wxString::Format (_("Peak: %.2fdB"), peak_dB));
-                       } else {
-                               _peak->SetLabel (_("Peak: unknown"));
+                       float const peak_dB = 20 * log10 (analysis->overall_sample_peak().first.peak) + analysis->gain_correction (playlist);
+                       if (peak_dB > -3) {
+                               alert = true;
                        }
+                       _peak->SetLabel (wxString::Format (_("Peak: %.2fdB"), peak_dB));
                } catch (...) {
                        _peak->SetLabel (_("Peak: unknown"));
                }