summaryrefslogtreecommitdiff
path: root/apps/midi.h
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2015-10-10 07:20:31 +0200
committerChristian Pointner <equinox@spreadspace.org>2015-10-10 07:20:31 +0200
commite1e94206e5de0a1b4e03593ffeb9d5cb6ce81abb (patch)
tree1801606ee6f5b8385905e7db133e597566a270d7 /apps/midi.h
parentimproved error handling (diff)
midi is back from threded to async io
Diffstat (limited to 'apps/midi.h')
-rw-r--r--apps/midi.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/apps/midi.h b/apps/midi.h
index 2c0153b..f2aa119 100644
--- a/apps/midi.h
+++ b/apps/midi.h
@@ -24,16 +24,15 @@
#define DOLMETSCHCTL_midi_h_INCLUDED
#include <alsa/asoundlib.h>
-#include <pthread.h>
+#include <poll.h>
typedef struct {
- pthread_t thread_;
snd_rawmidi_t* input_;
- u_int8_t stop_;
} midi_t;
int midi_init(midi_t* m, const char* device);
-int midi_start(midi_t* m);
-int midi_stop(midi_t* m);
+int midi_get_poll_desc_count(midi_t* m);
+int midi_get_poll_desc(midi_t* m, struct pollfd *pfds, int npfds);
+int midi_handle_revents(midi_t* m, struct pollfd *pfds, int npfds);
#endif