Mercurial > hg > vampy
diff PyRealTime.h @ 37:27bab3a16c9a vampy2final
new branch Vampy2final
author | fazekasgy |
---|---|
date | Mon, 05 Oct 2009 11:28:00 +0000 |
parents | |
children | 2a9fb03458d7 f5c028376bf9 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/PyRealTime.h Mon Oct 05 11:28:00 2009 +0000 @@ -0,0 +1,39 @@ +/* + + * Vampy : This plugin is a wrapper around the Vamp plugin API. + * It allows for writing Vamp plugins in Python. + + * Centre for Digital Music, Queen Mary University of London. + * Copyright (C) 2008-2009 Gyorgy Fazekas, QMUL. (See Vamp sources + * for licence information.) + +*/ + +#ifndef _PYREALTIME_H_ +#define _PYREALTIME_H_ + +#include "vamp-sdk/Plugin.h" + +typedef struct { + PyObject_HEAD + Vamp::RealTime *rt; +} RealTimeObject; + +PyAPI_DATA(PyTypeObject) RealTime_Type; + +#define PyRealTime_CheckExact(v) ((v)->ob_type == &RealTime_Type) +#define PyRealTime_Check(v) PyObject_TypeCheck(v, &RealTime_Type) +///fast macro version as per API convention +#define PyRealTime_AS_REALTIME(v) ((const RealTimeObject* const) (v))->rt + +/* PyRealTime C++ API */ + + +PyAPI_FUNC(PyObject *) +PyRealTime_FromRealTime(Vamp::RealTime&); + +PyAPI_FUNC(const Vamp::RealTime*) +PyRealTime_AsRealTime (PyObject *self); + + +#endif