Mercurial > hg > tony
comparison src/Analyser.cpp @ 576:335fd9b439a0
Fix failure to use the FlexiNoteLayer for the note layer
author | Chris Cannam |
---|---|
date | Thu, 18 Jul 2019 14:43:41 +0100 |
parents | 5c14493026da |
children |
comparison
equal
deleted
inserted
replaced
575:3c884bad3d44 | 576:335fd9b439a0 |
---|---|
193 | 193 |
194 return completion; | 194 return completion; |
195 } | 195 } |
196 | 196 |
197 void | 197 void |
198 Analyser::layerCompletionChanged() | 198 Analyser::layerCompletionChanged(ModelId) |
199 { | 199 { |
200 if (getInitialAnalysisCompletion() < 100) { | 200 if (getInitialAnalysisCompletion() < 100) { |
201 return; | 201 return; |
202 } | 202 } |
203 | 203 |
470 auto params = pitchLayer->getPlayParameters(); | 470 auto params = pitchLayer->getPlayParameters(); |
471 if (params) { | 471 if (params) { |
472 params->setPlayPan(1); | 472 params->setPlayPan(1); |
473 params->setPlayGain(0.5); | 473 params->setPlayGain(0.5); |
474 } | 474 } |
475 connect(pitchLayer, SIGNAL(modelCompletionChanged()), | 475 connect(pitchLayer, SIGNAL(modelCompletionChanged(ModelId)), |
476 this, SLOT(layerCompletionChanged())); | 476 this, SLOT(layerCompletionChanged(ModelId))); |
477 } | 477 } |
478 | 478 |
479 FlexiNoteLayer *flexiNoteLayer = | 479 FlexiNoteLayer *flexiNoteLayer = |
480 qobject_cast<FlexiNoteLayer *>(m_layers[Notes]); | 480 qobject_cast<FlexiNoteLayer *>(m_layers[Notes]); |
481 if (flexiNoteLayer) { | 481 if (flexiNoteLayer) { |
483 auto params = flexiNoteLayer->getPlayParameters(); | 483 auto params = flexiNoteLayer->getPlayParameters(); |
484 if (params) { | 484 if (params) { |
485 params->setPlayPan(1); | 485 params->setPlayPan(1); |
486 params->setPlayGain(0.5); | 486 params->setPlayGain(0.5); |
487 } | 487 } |
488 connect(flexiNoteLayer, SIGNAL(modelCompletionChanged()), | 488 connect(flexiNoteLayer, SIGNAL(modelCompletionChanged(ModelId)), |
489 this, SLOT(layerCompletionChanged())); | 489 this, SLOT(layerCompletionChanged(ModelId))); |
490 connect(flexiNoteLayer, SIGNAL(reAnalyseRegion(sv_frame_t, sv_frame_t, float, float)), | 490 connect(flexiNoteLayer, SIGNAL(reAnalyseRegion(sv_frame_t, sv_frame_t, float, float)), |
491 this, SLOT(reAnalyseRegion(sv_frame_t, sv_frame_t, float, float))); | 491 this, SLOT(reAnalyseRegion(sv_frame_t, sv_frame_t, float, float))); |
492 connect(flexiNoteLayer, SIGNAL(materialiseReAnalysis()), | 492 connect(flexiNoteLayer, SIGNAL(materialiseReAnalysis()), |
493 this, SLOT(materialiseReAnalysis())); | 493 this, SLOT(materialiseReAnalysis())); |
494 } | 494 } |