Mercurial > hg > svapp
comparison framework/TransformUserConfigurator.cpp @ 739:ddfac001b543 audio-source-refactor
Introduce EffectWrapper for the auditioning effect
| author | Chris Cannam |
|---|---|
| date | Thu, 19 Mar 2020 16:14:02 +0000 |
| parents | 7540733f5480 |
| children | 846970dbef17 |
comparison
equal
deleted
inserted
replaced
| 738:48001ed9143b | 739:ddfac001b543 |
|---|---|
| 107 RealTimePluginInstance *rtp = | 107 RealTimePluginInstance *rtp = |
| 108 static_cast<RealTimePluginInstance *>(plugin); | 108 static_cast<RealTimePluginInstance *>(plugin); |
| 109 | 109 |
| 110 if (effect && source) { | 110 if (effect && source) { |
| 111 SVDEBUG << "Setting auditioning effect" << endl; | 111 SVDEBUG << "Setting auditioning effect" << endl; |
| 112 source->setAuditioningEffect(rtp); | 112 //!!! This requires a shared_ptr, but we don't manage our |
| 113 //!!! plugin using shared_ptrs yet. Do this as a stopgap. | |
| 114 std::shared_ptr<Auditionable> auditionable | |
| 115 (std::make_shared<bool>(true), rtp); | |
| 116 source->setAuditioningEffect(auditionable); | |
| 113 } | 117 } |
| 114 | 118 |
| 115 } else { | 119 } else { |
| 116 | 120 |
| 117 Vamp::Plugin *vp = static_cast<Vamp::Plugin *>(plugin); | 121 Vamp::Plugin *vp = static_cast<Vamp::Plugin *>(plugin); |
| 227 transform.setWindowType(windowType); | 231 transform.setWindowType(windowType); |
| 228 | 232 |
| 229 delete dialog; | 233 delete dialog; |
| 230 | 234 |
| 231 if (effect && source) { | 235 if (effect && source) { |
| 232 source->setAuditioningEffect(nullptr); | 236 source->setAuditioningEffect({}); |
| 233 } | 237 } |
| 234 | 238 |
| 235 return ok; | 239 return ok; |
| 236 } | 240 } |
| 237 | 241 |
