summaryrefslogtreecommitdiff
path: root/client/midi.h
diff options
context:
space:
mode:
Diffstat (limited to 'client/midi.h')
-rw-r--r--client/midi.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/client/midi.h b/client/midi.h
index b6e51fc..1a051ae 100644
--- a/client/midi.h
+++ b/client/midi.h
@@ -30,24 +30,23 @@
#include "osc.h"
typedef struct {
+ u_int8_t* buf_;
+ int len_;
+ int write_idx_;
+} cmd_t;
+
+typedef struct {
snd_rawmidi_t* input_;
int in_pfds_cnt_;
snd_rawmidi_t* output_;
int out_pfds_cnt_;
u_int8_t buf_[3];
int read_idx_;
- slist_t done_data_;
+ slist_t cmds_;
} midi_t;
-typedef struct {
- midi_t* self_;
- int active_;
- const u_int8_t* buf_;
- int len_;
- int write_idx_;
-} midi_done_data_t;
-
int midi_init(midi_t* m, const char* device);
+int midi_enqueue_cmd(midi_t* m, const char* lang);
int midi_get_poll_fd_count(midi_t* m);
int midi_get_poll_fds(midi_t* m, struct pollfd *pfds, int npfds);
int midi_handle_revents(midi_t* m, struct pollfd *pfds, int npfds, osc_t* o);