Mercurial > hg > svcore
changeset 1881:b504df98c3be
Ensure completion on output model is started at zero, so if it's checked before the input model has become ready and the transform has begun, it is not accidentally reported as complete (affected re-aligning models in Sonic Lineup when replacing the session)
author | Chris Cannam |
---|---|
date | Fri, 26 Jun 2020 11:45:39 +0100 |
parents | 5671836cdac7 |
children | 38be2fa29efd |
files | transform/FeatureExtractionModelTransformer.cpp |
diffstat | 1 files changed, 18 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/transform/FeatureExtractionModelTransformer.cpp Thu Jun 25 12:20:20 2020 +0100 +++ b/transform/FeatureExtractionModelTransformer.cpp Fri Jun 26 11:45:39 2020 +0100 @@ -249,6 +249,7 @@ for (int j = 0; in_range_for(m_transforms, j); ++j) { createOutputModels(j); + setCompletion(j, 0); } m_outputMutex.lock(); @@ -360,6 +361,9 @@ // Anything with no value and no duration is an instant + SVDEBUG << "FeatureExtractionModelTransformer::createOutputModels: " + << "creating a SparseOneDimensionalModel" << endl; + out = std::make_shared<SparseOneDimensionalModel> (modelRate, modelResolution, false); @@ -419,7 +423,8 @@ bool flexi = settings.value("use-flexi-note-model", false).toBool(); settings.endGroup(); - SVCERR << "flexi = " << flexi << endl; + SVDEBUG << "FeatureExtractionModelTransformer::createOutputModels: " + << "creating a NoteModel (flexi = " << flexi << ")" << endl; NoteModel *model; if (haveExtents) { @@ -436,6 +441,9 @@ } else { + SVDEBUG << "FeatureExtractionModelTransformer::createOutputModels: " + << "creating a RegionModel" << endl; + RegionModel *model; if (haveExtents) { model = new RegionModel @@ -481,6 +489,11 @@ m_needAdditionalModels[n] = true; } + SVDEBUG << "FeatureExtractionModelTransformer::createOutputModels: " + << "creating a SparseTimeValueModel " + << "(additional models to come? -> " + << m_needAdditionalModels[n] << ")" << endl; + SparseTimeValueModel *model; if (haveExtents) { model = new SparseTimeValueModel @@ -504,6 +517,10 @@ // has a fixed sample rate and more than one value per result // must be a dense 3D model. + SVDEBUG << "FeatureExtractionModelTransformer::createOutputModels: " + << "creating a BasicCompressedDenseThreeDimensionalModel" + << endl; + auto model = new BasicCompressedDenseThreeDimensionalModel (modelRate, modelResolution, binCount, false);