blob: ccffef7bf5a60c6e91219a1938a7dd480b51ab25 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#include "midimonster.h"
#include <lua.h>
#include <lualib.h>
#include <lauxlib.h>
int init();
static int lua_configure(char* option, char* value);
static int lua_configure_instance(instance* inst, char* option, char* value);
static instance* lua_instance();
static channel* lua_channel(instance* inst, char* spec);
static int lua_set(instance* inst, size_t num, channel** c, channel_value* v);
static int lua_handle(size_t num, managed_fd* fds);
static int lua_start();
static int lua_shutdown();
typedef struct /*_lua_instance_data*/ {
size_t channels;
char** channel_name;
int* reference;
double* input;
double* output;
lua_State* interpreter;
} lua_instance_data;
typedef struct /*_lua_interval_callback*/ {
uint64_t interval;
uint64_t delta;
lua_State* interpreter;
int reference;
} lua_timer;
|