const correctness.
[ardour.git] / libs / ardour / midi_source.cc
index 2e549b6fc6988cf7a7c76d41276643c6fdd29e13..36cd36795ab66c7fd5e4d9a39a04bcce2e6fc1fe 100644 (file)
@@ -288,9 +288,19 @@ MidiSource::clone (Evoral::MusicalTime begin, Evoral::MusicalTime end)
 void
 MidiSource::session_saved()
 {
+        /* this writes a copy of the data to disk. 
+           XXX do we need to do this every time?
+        */
+
        flush_midi();
+        cerr << name() << " @ " << this << " length at save = " << _length_beats << endl;
+
+#if 0 // old style: clone the source if necessary on every session save
+      // and switch to the new source
 
        if (_model && _model->edited()) {
+                cerr << "Model exists and is edited\n";
+
                boost::shared_ptr<MidiSource> newsrc = clone ();
 
                 if (newsrc) {
@@ -298,6 +308,7 @@ MidiSource::session_saved()
                         Switched (newsrc); /* EMIT SIGNAL */
                 }
        }
+#endif
 }
 
 void