# HG changeset patch # User Chris Cannam # Date 1440069737 -3600 # Node ID 133747edd76c133fb3f0afd8524a9890c898a368 # Parent b9faee02afa5fccf2984789303801cf1dcd79ea6 Fix reloading session with recorded audio diff -r b9faee02afa5 -r 133747edd76c data/model/WritableWaveFileModel.cpp --- 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)); }