aboutsummaryrefslogtreecommitdiffhomepage
path: root/backends/lua.h
diff options
context:
space:
mode:
authorcbdev <cb@cbcdn.com>2020-04-27 22:50:47 +0200
committercbdev <cb@cbcdn.com>2020-04-27 22:50:47 +0200
commit1d8ed32bf769bc99095cd32ec166e681437607f0 (patch)
treebc94fd3a0245e91c15659916fc1c3591c7fb44b7 /backends/lua.h
parentd4714dfdd5c6e2d165d1ad9327fdce69a1b2b85b (diff)
parentc0bb55ff08faf2f89af947090d1c9bc412927d9f (diff)
downloadmidimonster-1d8ed32bf769bc99095cd32ec166e681437607f0.tar.gz
midimonster-1d8ed32bf769bc99095cd32ec166e681437607f0.tar.bz2
midimonster-1d8ed32bf769bc99095cd32ec166e681437607f0.zip
Merge branch 'master' into debian/master
Diffstat (limited to 'backends/lua.h')
-rw-r--r--backends/lua.h23
1 files changed, 19 insertions, 4 deletions
diff --git a/backends/lua.h b/backends/lua.h
index ebe2046..5587bf9 100644
--- a/backends/lua.h
+++ b/backends/lua.h
@@ -22,13 +22,21 @@ static int lua_shutdown(size_t n, instance** inst);
static uint32_t lua_interval();
#endif
+typedef struct /*_lua_channel*/ {
+ char* name;
+ int reference;
+ double in;
+ double out;
+ uint8_t mark;
+} lua_channel_data;
+
typedef struct /*_lua_instance_data*/ {
size_t channels;
- char** channel_name;
- int* reference;
- double* input;
- double* output;
+ lua_channel_data* channel;
+
lua_State* interpreter;
+ int cleanup_handler;
+ char* default_handler;
} lua_instance_data;
typedef struct /*_lua_interval_callback*/ {
@@ -37,3 +45,10 @@ typedef struct /*_lua_interval_callback*/ {
lua_State* interpreter;
int reference;
} lua_timer;
+
+typedef struct /*_lua_coroutine*/ {
+ instance* instance;
+ lua_State* thread;
+ int reference;
+ uint64_t timeout;
+} lua_thread;