Mercurial > hg > piper-vamp-js
annotate silvet.cpp @ 86:e434cb4f850d
Allow user-specified EMFLAGS
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Wed, 14 Sep 2016 14:58:34 +0100 |
parents | 604244038b81 |
children | a734a7e976fa |
rev | line source |
---|---|
c@84 | 1 |
c@84 | 2 #include "VamPipeAdapter.h" |
c@84 | 3 #include "VamPipePluginLibrary.h" |
c@84 | 4 |
c@84 | 5 #include "Silvet.h" |
c@84 | 6 |
c@84 | 7 using vampipe::VamPipeAdapter; |
c@84 | 8 using vampipe::VamPipePluginLibrary; |
c@84 | 9 |
c@84 | 10 static std::string soname("silvet"); |
c@84 | 11 |
c@84 | 12 static VamPipeAdapter<Silvet> silvetAdapter(soname); |
c@84 | 13 |
c@84 | 14 static VamPipePluginLibrary library({ |
c@84 | 15 &silvetAdapter |
c@84 | 16 }); |
c@84 | 17 |
c@84 | 18 extern "C" { |
c@84 | 19 |
c@84 | 20 const char *vampipeRequestJson(const char *request) { |
c@84 | 21 return library.requestJson(request); |
c@84 | 22 } |
c@84 | 23 |
c@84 | 24 const char *vampipeProcessRaw(int pluginHandle, |
c@84 | 25 const float *const *inputBuffers, |
c@84 | 26 int sec, |
c@84 | 27 int nsec) { |
c@84 | 28 return library.processRaw(pluginHandle, inputBuffers, sec, nsec); |
c@84 | 29 } |
c@84 | 30 |
c@84 | 31 void vampipeFreeJson(const char *json) { |
c@84 | 32 return library.freeJson(json); |
c@84 | 33 } |
c@84 | 34 |
c@84 | 35 } |
c@84 | 36 |