#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
{
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;