comparison transform/TransformFactory.cpp @ 28:b5f55ea61bb8

* stepsize/blocksize from plugin dialog actually working, though with some puzzlement
author Chris Cannam
date Wed, 20 Sep 2006 14:50:40 +0000
parents 61259228d029
children 544ab25d2372
comparison
equal deleted inserted replaced
27:61259228d029 28:b5f55ea61bb8
24 24
25 #include "widgets/PluginParameterDialog.h" 25 #include "widgets/PluginParameterDialog.h"
26 26
27 #include "data/model/DenseTimeValueModel.h" 27 #include "data/model/DenseTimeValueModel.h"
28 28
29 #include "vamp-sdk/PluginHostAdapter.h"
30
29 #include <iostream> 31 #include <iostream>
30 #include <set> 32 #include <set>
31 33
32 #include <QRegExp> 34 #include <QRegExp>
33 35
336 bool 338 bool
337 TransformFactory::getChannelRange(TransformName name, Vamp::PluginBase *plugin, 339 TransformFactory::getChannelRange(TransformName name, Vamp::PluginBase *plugin,
338 int &minChannels, int &maxChannels) 340 int &minChannels, int &maxChannels)
339 { 341 {
340 Vamp::Plugin *vp = 0; 342 Vamp::Plugin *vp = 0;
341 if ((vp = dynamic_cast<Vamp::Plugin *>(plugin))) { 343 if ((vp = dynamic_cast<Vamp::Plugin *>(plugin)) ||
344 (vp = dynamic_cast<Vamp::PluginHostAdapter *>(plugin))) {
342 minChannels = vp->getMinChannelCount(); 345 minChannels = vp->getMinChannelCount();
343 maxChannels = vp->getMaxChannelCount(); 346 maxChannels = vp->getMaxChannelCount();
344 return true; 347 return true;
345 } else { 348 } else {
346 return getTransformChannelRange(name, minChannels, maxChannels); 349 return getTransformChannelRange(name, minChannels, maxChannels);