From 38d3724b2af3c2b08c548326797c2421b054c846 Mon Sep 17 00:00:00 2001 From: cbdev Date: Sun, 8 Mar 2020 13:24:33 +0100 Subject: Implement python intervaling and socket management --- backends/python.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'backends/python.h') diff --git a/backends/python.h b/backends/python.h index 10411ca..8ca12f9 100644 --- a/backends/python.h +++ b/backends/python.h @@ -1,6 +1,7 @@ #include "midimonster.h" MM_PLUGIN_API int init(); +static uint32_t python_interval(); static int python_configure(char* option, char* value); static int python_configure_instance(instance* inst, char* option, char* value); static int python_instance(instance* inst); @@ -17,8 +18,26 @@ typedef struct /*_python_channel_data*/ { double out; } mmpython_channel; +typedef struct /*_mmpy_registered_socket*/ { + int fd; + PyObject* handler; + PyObject* socket; +} mmpy_socket; + +typedef struct /*_mmpy_interval*/ { + uint64_t interval; + uint64_t delta; + PyObject* reference; + PyThreadState* interpreter; +} mmpy_timer; + typedef struct /*_python_instance_data*/ { PyThreadState* interpreter; + PyObject* config; //TODO + + size_t sockets; + mmpy_socket* socket; + size_t channels; mmpython_channel* channel; mmpython_channel* current_channel; -- cgit v1.2.3