# HG changeset patch # User Chris Cannam # Date 1158768162 0 # Node ID 56e1d4242bb4524e24bce33f476e4916cc7aa173 # Parent 660a973c157a543c72a70da96db604da77852b5a * save and restore step/blocksize etc diff -r 660a973c157a -r 56e1d4242bb4 document/Document.cpp --- a/document/Document.cpp Wed Sep 20 15:47:16 2006 +0000 +++ b/document/Document.cpp Wed Sep 20 16:02:42 2006 +0000 @@ -698,10 +698,14 @@ //!!! stream the rest of the execution context in both directions (i.e. not just channel) out << indent; - out << QString(" first)) .arg(rec.context.channel) + .arg(rec.context.domain) + .arg(rec.context.stepSize) + .arg(rec.context.blockSize) + .arg(int(rec.context.windowType)) .arg(XmlExportable::encodeEntities(rec.transform)); if (rec.configurationXml != "") { diff -r 660a973c157a -r 56e1d4242bb4 document/SVFileReader.cpp --- a/document/SVFileReader.cpp Wed Sep 20 15:47:16 2006 +0000 +++ b/document/SVFileReader.cpp Wed Sep 20 16:02:42 2006 +0000 @@ -262,7 +262,7 @@ if (m_currentDerivedModel) { m_document->addDerivedModel(m_currentTransform, m_document->getMainModel(), //!!! - m_currentTransformChannel, + m_currentTransformContext, m_currentDerivedModel, m_currentTransformConfiguration); m_addedModels.insert(m_currentDerivedModel); @@ -897,10 +897,23 @@ m_currentTransform = transform; m_currentTransformConfiguration = ""; + m_currentTransformContext = PluginTransform::ExecutionContext(); + bool ok = false; int channel = attributes.value("channel").trimmed().toInt(&ok); - if (ok) m_currentTransformChannel = channel; - else m_currentTransformChannel = -1; + if (ok) m_currentTransformContext.channel = channel; + + int domain = attributes.value("domain").trimmed().toInt(&ok); + if (ok) m_currentTransformContext.domain = Vamp::Plugin::InputDomain(domain); + + int stepSize = attributes.value("stepSize").trimmed().toInt(&ok); + if (ok) m_currentTransformContext.stepSize = stepSize; + + int blockSize = attributes.value("blockSize").trimmed().toInt(&ok); + if (ok) m_currentTransformContext.blockSize = blockSize; + + int windowType = attributes.value("windowType").trimmed().toInt(&ok); + if (ok) m_currentTransformContext.windowType = WindowType(windowType); } else { std::cerr << "WARNING: SV-XML: Unknown derived model " << modelId diff -r 660a973c157a -r 56e1d4242bb4 document/SVFileReader.h --- a/document/SVFileReader.h Wed Sep 20 15:47:16 2006 +0000 +++ b/document/SVFileReader.h Wed Sep 20 16:02:42 2006 +0000 @@ -18,6 +18,7 @@ #include "layer/LayerFactory.h" #include "transform/Transform.h" +#include "transform/PluginTransform.h" #include @@ -93,7 +94,7 @@ Model *m_currentDerivedModel; PlayParameters *m_currentPlayParameters; QString m_currentTransform; - int m_currentTransformChannel; + PluginTransform::ExecutionContext m_currentTransformContext; QString m_currentTransformConfiguration; QString m_datasetSeparator; bool m_inRow;