Remove left-over file.
[dcpomatic.git] / src / lib / audio_analysis.cc
index b29ed1707d0e01d8d8aaa08c7ab0a27019b0c446..bc59bcccaa56539a6f8a4a1728c2d9e50e9e1a50 100644 (file)
@@ -31,6 +31,8 @@ using std::ofstream;
 using std::ifstream;
 using std::vector;
 using std::cout;
+using std::max;
+using std::list;
 
 AudioPoint::AudioPoint ()
 {
@@ -46,6 +48,27 @@ AudioPoint::AudioPoint (istream& s)
        }
 }
 
+AudioPoint::AudioPoint (AudioPoint const & other)
+{
+       for (int i = 0; i < COUNT; ++i) {
+               _data[i] = other._data[i];
+       }
+}
+
+AudioPoint &
+AudioPoint::operator= (AudioPoint const & other)
+{
+       if (this == &other) {
+               return *this;
+       }
+       
+       for (int i = 0; i < COUNT; ++i) {
+               _data[i] = other._data[i];
+       }
+
+       return *this;
+}
+
 void
 AudioPoint::write (ostream& s) const
 {
@@ -60,9 +83,9 @@ AudioAnalysis::AudioAnalysis (int channels)
        _data.resize (channels);
 }
 
-AudioAnalysis::AudioAnalysis (string filename)
+AudioAnalysis::AudioAnalysis (boost::filesystem::path filename)
 {
-       ifstream f (filename.c_str ());
+       ifstream f (filename.string().c_str ());
 
        int channels;
        f >> channels;
@@ -105,10 +128,10 @@ AudioAnalysis::points (int c) const
 }
 
 void
-AudioAnalysis::write (string filename)
+AudioAnalysis::write (boost::filesystem::path filename)
 {
-       string tmp = filename + ".tmp";
-       
+       string tmp = filename.string() + ".tmp";
+
        ofstream f (tmp.c_str ());
        f << _data.size() << "\n";
        for (vector<vector<AudioPoint> >::iterator i = _data.begin(); i != _data.end(); ++i) {