Mercurial > hg > piper-vamp-js
view silvet.cpp @ 44:ae292da1cabe
Ensure finish() can be called even if not configured (otherwise there's no way to dispose of the plugin)
author | Chris Cannam |
---|---|
date | Tue, 11 Oct 2016 14:37:12 +0100 |
parents | 90bf9d9f9c95 |
children |
line wrap: on
line source
#include "PiperAdapter.h" #include "PiperPluginLibrary.h" #include "Silvet.h" using piper::PiperAdapter; using piper::PiperPluginLibrary; static std::string soname("silvet"); static PiperAdapter<Silvet> silvetAdapter(soname); static PiperPluginLibrary library({ &silvetAdapter }); extern "C" { const char *piperRequestJson(const char *request) { return library.requestJson(request); } const char *piperProcessRaw(int handle, const float *const *inputBuffers, int sec, int nsec) { return library.processRaw(handle, inputBuffers, sec, nsec); } void piperFreeJson(const char *json) { return library.freeJson(json); } }