X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=shared%2Fmidi_device.cpp;h=ab84fda6db51099e3ecf03013bc08a7b0a60947a;hb=69ca346ecb6d52febde969af332142131a501d33;hp=e4b1a116e17a27ecff7b7768d6e19fa7cf3fcdfb;hpb=f1a8ab7eb34a89a104093c3931b1d51fcb2684e6;p=nageru diff --git a/shared/midi_device.cpp b/shared/midi_device.cpp index e4b1a11..ab84fda 100644 --- a/shared/midi_device.cpp +++ b/shared/midi_device.cpp @@ -21,7 +21,7 @@ MIDIDevice::~MIDIDevice() const uint64_t one = 1; if (write(should_quit_fd, &one, sizeof(one)) != sizeof(one)) { perror("write(should_quit_fd)"); - exit(1); + abort(); } midi_thread.join(); close(should_quit_fd); @@ -73,7 +73,7 @@ void MIDIDevice::thread_func() // The sequencer object is now ready to be used from other threads. { - lock_guard lock(mu); + lock_guard lock(mu); alsa_seq = seq; alsa_queue_id = queue_id; } @@ -97,7 +97,7 @@ void MIDIDevice::thread_func() while (snd_seq_query_next_port(seq, pinfo) >= 0) { constexpr int mask = SND_SEQ_PORT_CAP_READ | SND_SEQ_PORT_CAP_SUBS_READ; if ((snd_seq_port_info_get_capability(pinfo) & mask) == mask) { - lock_guard lock(mu); + lock_guard lock(mu); subscribe_to_port_lock_held(seq, *snd_seq_port_info_get_addr(pinfo)); } } @@ -154,7 +154,7 @@ void MIDIDevice::handle_event(snd_seq_t *seq, snd_seq_event_t *event) return; } - lock_guard lock(mu); + lock_guard lock(mu); switch (event->type) { case SND_SEQ_EVENT_CONTROLLER: { receiver->controller_received(event->data.control.param, event->data.control.value);