summaryrefslogtreecommitdiff
path: root/apps/midi.h
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2015-10-12 04:24:28 +0200
committerChristian Pointner <equinox@spreadspace.org>2015-10-12 04:24:28 +0200
commit31b2b621cff0a9ca5f3be9b06ef12536ae17d65d (patch)
tree8d9f80e59c0f0b230b9553e87ec285c250da449d /apps/midi.h
parentlanguage specific done data (diff)
done data hangling for midi works now
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);