comparison document/SVFileReader.cpp @ 30:56e1d4242bb4

* save and restore step/blocksize etc
author Chris Cannam
date Wed, 20 Sep 2006 16:02:42 +0000
parents e764bbf2b090
children 5f9fdca0c7d8
comparison
equal deleted inserted replaced
29:660a973c157a 30:56e1d4242bb4
260 } else if (name == "derivation") { 260 } else if (name == "derivation") {
261 261
262 if (m_currentDerivedModel) { 262 if (m_currentDerivedModel) {
263 m_document->addDerivedModel(m_currentTransform, 263 m_document->addDerivedModel(m_currentTransform,
264 m_document->getMainModel(), //!!! 264 m_document->getMainModel(), //!!!
265 m_currentTransformChannel, 265 m_currentTransformContext,
266 m_currentDerivedModel, 266 m_currentDerivedModel,
267 m_currentTransformConfiguration); 267 m_currentTransformConfiguration);
268 m_addedModels.insert(m_currentDerivedModel); 268 m_addedModels.insert(m_currentDerivedModel);
269 m_currentDerivedModel = 0; 269 m_currentDerivedModel = 0;
270 m_currentTransform = ""; 270 m_currentTransform = "";
895 895
896 m_currentDerivedModel = m_models[modelId]; 896 m_currentDerivedModel = m_models[modelId];
897 m_currentTransform = transform; 897 m_currentTransform = transform;
898 m_currentTransformConfiguration = ""; 898 m_currentTransformConfiguration = "";
899 899
900 m_currentTransformContext = PluginTransform::ExecutionContext();
901
900 bool ok = false; 902 bool ok = false;
901 int channel = attributes.value("channel").trimmed().toInt(&ok); 903 int channel = attributes.value("channel").trimmed().toInt(&ok);
902 if (ok) m_currentTransformChannel = channel; 904 if (ok) m_currentTransformContext.channel = channel;
903 else m_currentTransformChannel = -1; 905
906 int domain = attributes.value("domain").trimmed().toInt(&ok);
907 if (ok) m_currentTransformContext.domain = Vamp::Plugin::InputDomain(domain);
908
909 int stepSize = attributes.value("stepSize").trimmed().toInt(&ok);
910 if (ok) m_currentTransformContext.stepSize = stepSize;
911
912 int blockSize = attributes.value("blockSize").trimmed().toInt(&ok);
913 if (ok) m_currentTransformContext.blockSize = blockSize;
914
915 int windowType = attributes.value("windowType").trimmed().toInt(&ok);
916 if (ok) m_currentTransformContext.windowType = WindowType(windowType);
904 917
905 } else { 918 } else {
906 std::cerr << "WARNING: SV-XML: Unknown derived model " << modelId 919 std::cerr << "WARNING: SV-XML: Unknown derived model " << modelId
907 << " for transform \"" << transform.toLocal8Bit().data() << "\"" 920 << " for transform \"" << transform.toLocal8Bit().data() << "\""
908 << std::endl; 921 << std::endl;