const uint64_t one = 1;
if (write(should_quit_fd, &one, sizeof(one)) != sizeof(one)) {
perror("write(should_quit_fd)");
- exit(1);
+ abort();
}
inotify_thread.join();
display_name = devices[internal_dev_index].display_name();
}
- fprintf(stderr, "%s: Probed successfully.\n", address);
-
reset_device(internal_dev_index); // Restarts it if it is held (ie., we just replaced a dead card).
DeviceSpec spec{InputSourceType::ALSA_INPUT, internal_dev_index};
- global_audio_mixer->set_display_name(spec, display_name);
+ global_audio_mixer->set_device_parameters(spec, display_name, CardType::LIVE_CARD, /*num_channels=*/0, /*active=*/true); // Type and channels are ignored.
global_audio_mixer->trigger_state_changed_callback();
return ALSAPool::ProbeResult::SUCCESS;
inputs[index].reset();
} else {
// TODO: Put on a background thread instead of locking?
- auto callback = bind(&AudioMixer::add_audio, global_audio_mixer, DeviceSpec{InputSourceType::ALSA_INPUT, index}, _1, _2, _3, _4, _5);
+ auto callback = bind(&AudioMixer::add_audio, global_audio_mixer, DeviceSpec{InputSourceType::ALSA_INPUT, index}, _1, _2, _3, _4);
inputs[index].reset(new ALSAInput(device->address.c_str(), OUTPUT_FREQUENCY, device->num_channels, callback, this, index));
inputs[index]->start_capture_thread();
}