X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=midi_mapper.cpp;h=6ce50302eec560f77472cc4c372e68fd8cdd547c;hb=refs%2Fheads%2Fmultichannel_audio;hp=4f8c33bf4ca25071f21e5e93f5a180159520fb41;hpb=5cd2e667b7531777991c98dc6d3249e95b98314c;p=nageru diff --git a/midi_mapper.cpp b/midi_mapper.cpp index 4f8c33b..6ce5030 100644 --- a/midi_mapper.cpp +++ b/midi_mapper.cpp @@ -51,7 +51,10 @@ MIDIMapper::~MIDIMapper() { should_quit = true; const uint64_t one = 1; - write(should_quit_fd, &one, sizeof(one)); + if (write(should_quit_fd, &one, sizeof(one)) != sizeof(one)) { + perror("write(should_quit_fd)"); + exit(1); + } midi_thread.join(); close(should_quit_fd); } @@ -343,6 +346,7 @@ void MIDIMapper::handle_event(snd_seq_t *seq, snd_seq_event_t *event) bind(&ControllerReceiver::toggle_limiter, receiver)); match_button(note, MIDIMappingBusProto::kToggleAutoMakeupGainFieldNumber, MIDIMappingProto::kToggleAutoMakeupGainBankFieldNumber, bind(&ControllerReceiver::toggle_auto_makeup_gain, receiver)); + break; } case SND_SEQ_EVENT_PORT_START: subscribe_to_port_lock_held(seq, event->data.addr);