comparison 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
comparison
equal deleted inserted replaced
1122:b9faee02afa5 1123:133747edd76c
215 void 215 void
216 WritableWaveFileModel::toXml(QTextStream &out, 216 WritableWaveFileModel::toXml(QTextStream &out,
217 QString indent, 217 QString indent,
218 QString extraAttributes) const 218 QString extraAttributes) const
219 { 219 {
220 // We don't actually write the data to XML. We just write a brief 220 // The assumption here is that the underlying wave file has
221 // description of the model. Any code that uses this class is 221 // already been saved somewhere (its location is available through
222 // going to need to be aware that it will have to make separate 222 // getLocation()) and that the code that uses this class is
223 // arrangements for the audio file itself. 223 // dealing with the problem of making sure it remains available.
224 // We just write this out as if it were a normal wave file.
224 225
225 Model::toXml 226 Model::toXml
226 (out, indent, 227 (out, indent,
227 QString("type=\"writablewavefile\" file=\"%1\" channels=\"%2\" %3") 228 QString("type=\"wavefile\" file=\"%1\" subtype=\"writable\" %2")
228 .arg(encodeEntities(m_writer->getPath())) 229 .arg(encodeEntities(m_writer->getPath()))
229 .arg(m_model->getChannelCount()).arg(extraAttributes)); 230 .arg(extraAttributes));
230 } 231 }
231 232