Chris@0: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ Chris@0: Chris@0: #ifndef _VAMPYHOST_H_ Chris@0: #define _VAMPYHOST_H_ Chris@0: Chris@0: #include "vamp-sdk/Plugin.h" Chris@0: #include Chris@0: Chris@0: // structure of NumPy array intrface (just a hack, shouldn't be needed here...) Chris@0: typedef struct { Chris@0: int two; /* contains the integer 2 -- simple sanity check */ Chris@0: int nd; /* number of dimensions */ Chris@0: char typekind; /* kind in array --- character code of typestr */ Chris@0: int itemsize; /* size of each element */ Chris@0: int flags; /* flags indicating how the data should be interpreted */ Chris@0: /* must set ARR_HAS_DESCR bit to validate descr */ Chris@0: Py_intptr_t *shape; /* A length-nd array of shape information */ Chris@0: Py_intptr_t *strides; /* A length-nd array of stride information */ Chris@0: void *data; /* A pointer to the first element of the array */ Chris@0: PyObject *descr; /* NULL or data-description (same as descr key */ Chris@0: /* of __array_interface__) -- must set ARR_HAS_DESCR */ Chris@0: /* flag or this will be ignored. */ Chris@0: } PyArrayInterface; Chris@0: Chris@0: //structure for holding plugin instance data Chris@0: typedef struct { Chris@0: std::string key; Chris@0: std::string identifier; Chris@0: bool isInitialised; Chris@0: float inputSampleRate; Chris@0: size_t channels; Chris@0: size_t blockSize; Chris@0: size_t stepSize; Chris@0: size_t sampleSize; Chris@0: bool mixChannels; Chris@0: enum InputSampleType { Chris@0: int16, Chris@0: float32 }; Chris@0: InputSampleType inputSampleType; Chris@0: Vamp::Plugin::FeatureSet output; Chris@0: } PyPluginDescriptor; Chris@0: Chris@0: #endif