diff data/model/WritableWaveFileModel.cpp @ 1123:133747edd76c recording

Fix reloading session with recorded audio
author Chris Cannam
date Thu, 20 Aug 2015 12:22:17 +0100
parents b9faee02afa5
children efea94b04d5a
line wrap: on
line diff
--- a/data/model/WritableWaveFileModel.cpp	Wed Aug 19 17:03:31 2015 +0100
+++ b/data/model/WritableWaveFileModel.cpp	Thu Aug 20 12:22:17 2015 +0100
@@ -217,15 +217,16 @@
                              QString indent,
                              QString extraAttributes) const
 {
-    // We don't actually write the data to XML.  We just write a brief
-    // description of the model.  Any code that uses this class is
-    // going to need to be aware that it will have to make separate
-    // arrangements for the audio file itself.
+    // The assumption here is that the underlying wave file has
+    // already been saved somewhere (its location is available through
+    // getLocation()) and that the code that uses this class is
+    // dealing with the problem of making sure it remains available.
+    // We just write this out as if it were a normal wave file.
 
     Model::toXml
         (out, indent,
-         QString("type=\"writablewavefile\" file=\"%1\" channels=\"%2\" %3")
+         QString("type=\"wavefile\" file=\"%1\" subtype=\"writable\" %2")
          .arg(encodeEntities(m_writer->getPath()))
-         .arg(m_model->getChannelCount()).arg(extraAttributes));
+         .arg(extraAttributes));
 }