Mercurial > hg > piper-vamp-js-builds
comparison silvet/silvet.cpp @ 27:cae97e9dfa72
Import a couple of builds
| author | Chris Cannam <c.cannam@qmul.ac.uk> |
|---|---|
| date | Thu, 10 Nov 2016 11:55:22 +0000 |
| parents | |
| children | 95ac23360324 |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 27:cae97e9dfa72 |
|---|---|
| 1 | |
| 2 #include "PiperAdapter.h" | |
| 3 #include "PiperPluginLibrary.h" | |
| 4 | |
| 5 #include "Silvet.h" | |
| 6 | |
| 7 using piper::PiperAdapter; | |
| 8 using piper::PiperPluginLibrary; | |
| 9 | |
| 10 static std::string soname("silvet"); | |
| 11 | |
| 12 static PiperAdapter<Silvet> silvetAdapter(soname); | |
| 13 | |
| 14 static PiperPluginLibrary library({ | |
| 15 &silvetAdapter | |
| 16 }); | |
| 17 | |
| 18 extern "C" { | |
| 19 | |
| 20 const char *piperRequestJson(const char *request) { | |
| 21 return library.requestJson(request); | |
| 22 } | |
| 23 | |
| 24 const char *piperProcessRaw(int handle, | |
| 25 const float *const *inputBuffers, | |
| 26 int sec, | |
| 27 int nsec) { | |
| 28 return library.processRaw(handle, inputBuffers, sec, nsec); | |
| 29 } | |
| 30 | |
| 31 void piperFreeJson(const char *json) { | |
| 32 return library.freeJson(json); | |
| 33 } | |
| 34 | |
| 35 } | |
| 36 |
