Make show audio work on the whole DCP, not individual content.
[dcpomatic.git] / src / wx / audio_plot.cc
index 641ddd503aa7fc781167f616d5489059dde8bcb7..829290d4d16a57d126166ab307ef377fb3ace7bc 100644 (file)
@@ -38,7 +38,6 @@ int const AudioPlot::max_smoothing = 128;
 
 AudioPlot::AudioPlot (wxWindow* parent)
        : wxPanel (parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE)
-       , _gain (0)
        , _smoothing (max_smoothing / 2)
 {
 #ifndef __WXOSX__      
@@ -205,7 +204,7 @@ AudioPlot::y_for_linear (float p, Metrics const & metrics) const
                p = 1e-4;
        }
        
-       return metrics.height - (20 * log10(p) - _minimum + _gain) * metrics.y_scale - metrics.y_origin;
+       return metrics.height - (20 * log10(p) - _minimum) * metrics.y_scale - metrics.y_origin;
 }
 
 void
@@ -280,7 +279,7 @@ AudioPlot::plot_rms (wxGraphicsPath& path, int channel, Metrics const & metrics)
                        p += pow (*j, 2);
                }
 
-               if (smoothing.size() > 0) {
+               if (!smoothing.empty ()) {
                        p = sqrt (p / smoothing.size ());
                }
 
@@ -288,13 +287,6 @@ AudioPlot::plot_rms (wxGraphicsPath& path, int channel, Metrics const & metrics)
        }
 }
 
-void
-AudioPlot::set_gain (float g)
-{
-       _gain = g;
-       Refresh ();
-}
-
 void
 AudioPlot::set_smoothing (int s)
 {