comparison transform/TransformFactory.cpp @ 58:f7cb156508cc

* Avoid showing input selection and channel selection for generator plugins
author Chris Cannam
date Tue, 17 Oct 2006 11:41:56 +0000
parents ca1e3f5657d5
children e200055fe80b
comparison
equal deleted inserted replaced
57:684b17ff7fee 58:f7cb156508cc
478 478
479 Vamp::PluginBase *plugin = 0; 479 Vamp::PluginBase *plugin = 0;
480 480
481 bool frequency = false; 481 bool frequency = false;
482 bool effect = false; 482 bool effect = false;
483 bool generator = false;
483 484
484 if (FeatureExtractionPluginFactory::instanceFor(id)) { 485 if (FeatureExtractionPluginFactory::instanceFor(id)) {
485 486
486 Vamp::Plugin *vp = 487 Vamp::Plugin *vp =
487 FeatureExtractionPluginFactory::instanceFor(id)->instantiatePlugin 488 FeatureExtractionPluginFactory::instanceFor(id)->instantiatePlugin
513 desc->audioOutputPortCount > 0 && 514 desc->audioOutputPortCount > 0 &&
514 !desc->isSynth) { 515 !desc->isSynth) {
515 effect = true; 516 effect = true;
516 } 517 }
517 518
519 if (desc->audioInputPortCount == 0) {
520 generator = true;
521 }
522
518 if (output != "A") { 523 if (output != "A") {
519 int outputNo = output.toInt(); 524 int outputNo = output.toInt();
520 if (outputNo >= 0 && outputNo < desc->controlOutputPortCount) { 525 if (outputNo >= 0 && outputNo < desc->controlOutputPortCount) {
521 outputLabel = desc->controlOutputPortNames[outputNo].c_str(); 526 outputLabel = desc->controlOutputPortNames[outputNo].c_str();
522 } 527 }
566 571
567 int defaultChannel = context.channel; 572 int defaultChannel = context.channel;
568 573
569 PluginParameterDialog *dialog = new PluginParameterDialog(plugin); 574 PluginParameterDialog *dialog = new PluginParameterDialog(plugin);
570 575
571 if (candidateModelNames.size() > 1) { 576 if (candidateModelNames.size() > 1 && !generator) {
572 dialog->setCandidateInputModels(candidateModelNames); 577 dialog->setCandidateInputModels(candidateModelNames);
573 } 578 }
574 579
575 dialog->setChannelArrangement(sourceChannels, targetChannels, 580 if (targetChannels > 0) {
576 defaultChannel); 581 dialog->setChannelArrangement(sourceChannels, targetChannels,
582 defaultChannel);
583 }
577 584
578 dialog->setOutputLabel(outputLabel); 585 dialog->setOutputLabel(outputLabel);
579 586
580 dialog->setShowProcessingOptions(true, frequency); 587 dialog->setShowProcessingOptions(true, frequency);
581 588