Mercurial > hg > svcore
changeset 924:85879408f665 tonioni
Cancel async layer creation in Tony when selection is changed during it
author | Chris Cannam |
---|---|
date | Mon, 16 Jun 2014 09:28:12 +0100 |
parents | defbe5bc47b7 |
children | 3efc20c59a94 |
files | transform/ModelTransformerFactory.cpp transform/ModelTransformerFactory.h |
diffstat | 2 files changed, 9 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/transform/ModelTransformerFactory.cpp Fri Jun 13 17:39:01 2014 +0100 +++ b/transform/ModelTransformerFactory.cpp Mon Jun 16 09:28:12 2014 +0100 @@ -106,7 +106,6 @@ } else if (RealTimePluginFactory::instanceFor(id)) { RealTimePluginFactory *factory = RealTimePluginFactory::instanceFor(id); - const RealTimePluginDescriptor *desc = factory->getPluginDescriptor(id); size_t sampleRate = inputModel->getSampleRate(); size_t blockSize = 1024; @@ -234,7 +233,7 @@ QString trn = TransformFactory::getInstance()->getTransformFriendlyName (transforms[0].getIdentifier()); - for (int i = 0; i < models.size(); ++i) { + for (int i = 0; i < (int)models.size(); ++i) { if (imn != "") { if (trn != "") { models[i]->setObjectName(tr("%1: %2").arg(imn).arg(trn));
--- a/transform/ModelTransformerFactory.h Fri Jun 13 17:39:01 2014 +0100 +++ b/transform/ModelTransformerFactory.h Mon Jun 16 09:28:12 2014 +0100 @@ -84,7 +84,8 @@ * Return the output model resulting from applying the named * transform to the given input model. The transform may still be * working in the background when the model is returned; check the - * output model's isReady completion status for more details. + * output model's isReady completion status for more details. To + * cancel a background transform, call abandon() on its model. * * If the transform is unknown or the input model is not an * appropriate type for the given transform, or if some other @@ -116,7 +117,8 @@ * (as appropriate). Models will be returned in the same order as * the transforms were given. The plugin may still be working in * the background when the model is returned; check the output - * models' isReady completion statuses for more details. + * models' isReady completion statuses for more details. To cancel + * a background transform, call abandon() on its model. * * If a transform is unknown or the transforms are insufficiently * closely related or the input model is not an appropriate type @@ -130,7 +132,10 @@ * is provided here, its moreModelsAvailable method will be called * when those models become available, and ownership of those * models will be transferred to the handler. Otherwise (if the - * handler is null) any such models will be discarded. + * handler is null) any such models will be discarded. Note that + * calling abandon() on any one of the models returned by + * transformMultiple is sufficient to cancel all background + * transform activity associated with these output models. * * The returned models are owned by the caller and must be deleted * when no longer needed.