Mercurial > hg > svapp
comparison framework/Align.cpp @ 698:3e34eeb92647
Debug tidy
author | Chris Cannam |
---|---|
date | Thu, 01 Aug 2019 13:48:23 +0100 |
parents | c8ba09756eff |
children | 46ab91e26bfe |
comparison
equal
deleted
inserted
replaced
697:a27a6113fdd7 | 698:3e34eeb92647 |
---|---|
227 preparatoryModel->setCompletion(0); | 227 preparatoryModel->setCompletion(0); |
228 rec.preparatory = preparatoryModelId; | 228 rec.preparatory = preparatoryModelId; |
229 alignmentModel->setPathFrom(rec.preparatory); | 229 alignmentModel->setPathFrom(rec.preparatory); |
230 | 230 |
231 m_pendingTuningDiffs[tuningDiffOutputModelId] = rec; | 231 m_pendingTuningDiffs[tuningDiffOutputModelId] = rec; |
232 | |
233 SVDEBUG << "Align::alignModelViaTransform: Made a note of pending tuning diff output model id " << tuningDiffOutputModelId << " with input " << rec.input << ", alignment model " << rec.alignment << ", preparatory model " << rec.preparatory << endl; | |
232 } | 234 } |
233 | 235 |
234 return true; | 236 return true; |
235 } | 237 } |
236 | 238 |
239 { | 241 { |
240 QMutexLocker locker(&m_mutex); | 242 QMutexLocker locker(&m_mutex); |
241 | 243 |
242 if (m_pendingTuningDiffs.find(tuningDiffOutputModelId) == | 244 if (m_pendingTuningDiffs.find(tuningDiffOutputModelId) == |
243 m_pendingTuningDiffs.end()) { | 245 m_pendingTuningDiffs.end()) { |
244 SVCERR << "ERROR: Align::tuningDifferenceCompletionChanged: Model " | 246 SVDEBUG << "NOTE: Align::tuningDifferenceCompletionChanged: Model " |
245 << tuningDiffOutputModelId | 247 << tuningDiffOutputModelId |
246 << " not found in pending tuning diff map!" << endl; | 248 << " not found in pending tuning diff map, probably " |
249 << "completed already" << endl; | |
247 return; | 250 return; |
248 } | 251 } |
249 | 252 |
250 auto tuningDiffOutputModel = | 253 auto tuningDiffOutputModel = |
251 ModelById::getAs<SparseTimeValueModel>(tuningDiffOutputModelId); | 254 ModelById::getAs<SparseTimeValueModel>(tuningDiffOutputModelId); |
288 tuningFrequency = tuningDiffOutputModel->getAllEvents()[0].getValue(); | 291 tuningFrequency = tuningDiffOutputModel->getAllEvents()[0].getValue(); |
289 SVCERR << "Align::tuningDifferenceCompletionChanged: Reported tuning frequency = " << tuningFrequency << endl; | 292 SVCERR << "Align::tuningDifferenceCompletionChanged: Reported tuning frequency = " << tuningFrequency << endl; |
290 } else { | 293 } else { |
291 SVCERR << "Align::tuningDifferenceCompletionChanged: No tuning frequency reported" << endl; | 294 SVCERR << "Align::tuningDifferenceCompletionChanged: No tuning frequency reported" << endl; |
292 } | 295 } |
293 | 296 |
294 ModelById::release(tuningDiffOutputModel); | 297 ModelById::release(tuningDiffOutputModel); |
295 | 298 |
296 alignmentModel->setPathFrom({}); // replace preparatoryModel | 299 alignmentModel->setPathFrom({}); // replace preparatoryModel |
297 ModelById::release(rec.preparatory); | 300 ModelById::release(rec.preparatory); |
298 rec.preparatory = {}; | 301 rec.preparatory = {}; |
299 | 302 |
300 m_pendingTuningDiffs.erase(tuningDiffOutputModelId); | 303 m_pendingTuningDiffs.erase(tuningDiffOutputModelId); |
304 | |
305 SVDEBUG << "Align::tuningDifferenceCompletionChanged: Erasing model " | |
306 << tuningDiffOutputModelId << " from pending tuning diffs and " | |
307 << "launching the alignment phase for alignment model " | |
308 << rec.alignment << " with tuning frequency " | |
309 << tuningFrequency << endl; | |
301 | 310 |
302 beginTransformDrivenAlignment | 311 beginTransformDrivenAlignment |
303 (rec.input, rec.alignment, tuningFrequency); | 312 (rec.input, rec.alignment, tuningFrequency); |
304 } | 313 } |
305 | 314 |