aboutsummaryrefslogtreecommitdiffhomepage
path: root/backends/maweb.h
diff options
context:
space:
mode:
authorcbdev <cb@cbcdn.com>2019-09-07 14:20:00 +0200
committercbdev <cb@cbcdn.com>2019-09-07 14:20:00 +0200
commitf19e3fe0d131c68d1e77fcd8706b260c28f508b8 (patch)
tree2b946e6b5c43e043c2c1a8f608746825778b8d6a /backends/maweb.h
parent1a23b9339c0164ec18fe6dc5eb900185e4f9d886 (diff)
downloadmidimonster-f19e3fe0d131c68d1e77fcd8706b260c28f508b8.tar.gz
midimonster-f19e3fe0d131c68d1e77fcd8706b260c28f508b8.tar.bz2
midimonster-f19e3fe0d131c68d1e77fcd8706b260c28f508b8.zip
maweb I/O buffering
Diffstat (limited to 'backends/maweb.h')
-rw-r--r--backends/maweb.h27
1 files changed, 14 insertions, 13 deletions
diff --git a/backends/maweb.h b/backends/maweb.h
index a868426..3738367 100644
--- a/backends/maweb.h
+++ b/backends/maweb.h
@@ -25,7 +25,8 @@ typedef enum /*_maweb_channel_type*/ {
exec_button = 2, //gma: 0 dot: 0
exec_lower = 3, //gma: 1 dot: 1
exec_upper = 4, //gma: 2 dot: 0
- cmdline_button
+ cmdline,
+ cmdline_local
} maweb_channel_type;
typedef enum /*_maweb_peer_type*/ {
@@ -49,15 +50,16 @@ typedef enum /*_ws_frame_op*/ {
ws_pong = 10
} maweb_operation;
-typedef union {
- struct {
- uint8_t padding[3];
- uint8_t type;
- uint16_t page;
- uint16_t index;
- } fields;
- uint64_t label;
-} maweb_channel_ident;
+typedef struct /*_maweb_channel*/ {
+ maweb_channel_type type;
+ uint16_t page;
+ uint16_t index;
+
+ uint8_t input_blocked;
+
+ double in;
+ double out;
+} maweb_channel_data;
typedef struct /*_maweb_instance_data*/ {
char* host;
@@ -69,9 +71,8 @@ typedef struct /*_maweb_instance_data*/ {
int64_t session;
maweb_peer_type peer_type;
- //need to keep an internal registry to optimize data polls
- size_t input_channels;
- maweb_channel_ident* input_channel;
+ size_t channels;
+ maweb_channel_data* channel;
int fd;
maweb_state state;