summaryrefslogtreecommitdiff
path: root/apps/midi.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/midi.h')
-rw-r--r--apps/midi.h25
1 files changed, 14 insertions, 11 deletions
diff --git a/apps/midi.h b/apps/midi.h
index cb3bd90..537c356 100644
--- a/apps/midi.h
+++ b/apps/midi.h
@@ -26,23 +26,26 @@
#include <alsa/asoundlib.h>
#include <poll.h>
+#include "slist.h"
#include "mixer.h"
-struct midi_struct;
-
typedef struct {
- struct midi_struct* self_;
- u_int8_t* buf_;
- int len_;
-} midi_done_data_t;
-
-struct midi_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_;
- midi_done_data_t done_data_[2];
-};
-typedef struct midi_struct midi_t;
+ slist_t done_data_;
+} 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_get_poll_fd_count(midi_t* m);