Logging improvements to allow prettier displays in the server GUI.
[dcpomatic.git] / src / lib / audio_analysis.h
index 478b0e532f0dab46ad263ac7ce5249269c8ec892..0d06e5973eca297bcf6d6e4f1240059ab2b68691 100644 (file)
 #ifndef DCPOMATIC_AUDIO_ANALYSIS_H
 #define DCPOMATIC_AUDIO_ANALYSIS_H
 
-#include <vector>
-#include <list>
-#include <boost/filesystem.hpp>
-#include <boost/optional.hpp>
+#include "dcpomatic_time.h"
+#include "audio_point.h"
 #include <libcxml/cxml.h>
-#include "types.h"
-
-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;
+#include <boost/optional.hpp>
+#include <boost/filesystem.hpp>
+#include <vector>
 
-       float& operator[] (int t) {
-               return _data[t];
-       }
+namespace xmlpp {
+       class Element;
+}
 
-private:
-       float _data[COUNT];
-};
+class Playlist;
 
 class AudioAnalysis : public boost::noncopyable
 {
@@ -85,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;