summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/mixer.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/mixer.c b/apps/mixer.c
index 1e3287f..418fcb3 100644
--- a/apps/mixer.c
+++ b/apps/mixer.c
@@ -78,6 +78,11 @@ int mixer_handle_revents(mixer_t* m, struct pollfd *pfds, int npfds)
error(0, 0, "MIXER: cannot write to midi port: %s", snd_strerror(ret));
return -1;
}
+ assert(ret == sizeof(buf)); // TODO: try again??
+ if((err = snd_rawmidi_drain(m->output_)) < 0) {
+ error(0, 0, "MIXER: cannot drain output: %s", snd_strerror(err));
+ return -1;
+ }
return 0;
}