]> git.sesse.net Git - nageru/blobdiff - midi_mapper.cpp
In the MIDI mapper, handle lost events without exiting the thread.
[nageru] / 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;
                        }