Mercurial > hg > piper-vamp-js
view silvet.cpp @ 36:34480328bf5c
Instead of using separate values and b64values entries in JSON serialisations, allow numeric arrays to be replaced by b64 variants wherever they appear (discriminating by type). Also rename values to featureValues in feature throughout, as values turns out to be a hazardous name in a JS context. Finally use Array instead of Text for array encoding (seems clearer).
author | Chris Cannam |
---|---|
date | Tue, 27 Sep 2016 15:04:59 +0100 |
parents | d63f2ade049b |
children | a734a7e976fa |
line wrap: on
line source
#include "VamPipeAdapter.h" #include "VamPipePluginLibrary.h" #include "Silvet.h" using vampipe::VamPipeAdapter; using vampipe::VamPipePluginLibrary; static std::string soname("silvet"); static VamPipeAdapter<Silvet> silvetAdapter(soname); static VamPipePluginLibrary library({ &silvetAdapter }); extern "C" { const char *vampipeRequestJson(const char *request) { return library.requestJson(request); } 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) { return library.freeJson(json); } }