}
}
+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
{
_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;
}
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) {