From: Steinar H. Gunderson Date: Sat, 11 Feb 2017 18:15:54 +0000 (+0100) Subject: In the MIDI mapper, handle lost events without exiting the thread. X-Git-Tag: 1.5.0~41 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=76bcac048249c65c008154a725b9a0bb51af2477;p=nageru In the MIDI mapper, handle lost events without exiting the thread. --- diff --git a/midi_mapper.cpp b/midi_mapper.cpp index d03f382..b19f42c 100644 --- a/midi_mapper.cpp +++ b/midi_mapper.cpp @@ -232,6 +232,10 @@ void MIDIMapper::thread_func() if (err < 0) { if (err == -EINTR) continue; if (err == -EAGAIN) break; + if (err == -ENOSPC) { + fprintf(stderr, "snd_seq_event_input: Some events were lost.\n"); + continue; + } fprintf(stderr, "snd_seq_event_input: %s\n", snd_strerror(err)); return; }