#include <google/protobuf/io/zero_copy_stream_impl.h>
#include <google/protobuf/message.h>
#include <google/protobuf/text_format.h>
+#include <pthread.h>
#include <poll.h>
#include <stdint.h>
#include <stdio.h>
{
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);
}
void MIDIMapper::thread_func()
{
+ pthread_setname_np(pthread_self(), "MIDIMapper");
+
snd_seq_t *seq;
int err;
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);