Fix incorrect conversion of audio from DCP sources (#642).
[dcpomatic.git] / src / lib / audio_analysis.h
index 2411b4316c7f1474ff363b9e71e1baaee82ddaf6..478b0e532f0dab46ad263ac7ce5249269c8ec892 100644 (file)
@@ -75,12 +75,25 @@ public:
                return _peak_time;
        }
 
+       boost::optional<double> analysis_gain () const {
+               return _analysis_gain;
+       }
+
+       void set_analysis_gain (double gain) {
+               _analysis_gain = gain;
+       }
+
        void write (boost::filesystem::path);
 
 private:
        std::vector<std::vector<AudioPoint> > _data;
        boost::optional<float> _peak;
        boost::optional<DCPTime> _peak_time;
+       /** If this analysis was run on a single piece of
+        *  content we store its gain in dB when the analysis
+        *  happened.
+        */
+       boost::optional<double> _analysis_gain;
 };
 
 #endif