annotate native/PyPluginObject.h @ 151:5a6b8f4be9b9 tracks tip

Docs
author Chris Cannam
date Fri, 21 Apr 2017 14:33:57 +0100
parents c45f957ef4d9
children
rev   line source
Chris@31 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
Chris@31 2
Chris@31 3 /*
Chris@31 4 VampyHost
Chris@31 5
Chris@31 6 Use Vamp audio analysis plugins in Python
Chris@31 7
Chris@31 8 Gyorgy Fazekas and Chris Cannam
Chris@31 9 Centre for Digital Music, Queen Mary, University of London
Chris@117 10 Copyright 2008-2015 Queen Mary, University of London
Chris@31 11
Chris@31 12 Permission is hereby granted, free of charge, to any person
Chris@31 13 obtaining a copy of this software and associated documentation
Chris@31 14 files (the "Software"), to deal in the Software without
Chris@31 15 restriction, including without limitation the rights to use, copy,
Chris@31 16 modify, merge, publish, distribute, sublicense, and/or sell copies
Chris@31 17 of the Software, and to permit persons to whom the Software is
Chris@31 18 furnished to do so, subject to the following conditions:
Chris@31 19
Chris@31 20 The above copyright notice and this permission notice shall be
Chris@31 21 included in all copies or substantial portions of the Software.
Chris@31 22
Chris@31 23 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
Chris@31 24 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
Chris@31 25 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
Chris@31 26 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
Chris@31 27 ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
Chris@31 28 CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
Chris@31 29 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Chris@31 30
Chris@31 31 Except as contained in this notice, the names of the Centre for
Chris@31 32 Digital Music; Queen Mary, University of London; and the authors
Chris@31 33 shall not be used in advertising or otherwise to promote the sale,
Chris@31 34 use or other dealings in this Software without prior written
Chris@31 35 authorization.
Chris@31 36 */
Chris@31 37
Chris@31 38 #ifndef PYPLUGINOBJECT_H
Chris@31 39 #define PYPLUGINOBJECT_H
Chris@31 40
Chris@31 41 #include <Python.h>
Chris@31 42 #include <vamp-hostsdk/Plugin.h>
Chris@31 43
Chris@31 44 #include <string>
Chris@31 45
Chris@31 46 struct PyPluginObject
Chris@31 47 {
Chris@31 48 PyObject_HEAD
Chris@31 49 Vamp::Plugin *plugin;
Chris@31 50 bool isInitialised;
Chris@31 51 size_t channels;
Chris@31 52 size_t blockSize;
Chris@31 53 size_t stepSize;
Chris@34 54 PyObject *info;
Chris@34 55 int inputDomain;
Chris@34 56 PyObject *parameters;
Chris@39 57 PyObject *programs;
Chris@31 58 };
Chris@31 59
Chris@121 60 extern PyTypeObject Plugin_Type;
Chris@31 61 #define PyPlugin_Check(v) PyObject_TypeCheck(v, &Plugin_Type)
Chris@31 62
Chris@121 63 extern PyObject *
Chris@31 64 PyPluginObject_From_Plugin(Vamp::Plugin *);
Chris@31 65
Chris@31 66 #endif
Chris@31 67
Chris@31 68