Mercurial > hg > svcore
comparison plugin/PiperVampPluginFactory.cpp @ 1386:0d45fff7ccd1
Update to match slightly changed Piper Vamp C++ API
author | Chris Cannam |
---|---|
date | Fri, 10 Feb 2017 14:49:45 +0000 |
parents | 54fabf5aceb8 |
children | 87ae75da6527 |
comparison
equal
deleted
inserted
replaced
1374:8db84bd61eaa | 1386:0d45fff7ccd1 |
---|---|
26 #undef VOID | 26 #undef VOID |
27 #undef ERROR | 27 #undef ERROR |
28 #define CAPNP_LITE 1 | 28 #define CAPNP_LITE 1 |
29 #endif | 29 #endif |
30 | 30 |
31 #include "vamp-client/qt/AutoPlugin.h" | 31 #include "vamp-client/qt/PiperAutoPlugin.h" |
32 #include "vamp-client/qt/ProcessQtTransport.h" | 32 #include "vamp-client/qt/ProcessQtTransport.h" |
33 #include "vamp-client/CapnpRRClient.h" | 33 #include "vamp-client/CapnpRRClient.h" |
34 | 34 |
35 #include <QDir> | 35 #include <QDir> |
36 #include <QFile> | 36 #include <QFile> |
121 auto psd = getPluginStaticData(identifier); | 121 auto psd = getPluginStaticData(identifier); |
122 if (psd.pluginKey == "") { | 122 if (psd.pluginKey == "") { |
123 return 0; | 123 return 0; |
124 } | 124 } |
125 | 125 |
126 SVDEBUG << "PiperVampPluginFactory: Creating Piper AutoPlugin for server " | 126 SVDEBUG << "PiperVampPluginFactory: Creating PiperAutoPlugin for server " |
127 << m_origins[identifier] << ", identifier " << identifier << endl; | 127 << m_origins[identifier] << ", identifier " << identifier << endl; |
128 | 128 |
129 auto ap = new piper_vamp::client::AutoPlugin | 129 auto ap = new piper_vamp::client::PiperAutoPlugin |
130 (m_origins[identifier].toStdString(), | 130 (m_origins[identifier].toStdString(), |
131 psd.pluginKey, | 131 psd.pluginKey, |
132 float(inputSampleRate), | 132 float(inputSampleRate), |
133 0, | 133 0, |
134 m_logger); | 134 m_logger); |
227 req.from = from; | 227 req.from = from; |
228 | 228 |
229 piper_vamp::ListResponse resp; | 229 piper_vamp::ListResponse resp; |
230 | 230 |
231 try { | 231 try { |
232 resp = client.listPluginData(req); | 232 resp = client.list(req); |
233 } catch (piper_vamp::client::ServerCrashed) { | 233 } catch (piper_vamp::client::ServerCrashed) { |
234 SVDEBUG << "PiperVampPluginFactory: Piper server crashed" << endl; | 234 SVDEBUG << "PiperVampPluginFactory: Piper server crashed" << endl; |
235 errorMessage = QObject::tr | 235 errorMessage = QObject::tr |
236 ("External plugin host exited unexpectedly while listing plugins"); | 236 ("External plugin host exited unexpectedly while listing plugins"); |
237 return; | 237 return; |