Mercurial > hg > vampy
diff PyPlugin.h @ 6:e1b508f2f914
Added support to memory buffers to be used with NumPy (and some rationalisation of code)
author | fazekasgy |
---|---|
date | Wed, 19 Mar 2008 16:02:29 +0000 |
parents | 134313c59d82 |
children | a4c955e9a70b |
line wrap: on
line diff
--- a/PyPlugin.h Fri Mar 14 12:09:34 2008 +0000 +++ b/PyPlugin.h Wed Mar 19 16:02:29 2008 +0000 @@ -92,6 +92,11 @@ label }; +enum eProcessType { + not_implemented, + legacyProcess, + numpyProcess + }; class PyPlugin : public Vamp::Plugin { @@ -101,7 +106,7 @@ bool initialise(size_t channels, size_t stepSize, size_t blockSize); void reset(); - //virtuals: + InputDomain getInputDomain() const; size_t getPreferredBlockSize() const; size_t getPreferredStepSize() const; @@ -128,10 +133,18 @@ protected: PyObject *m_pyInstance; size_t m_stepSize; - float m_previousSample; + size_t m_blockSize; + size_t m_channels; std::string m_plugin; std::string m_class; std::string m_path; + int m_processType; + PyObject *m_pyProcess; + InputDomain m_inputDomain; + + bool initMaps() const; + std::vector<std::string> PyList_To_StringVector (PyObject *inputList) const; + std::vector<float> PyList_As_FloatVector (PyObject *inputList) const; static Mutex m_pythonInterpreterMutex; };