]> git.sesse.net Git - nageru/commitdiff
In the MIDI mapper, handle lost events without exiting the thread.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 11 Feb 2017 18:15:54 +0000 (19:15 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 11 Feb 2017 18:15:54 +0000 (19:15 +0100)
midi_mapper.cpp

index d03f38211e524a2fcb85b70c96cddc4c958b46d9..b19f42c316cd40a7940edd1788845abfeb503481 100644 (file)
@@ -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;
                        }