# HG changeset patch # User Chris Cannam # Date 1473860484 -3600 # Node ID a6ab5fd80eb7af478d8d3c3ba61c639c07f1ad91 # Parent 5bd5d48a1c2149f258073b53fb3f5ed6b6cea4cd Rename process -> processRaw diff -r 5bd5d48a1c21 -r a6ab5fd80eb7 VamPipePluginLibrary.cpp --- a/VamPipePluginLibrary.cpp Fri Sep 09 15:41:35 2016 +0100 +++ b/VamPipePluginLibrary.cpp Wed Sep 14 14:41:24 2016 +0100 @@ -193,10 +193,10 @@ } string -VamPipePluginLibrary::processImpl(int pluginHandle, - const float *const *inputBuffers, - int sec, - int nsec) +VamPipePluginLibrary::processRawImpl(int pluginHandle, + const float *const *inputBuffers, + int sec, + int nsec) { RequestOrResponse response; response.direction = RequestOrResponse::Response; @@ -212,14 +212,14 @@ response.processResponse.features = plugin->process(inputBuffers, timestamp); response.success = true; + + m_useBase64 = true; return writeResponse(response); } catch (const std::exception &e) { return VampJson::fromException(e, RRType::Process).dump(); } - - m_useBase64 = true; //!!! todo: return something raw as well! } string diff -r 5bd5d48a1c21 -r a6ab5fd80eb7 VamPipePluginLibrary.h --- a/VamPipePluginLibrary.h Fri Sep 09 15:41:35 2016 +0100 +++ b/VamPipePluginLibrary.h Wed Sep 14 14:41:24 2016 +0100 @@ -58,9 +58,9 @@ return strdup(requestJsonImpl(request).c_str()); } - const char *process(int handle, const float *const *inputBuffers, - int sec, int nsec) { - return strdup(processImpl(handle, inputBuffers, sec, nsec).c_str()); + const char *processRaw(int handle, const float *const *inputBuffers, + int sec, int nsec) { + return strdup(processRawImpl(handle, inputBuffers, sec, nsec).c_str()); } void freeJson(const char *json) { @@ -69,7 +69,7 @@ private: std::string requestJsonImpl(std::string req); - std::string processImpl(int, const float *const *, int, int); + std::string processRawImpl(int, const float *const *, int, int); RequestOrResponse readRequest(std::string req); std::string writeResponse(const RequestOrResponse &resp) const; diff -r 5bd5d48a1c21 -r a6ab5fd80eb7 example.cpp --- a/example.cpp Fri Sep 09 15:41:35 2016 +0100 +++ b/example.cpp Wed Sep 14 14:41:24 2016 +0100 @@ -69,13 +69,11 @@ return library.requestJson(request); } - //!!! naming problem -- returns json as well, it's just that - //!!! unlike the others, it doesn't take json as input -const char *vampipeProcess(int pluginHandle, - const float *const *inputBuffers, - int sec, - int nsec) { - return library.process(pluginHandle, inputBuffers, sec, nsec); +const char *vampipeProcessRaw(int pluginHandle, + const float *const *inputBuffers, + int sec, + int nsec) { + return library.processRaw(pluginHandle, inputBuffers, sec, nsec); } void vampipeFreeJson(const char *json) { diff -r 5bd5d48a1c21 -r a6ab5fd80eb7 vampipe.map --- a/vampipe.map Fri Sep 09 15:41:35 2016 +0100 +++ b/vampipe.map Wed Sep 14 14:41:24 2016 +0100 @@ -1,4 +1,4 @@ { - global: vampipeRequestJson; vampipeProcess; vampipeFreeJson; + global: vampipeRequestJson; vampipeProcessRaw; vampipeFreeJson; local: *; };