summaryrefslogtreecommitdiff
path: root/client/midi.h
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2015-10-13 02:06:58 +0200
committerChristian Pointner <equinox@spreadspace.org>2015-10-13 02:06:58 +0200
commit6eabbee4348d0e2ca1b4140133ddc5e1fd2ed2f7 (patch)
tree1befb8f149f3f58f1e53ffd445e53bcff508e6b1 /client/midi.h
parentsending switching commands over osc works now...ansers to be done. (diff)
first working version of client
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);