comparison transform/ModelTransformerFactory.cpp @ 389:a1b6d2e33cab

* document library dependencies * remove dependency of transform on audioio
author Chris Cannam
date Thu, 13 Mar 2008 10:12:14 +0000
parents 370aa9714ef5
children 115f60df1e4d
comparison
equal deleted inserted replaced
388:370aa9714ef5 389:a1b6d2e33cab
18 #include "FeatureExtractionModelTransformer.h" 18 #include "FeatureExtractionModelTransformer.h"
19 #include "RealTimeEffectModelTransformer.h" 19 #include "RealTimeEffectModelTransformer.h"
20 20
21 #include "TransformFactory.h" 21 #include "TransformFactory.h"
22 22
23 #include "base/AudioPlaySource.h"
24
23 #include "plugin/FeatureExtractionPluginFactory.h" 25 #include "plugin/FeatureExtractionPluginFactory.h"
24 #include "plugin/RealTimePluginFactory.h" 26 #include "plugin/RealTimePluginFactory.h"
25 #include "plugin/PluginXml.h" 27 #include "plugin/PluginXml.h"
26 28
27 #include "widgets/PluginParameterDialog.h" 29 #include "widgets/PluginParameterDialog.h"
28 30
29 #include "data/model/DenseTimeValueModel.h" 31 #include "data/model/DenseTimeValueModel.h"
30 32
31 #include "vamp-sdk/PluginHostAdapter.h" 33 #include "vamp-sdk/PluginHostAdapter.h"
32
33 #include "audioio/AudioCallbackPlaySource.h" //!!! shouldn't include here
34 34
35 #include <iostream> 35 #include <iostream>
36 #include <set> 36 #include <set>
37 37
38 #include <QRegExp> 38 #include <QRegExp>
69 69
70 ModelTransformer::Input 70 ModelTransformer::Input
71 ModelTransformerFactory::getConfigurationForTransform(Transform &transform, 71 ModelTransformerFactory::getConfigurationForTransform(Transform &transform,
72 const std::vector<Model *> &candidateInputModels, 72 const std::vector<Model *> &candidateInputModels,
73 Model *defaultInputModel, 73 Model *defaultInputModel,
74 AudioCallbackPlaySource *source, 74 AudioPlaySource *source,
75 size_t startFrame, 75 size_t startFrame,
76 size_t duration) 76 size_t duration)
77 { 77 {
78 ModelTransformer::Input input(0); 78 ModelTransformer::Input input(0);
79 79
177 (id, 0, 0, sampleRate, blockSize, channels); 177 (id, 0, 0, sampleRate, blockSize, channels);
178 178
179 plugin = rtp; 179 plugin = rtp;
180 180
181 if (effect && source && rtp) { 181 if (effect && source && rtp) {
182 source->setAuditioningPlugin(rtp); 182 source->setAuditioningEffect(rtp);
183 } 183 }
184 } 184 }
185 185
186 if (plugin) { 186 if (plugin) {
187 187
289 configurationXml = PluginXml(plugin).toXmlString(); 289 configurationXml = PluginXml(plugin).toXmlString();
290 290
291 delete dialog; 291 delete dialog;
292 292
293 if (effect && source) { 293 if (effect && source) {
294 source->setAuditioningPlugin(0); // will delete our plugin 294 source->setAuditioningEffect(0); // will delete our plugin
295 } else { 295 } else {
296 delete plugin; 296 delete plugin;
297 } 297 }
298 } 298 }
299 299