]> git.sesse.net Git - nageru/blobdiff - midi_mapper.cpp
Add the GPU memory metrics to the Grafana dashboard.
[nageru] / midi_mapper.cpp
index b19f42c316cd40a7940edd1788845abfeb503481..42ad1e5e2a00f3e29d43459e77b41ff1b90fbe33 100644 (file)
@@ -390,8 +390,14 @@ void MIDIMapper::handle_event(snd_seq_t *seq, snd_seq_event_t *event)
 
 void MIDIMapper::subscribe_to_port_lock_held(snd_seq_t *seq, const snd_seq_addr_t &addr)
 {
-       // Client 0 is basically the system; ignore it.
-       if (addr.client == 0) {
+       // Client 0 (SNDRV_SEQ_CLIENT_SYSTEM) is basically the system; ignore it.
+       // MIDI through (SNDRV_SEQ_CLIENT_DUMMY) echoes back what we give it, so ignore that, too.
+       if (addr.client == 0 || addr.client == 14) {
+               return;
+       }
+
+       // Don't listen to ourselves.
+       if (addr.client == snd_seq_client_id(seq)) {
                return;
        }