From: Steinar H. Gunderson Date: Mon, 19 Feb 2018 08:38:01 +0000 (+0100) Subject: Do not try to subscribe to our own MIDI port; causes some warnings on the console. X-Git-Tag: 1.7.0~24 X-Git-Url: https://git.sesse.net/?p=nageru;a=commitdiff_plain;h=8a41192e381e3daec7e8b7ca4b2dad5f22231b5d Do not try to subscribe to our own MIDI port; causes some warnings on the console. --- diff --git a/midi_mapper.cpp b/midi_mapper.cpp index fc3b4ef..42ad1e5 100644 --- a/midi_mapper.cpp +++ b/midi_mapper.cpp @@ -396,6 +396,11 @@ void MIDIMapper::subscribe_to_port_lock_held(snd_seq_t *seq, const snd_seq_addr_ return; } + // Don't listen to ourselves. + if (addr.client == snd_seq_client_id(seq)) { + return; + } + int err = snd_seq_connect_from(seq, 0, addr.client, addr.port); if (err < 0) { // Just print out a warning (i.e., don't die); it could