All plugin activate() method when required for copy & paste operations. Fixes segfau...
[ardour.git] / libs / ardour / audiosource.cc
index 93e201b8c2843171a86208fd77338b0d0de793a1..f7d6088aec1e3e62ec6f77083c68331c37a2c867 100644 (file)
@@ -118,7 +118,7 @@ AudioSource::get_state ()
 }
 
 int
-AudioSource::set_state (const XMLNode& node, int version)
+AudioSource::set_state (const XMLNode& node, int /*version*/)
 {
        const XMLProperty* prop;
 
@@ -276,6 +276,8 @@ nframes_t
 AudioSource::write (Sample *dst, nframes_t cnt)
 {
        Glib::Mutex::Lock lm (_lock);
+       /* any write makes the fill not removable */
+       _flags = Flag (_flags & ~Removable);
        return write_unlocked (dst, cnt);
 }
 
@@ -900,22 +902,6 @@ AudioSource::truncate_peakfile ()
        }
 }
 
-bool
-AudioSource::file_changed (ustring path)
-{
-       struct stat stat_file;
-       struct stat stat_peak;
-
-       int e1 = stat (path.c_str(), &stat_file);
-       int e2 = stat (peak_path(path).c_str(), &stat_peak);
-
-       if (!e1 && !e2 && stat_file.st_mtime > stat_peak.st_mtime){
-               return true;
-       } else {
-               return false;
-       }
-}
-
 nframes_t
 AudioSource::available_peaks (double zoom_factor) const
 {