Mercurial > hg > svcore
comparison transform/FeatureExtractionModelTransformer.cpp @ 1225:ba16388b937d piper
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 | 5a1198083d9a |
children | 91ff08313375 |
comparison
equal
deleted
inserted
replaced
1224:ab050519c4ba | 1225:ba16388b937d |
---|---|
14 */ | 14 */ |
15 | 15 |
16 #include "FeatureExtractionModelTransformer.h" | 16 #include "FeatureExtractionModelTransformer.h" |
17 | 17 |
18 #include "plugin/FeatureExtractionPluginFactory.h" | 18 #include "plugin/FeatureExtractionPluginFactory.h" |
19 #include "plugin/NativeVampPluginFactory.h" | |
20 #include "plugin/PiperVampPluginFactory.h" | |
21 | |
19 #include "plugin/PluginXml.h" | 22 #include "plugin/PluginXml.h" |
20 #include <vamp-hostsdk/Plugin.h> | 23 #include <vamp-hostsdk/Plugin.h> |
21 | 24 |
22 #include "data/model/Model.h" | 25 #include "data/model/Model.h" |
23 #include "base/Window.h" | 26 #include "base/Window.h" |
90 | 93 |
91 Transform primaryTransform = m_transforms[0]; | 94 Transform primaryTransform = m_transforms[0]; |
92 | 95 |
93 QString pluginId = primaryTransform.getPluginIdentifier(); | 96 QString pluginId = primaryTransform.getPluginIdentifier(); |
94 | 97 |
95 FeatureExtractionPluginFactory *factory = | 98 FeatureExtractionPluginFactory *factory = PiperVampPluginFactory::instance(); |
96 FeatureExtractionPluginFactory::instanceFor(pluginId); | |
97 | 99 |
98 if (!factory) { | 100 if (!factory) { |
99 m_message = tr("No factory available for feature extraction plugin id \"%1\" (unknown plugin type, or internal error?)").arg(pluginId); | 101 m_message = tr("No factory available for feature extraction plugin id \"%1\" (unknown plugin type, or internal error?)").arg(pluginId); |
100 return false; | 102 return false; |
101 } | 103 } |
729 getFrames(channelCount, blockFrame, blockSize, buffers); | 731 getFrames(channelCount, blockFrame, blockSize, buffers); |
730 } | 732 } |
731 | 733 |
732 if (m_abandoned) break; | 734 if (m_abandoned) break; |
733 | 735 |
734 cerr << "calling process() from thread " | |
735 << QThread::currentThreadId() << endl; | |
736 | |
737 Vamp::Plugin::FeatureSet features = m_plugin->process | 736 Vamp::Plugin::FeatureSet features = m_plugin->process |
738 (buffers, RealTime::frame2RealTime(blockFrame, sampleRate).toVampRealTime()); | 737 (buffers, RealTime::frame2RealTime(blockFrame, sampleRate).toVampRealTime()); |
739 | 738 |
740 if (m_abandoned) break; | 739 if (m_abandoned) break; |
741 | 740 |