Mercurial > hg > svapp
comparison framework/TransformUserConfigurator.cpp @ 529:7a3fa603190e 3.0-integration
Restore native-Vamp factory and make the choice between Piper and Native a preference
author | Chris Cannam |
---|---|
date | Fri, 21 Oct 2016 11:49:27 +0100 |
parents | 167fe01d5631 |
children | 36aa947ec962 |
comparison
equal
deleted
inserted
replaced
528:4826330c4f97 | 529:7a3fa603190e |
---|---|
78 bool effect = false; | 78 bool effect = false; |
79 bool generator = false; | 79 bool generator = false; |
80 | 80 |
81 if (!plugin) return false; | 81 if (!plugin) return false; |
82 | 82 |
83 if (FeatureExtractionPluginFactory::instanceFor(id)) { | 83 if (RealTimePluginFactory::instanceFor(id)) { |
84 | |
85 RealTimePluginFactory *factory = RealTimePluginFactory::instanceFor(id); | |
86 const RealTimePluginDescriptor *desc = factory->getPluginDescriptor(id); | |
87 | |
88 if (desc->audioInputPortCount > 0 && | |
89 desc->audioOutputPortCount > 0 && | |
90 !desc->isSynth) { | |
91 effect = true; | |
92 } | |
93 | |
94 if (desc->audioInputPortCount == 0) { | |
95 generator = true; | |
96 } | |
97 | |
98 if (output != "A") { | |
99 int outputNo = output.toInt(); | |
100 if (outputNo >= 0 && outputNo < int(desc->controlOutputPortCount)) { | |
101 outputLabel = desc->controlOutputPortNames[outputNo].c_str(); | |
102 } | |
103 } | |
104 | |
105 RealTimePluginInstance *rtp = | |
106 static_cast<RealTimePluginInstance *>(plugin); | |
107 | |
108 if (effect && source) { | |
109 SVDEBUG << "Setting auditioning effect" << endl; | |
110 source->setAuditioningEffect(rtp); | |
111 } | |
112 | |
113 } else { | |
84 | 114 |
85 Vamp::Plugin *vp = static_cast<Vamp::Plugin *>(plugin); | 115 Vamp::Plugin *vp = static_cast<Vamp::Plugin *>(plugin); |
86 | 116 |
87 frequency = (vp->getInputDomain() == Vamp::Plugin::FrequencyDomain); | 117 frequency = (vp->getInputDomain() == Vamp::Plugin::FrequencyDomain); |
88 | 118 |
98 outputDescription = od[i].description.c_str(); | 128 outputDescription = od[i].description.c_str(); |
99 break; | 129 break; |
100 } | 130 } |
101 } | 131 } |
102 } | 132 } |
103 | 133 } |
104 } else if (RealTimePluginFactory::instanceFor(id)) { | 134 |
105 | |
106 RealTimePluginFactory *factory = RealTimePluginFactory::instanceFor(id); | |
107 const RealTimePluginDescriptor *desc = factory->getPluginDescriptor(id); | |
108 | |
109 if (desc->audioInputPortCount > 0 && | |
110 desc->audioOutputPortCount > 0 && | |
111 !desc->isSynth) { | |
112 effect = true; | |
113 } | |
114 | |
115 if (desc->audioInputPortCount == 0) { | |
116 generator = true; | |
117 } | |
118 | |
119 if (output != "A") { | |
120 int outputNo = output.toInt(); | |
121 if (outputNo >= 0 && outputNo < int(desc->controlOutputPortCount)) { | |
122 outputLabel = desc->controlOutputPortNames[outputNo].c_str(); | |
123 } | |
124 } | |
125 | |
126 RealTimePluginInstance *rtp = | |
127 static_cast<RealTimePluginInstance *>(plugin); | |
128 | |
129 if (effect && source) { | |
130 SVDEBUG << "Setting auditioning effect" << endl; | |
131 source->setAuditioningEffect(rtp); | |
132 } | |
133 } | |
134 | |
135 int sourceChannels = 1; | 135 int sourceChannels = 1; |
136 if (dynamic_cast<DenseTimeValueModel *>(inputModel)) { | 136 if (dynamic_cast<DenseTimeValueModel *>(inputModel)) { |
137 sourceChannels = dynamic_cast<DenseTimeValueModel *>(inputModel) | 137 sourceChannels = dynamic_cast<DenseTimeValueModel *>(inputModel) |
138 ->getChannelCount(); | 138 ->getChannelCount(); |
139 } | 139 } |