diff options
author | Christian Pointner <equinox@spreadspace.org> | 2015-10-10 20:47:41 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2015-10-10 20:47:41 +0200 |
commit | 8b2597862b536c55dd744a0d976db963e7e38f38 (patch) | |
tree | b52edb7d21f1e8e5b0462a0f54b548a686102550 /apps | |
parent | added mixer (diff) |
add output flushing
Diffstat (limited to 'apps')
-rw-r--r-- | apps/mixer.c | 5 |
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; } |