summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2015-10-10 20:47:41 +0200
committerChristian Pointner <equinox@spreadspace.org>2015-10-10 20:47:41 +0200
commit8b2597862b536c55dd744a0d976db963e7e38f38 (patch)
treeb52edb7d21f1e8e5b0462a0f54b548a686102550 /apps
parentadded mixer (diff)
add output flushing
Diffstat (limited to 'apps')
-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;
}