Mercurial > hg > piper-vamp-js
comparison VamPipePluginLibrary.cpp @ 83:a6ab5fd80eb7
Rename process -> processRaw
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Wed, 14 Sep 2016 14:41:24 +0100 |
parents | 5bd5d48a1c21 |
children | 0e1909abe921 |
comparison
equal
deleted
inserted
replaced
82:5bd5d48a1c21 | 83:a6ab5fd80eb7 |
---|---|
191 | 191 |
192 return response; | 192 return response; |
193 } | 193 } |
194 | 194 |
195 string | 195 string |
196 VamPipePluginLibrary::processImpl(int pluginHandle, | 196 VamPipePluginLibrary::processRawImpl(int pluginHandle, |
197 const float *const *inputBuffers, | 197 const float *const *inputBuffers, |
198 int sec, | 198 int sec, |
199 int nsec) | 199 int nsec) |
200 { | 200 { |
201 RequestOrResponse response; | 201 RequestOrResponse response; |
202 response.direction = RequestOrResponse::Response; | 202 response.direction = RequestOrResponse::Response; |
203 response.type = RRType::Process; | 203 response.type = RRType::Process; |
204 | 204 |
210 Vamp::Plugin *plugin = m_mapper.handleToPlugin(pluginHandle); | 210 Vamp::Plugin *plugin = m_mapper.handleToPlugin(pluginHandle); |
211 Vamp::RealTime timestamp(sec, nsec); | 211 Vamp::RealTime timestamp(sec, nsec); |
212 | 212 |
213 response.processResponse.features = plugin->process(inputBuffers, timestamp); | 213 response.processResponse.features = plugin->process(inputBuffers, timestamp); |
214 response.success = true; | 214 response.success = true; |
215 | |
216 m_useBase64 = true; | |
215 | 217 |
216 return writeResponse(response); | 218 return writeResponse(response); |
217 | 219 |
218 } catch (const std::exception &e) { | 220 } catch (const std::exception &e) { |
219 return VampJson::fromException(e, RRType::Process).dump(); | 221 return VampJson::fromException(e, RRType::Process).dump(); |
220 } | 222 } |
221 | |
222 m_useBase64 = true; //!!! todo: return something raw as well! | |
223 } | 223 } |
224 | 224 |
225 string | 225 string |
226 VamPipePluginLibrary::requestJsonImpl(string req) | 226 VamPipePluginLibrary::requestJsonImpl(string req) |
227 { | 227 { |