# HG changeset patch # User Chris Cannam # Date 1553080784 0 # Node ID ed9cb577eb7cf6b67136f62074e13527533afaaf # Parent 284cb118368e7ac77d30513a9b944a3d37be3c28 Use matching-event search in tone generator diff -r 284cb118368e -r ed9cb577eb7c audio/AudioGenerator.cpp --- a/audio/AudioGenerator.cpp Tue Mar 19 13:06:58 2019 +0000 +++ b/audio/AudioGenerator.cpp Wed Mar 20 11:19:44 2019 +0000 @@ -727,16 +727,17 @@ // away than twice the model resolution, go silent (same // criterion TimeValueLayer uses for ending a discrete curve // segment) - /*!!! todo: restore if (f0 == 0.f) { - EventVector nextPoints = - stvm->getNextPoints(reqStart + m_processingBlockSize); - if (nextPoints.empty() || - nextPoints.begin()->frame > reqStart + 2 * stvm->getResolution()) { + Event nextP; + if (!stvm->getNearestEventMatching(reqStart + m_processingBlockSize, + [](Event) { return true; }, + EventSeries::Forward, + nextP) || + nextP.getFrame() > reqStart + 2 * stvm->getResolution()) { f0 = -1.f; } } - */ + // cerr << "f0 = " << f0 << endl; synth->mix(bufferIndexes, diff -r 284cb118368e -r ed9cb577eb7c framework/Align.cpp --- a/framework/Align.cpp Tue Mar 19 13:06:58 2019 +0000 +++ b/framework/Align.cpp Wed Mar 20 11:19:44 2019 +0000 @@ -288,10 +288,10 @@ m_error = QString("Output of alignment program contained no mappings"); goto done; } -/* + SVCERR << "Align::alignmentProgramFinished: Setting alignment path (" - << path->getAllEvents().size() << " point(s))" << endl; -*/ + << path->getEventCount() << " point(s))" << endl; + alignmentModel->setPathFrom(path); emit alignmentComplete(alignmentModel);