summaryrefslogtreecommitdiffhomepage
path: root/MIDI.h
diff options
context:
space:
mode:
Diffstat (limited to 'MIDI.h')
-rw-r--r--MIDI.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/MIDI.h b/MIDI.h
index d71298d..23024c3 100644
--- a/MIDI.h
+++ b/MIDI.h
@@ -158,6 +158,13 @@ public:
}
}
+ void flush()
+ {
+ while (event_ready()) {
+ (void) read();
+ }
+ }
+
void wait_for_event()
{
int result = poll(pfd, npfd, 10000);