comparison document/Document.cpp @ 184:ebd906049fb6

* Change WaveFileModel API from getValues(start,end) to getData(start,count). It's much less error-prone to pass in frame counts instead of start/end locations. Should have done this ages ago. This closes #1794563. * Add option to apply a transform to only the selection region, instead of the whole audio. * (to make the above work properly) Add start frame offset to wave models
author Chris Cannam
date Mon, 01 Oct 2007 13:48:38 +0000
parents 98ba77e0d897
children 29c356da4ae4
comparison
equal deleted inserted replaced
183:3fdaf3157eea 184:ebd906049fb6
811 if (writeModel) { 811 if (writeModel) {
812 i->first->toXml(out, indent + " "); 812 i->first->toXml(out, indent + " ");
813 } 813 }
814 814
815 if (haveDerivation) { 815 if (haveDerivation) {
816
817 QString extentsAttributes;
818 if (rec.context.startFrame != 0 ||
819 rec.context.duration != 0) {
820 extentsAttributes = QString("startFrame=\"%1\" duration=\"%2\" ")
821 .arg(rec.context.startFrame)
822 .arg(rec.context.duration);
823 }
816 824
817 //!!! stream the rest of the execution context in both directions (i.e. not just channel)
818
819 out << indent; 825 out << indent;
820 out << QString(" <derivation source=\"%1\" model=\"%2\" channel=\"%3\" domain=\"%4\" stepSize=\"%5\" blockSize=\"%6\" windowType=\"%7\" transform=\"%8\"") 826 out << QString(" <derivation source=\"%1\" model=\"%2\" channel=\"%3\" domain=\"%4\" stepSize=\"%5\" blockSize=\"%6\" %7windowType=\"%8\" transform=\"%9\"")
821 .arg(XmlExportable::getObjectExportId(rec.source)) 827 .arg(XmlExportable::getObjectExportId(rec.source))
822 .arg(XmlExportable::getObjectExportId(i->first)) 828 .arg(XmlExportable::getObjectExportId(i->first))
823 .arg(rec.context.channel) 829 .arg(rec.context.channel)
824 .arg(rec.context.domain) 830 .arg(rec.context.domain)
825 .arg(rec.context.stepSize) 831 .arg(rec.context.stepSize)
826 .arg(rec.context.blockSize) 832 .arg(rec.context.blockSize)
833 .arg(extentsAttributes)
827 .arg(int(rec.context.windowType)) 834 .arg(int(rec.context.windowType))
828 .arg(XmlExportable::encodeEntities(rec.transform)); 835 .arg(XmlExportable::encodeEntities(rec.transform));
829 836
830 if (rec.configurationXml != "") { 837 if (rec.configurationXml != "") {
831 out << ">\n " + indent + rec.configurationXml 838 out << ">\n " + indent + rec.configurationXml