diff options
author | cbdev <cb@cbcdn.com> | 2020-03-03 23:11:14 +0100 |
---|---|---|
committer | cbdev <cb@cbcdn.com> | 2020-03-03 23:11:14 +0100 |
commit | fe84e353f2580315804319438b1951752249a9ee (patch) | |
tree | 0c88e2820332f60e97c76ddc2d4bbb8ea30598af /backends/python.h | |
parent | 1618f49ff5dc317968e385e5cbc4aae32e8fb67b (diff) | |
download | midimonster-fe84e353f2580315804319438b1951752249a9ee.tar.gz midimonster-fe84e353f2580315804319438b1951752249a9ee.tar.bz2 midimonster-fe84e353f2580315804319438b1951752249a9ee.zip |
Implement python backend
Diffstat (limited to 'backends/python.h')
-rw-r--r-- | backends/python.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/backends/python.h b/backends/python.h new file mode 100644 index 0000000..10411ca --- /dev/null +++ b/backends/python.h @@ -0,0 +1,25 @@ +#include "midimonster.h" + +MM_PLUGIN_API int init(); +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); +static channel* python_channel(instance* inst, char* spec, uint8_t flags); +static int python_set(instance* inst, size_t num, channel** c, channel_value* v); +static int python_handle(size_t num, managed_fd* fds); +static int python_start(size_t n, instance** inst); +static int python_shutdown(size_t n, instance** inst); + +typedef struct /*_python_channel_data*/ { + char* name; + PyObject* handler; + double in; + double out; +} mmpython_channel; + +typedef struct /*_python_instance_data*/ { + PyThreadState* interpreter; + size_t channels; + mmpython_channel* channel; + mmpython_channel* current_channel; +} python_instance_data; |