Mercurial > hg > svapp
comparison framework/TransformUserConfigurator.cpp @ 232:025065fd5b49
Merge from debug-output branch
author | Chris Cannam |
---|---|
date | Tue, 14 Jun 2011 14:49:22 +0100 |
parents | 8c13e8219903 |
children | 8aace2d9f1c2 |
comparison
equal
deleted
inserted
replaced
219:85e59c901de9 | 232:025065fd5b49 |
---|---|
35 Vamp::PluginBase *plugin, | 35 Vamp::PluginBase *plugin, |
36 int &minChannels, int &maxChannels) | 36 int &minChannels, int &maxChannels) |
37 { | 37 { |
38 if (plugin && plugin->getType() == "Feature Extraction Plugin") { | 38 if (plugin && plugin->getType() == "Feature Extraction Plugin") { |
39 Vamp::Plugin *vp = static_cast<Vamp::Plugin *>(plugin); | 39 Vamp::Plugin *vp = static_cast<Vamp::Plugin *>(plugin); |
40 std::cerr << "TransformUserConfigurator::getChannelRange: is a VP" << std::endl; | 40 DEBUG << "TransformUserConfigurator::getChannelRange: is a VP" << endl; |
41 minChannels = vp->getMinChannelCount(); | 41 minChannels = vp->getMinChannelCount(); |
42 maxChannels = vp->getMaxChannelCount(); | 42 maxChannels = vp->getMaxChannelCount(); |
43 return true; | 43 return true; |
44 } else { | 44 } else { |
45 std::cerr << "TransformUserConfigurator::getChannelRange: is not a VP" << std::endl; | 45 DEBUG << "TransformUserConfigurator::getChannelRange: is not a VP" << endl; |
46 return TransformFactory::getInstance()-> | 46 return TransformFactory::getInstance()-> |
47 getTransformChannelRange(identifier, minChannels, maxChannels); | 47 getTransformChannelRange(identifier, minChannels, maxChannels); |
48 } | 48 } |
49 } | 49 } |
50 | 50 |
79 frequency = (vp->getInputDomain() == Vamp::Plugin::FrequencyDomain); | 79 frequency = (vp->getInputDomain() == Vamp::Plugin::FrequencyDomain); |
80 | 80 |
81 std::vector<Vamp::Plugin::OutputDescriptor> od = | 81 std::vector<Vamp::Plugin::OutputDescriptor> od = |
82 vp->getOutputDescriptors(); | 82 vp->getOutputDescriptors(); |
83 | 83 |
84 std::cerr << "configure: looking for output: " << output.toStdString() << std::endl; | 84 std::cerr << "configure: looking for output: " << output << std::endl; |
85 | 85 |
86 if (od.size() > 1) { | 86 if (od.size() > 1) { |
87 for (size_t i = 0; i < od.size(); ++i) { | 87 for (size_t i = 0; i < od.size(); ++i) { |
88 if (od[i].identifier == output.toStdString()) { | 88 if (od[i].identifier == output.toStdString()) { |
89 outputLabel = od[i].name.c_str(); | 89 outputLabel = od[i].name.c_str(); |
117 | 117 |
118 RealTimePluginInstance *rtp = | 118 RealTimePluginInstance *rtp = |
119 static_cast<RealTimePluginInstance *>(plugin); | 119 static_cast<RealTimePluginInstance *>(plugin); |
120 | 120 |
121 if (effect && source) { | 121 if (effect && source) { |
122 std::cerr << "Setting auditioning effect" << std::endl; | 122 DEBUG << "Setting auditioning effect" << endl; |
123 source->setAuditioningEffect(rtp); | 123 source->setAuditioningEffect(rtp); |
124 } | 124 } |
125 } | 125 } |
126 | 126 |
127 int sourceChannels = 1; | 127 int sourceChannels = 1; |
171 | 171 |
172 QString selectedInput = dialog->getInputModel(); | 172 QString selectedInput = dialog->getInputModel(); |
173 if (selectedInput != "") { | 173 if (selectedInput != "") { |
174 if (modelMap.contains(selectedInput)) { | 174 if (modelMap.contains(selectedInput)) { |
175 inputModel = modelMap.value(selectedInput); | 175 inputModel = modelMap.value(selectedInput); |
176 std::cerr << "Found selected input \"" << selectedInput.toStdString() << "\" in model map, result is " << inputModel << std::endl; | 176 std::cerr << "Found selected input \"" << selectedInput << "\" in model map, result is " << inputModel << std::endl; |
177 } else { | 177 } else { |
178 std::cerr << "Failed to find selected input \"" << selectedInput.toStdString() << "\" in model map" << std::endl; | 178 std::cerr << "Failed to find selected input \"" << selectedInput << "\" in model map" << std::endl; |
179 } | 179 } |
180 } else { | 180 } else { |
181 std::cerr << "Selected input empty: \"" << selectedInput.toStdString() << "\"" << std::endl; | 181 std::cerr << "Selected input empty: \"" << selectedInput << "\"" << std::endl; |
182 } | 182 } |
183 | 183 |
184 // Write parameters back to transform object | 184 // Write parameters back to transform object |
185 TransformFactory::getInstance()-> | 185 TransformFactory::getInstance()-> |
186 setParametersFromPlugin(transform, plugin); | 186 setParametersFromPlugin(transform, plugin); |