Logging improvements to allow prettier displays in the server GUI.
[dcpomatic.git] / src / lib / audio_analysis.h
index 6c0be69873f2b2b1bcd7d81bca83498e4a54d424..0d06e5973eca297bcf6d6e4f1240059ab2b68691 100644 (file)
@@ -21,6 +21,7 @@
 #define DCPOMATIC_AUDIO_ANALYSIS_H
 
 #include "dcpomatic_time.h"
+#include "audio_point.h"
 #include <libcxml/cxml.h>
 #include <boost/optional.hpp>
 #include <boost/filesystem.hpp>
@@ -30,29 +31,7 @@ namespace xmlpp {
        class Element;
 }
 
-class AudioPoint
-{
-public:
-       enum Type {
-               PEAK,
-               RMS,
-               COUNT
-       };
-
-       AudioPoint ();
-       AudioPoint (cxml::ConstNodePtr node);
-       AudioPoint (AudioPoint const &);
-       AudioPoint& operator= (AudioPoint const &);
-
-       void as_xml (xmlpp::Element *) const;
-
-       float& operator[] (int t) {
-               return _data[t];
-       }
-
-private:
-       float _data[COUNT];
-};
+class Playlist;
 
 class AudioAnalysis : public boost::noncopyable
 {
@@ -88,6 +67,8 @@ public:
 
        void write (boost::filesystem::path);
 
+       float gain_correction (boost::shared_ptr<const Playlist> playlist);
+
 private:
        std::vector<std::vector<AudioPoint> > _data;
        boost::optional<float> _peak;