}
if (backend_combo.get_active_text().empty()) {
+ PBD::Unwinder<uint32_t> protect_ignore_changes (ignore_changes, ignore_changes + 1);
backend_combo.set_active_text (backend_names.front());
}
- {
- /* ignore: don't save state */
- PBD::Unwinder<uint32_t> protect_ignore_changes (ignore_changes, ignore_changes + 1);
- backend_changed ();
- }
+ backend_changed ();
/* in case the setting the backend failed, e.g. stale config, from set_state(), try again */
if (0 == ARDOUR::AudioEngine::instance()->current_backend()) {
EngineControl::on_show ()
{
ArdourDialog::on_show ();
+ if (!ARDOUR::AudioEngine::instance()->current_backend() || !ARDOUR::AudioEngine::instance()->running()) {
+ // re-check _have_control (jackd running) see #6041
+ backend_changed ();
+ }
device_changed ();
ok_button->grab_focus();
}
basic_packer.attach (lm_button_audio, 3, 4, row-1, row+1, xopt, xopt);
++row;
- label = manage (left_aligned_label (_("MIDI System")));
+ label = manage (left_aligned_label (_("MIDI System:")));
basic_packer.attach (*label, 0, 1, row, row + 1, xopt, (AttachOptions) 0);
basic_packer.attach (midi_option_combo, 1, 2, row, row + 1, SHRINK, (AttachOptions) 0);
basic_packer.attach (midi_devices_button, 3, 4, row, row+1, xopt, xopt);
/* Translators: "samples" is always plural here, so no
need for plural+singular forms.
*/
- char buf[32];
- snprintf (buf, sizeof (buf), _("%u samples"), sz);
+ char buf[64];
+ snprintf (buf, sizeof (buf), "%u %s", sz, P_("sample", "samples", sz));
return buf;
}
*/
show_buffer_duration ();
- if (!ignore_changes) {
- save_state ();
- }
}
EngineControl::buffer_size_changed ()
{
show_buffer_duration ();
- if (!ignore_changes) {
- save_state ();
- }
}
void
} else {
midi_devices_button.set_sensitive (true);
}
-
- if (!ignore_changes) {
- save_state ();
- }
}
void
EngineControl::parameter_changed ()
{
- if (!ignore_changes) {
- save_state ();
- }
}
EngineControl::State
for (StateList::const_iterator i = states.begin(); i != states.end(); ++i) {
if ((*i)->active) {
- ignore_changes++;
+ PBD::Unwinder<uint32_t> protect_ignore_changes (ignore_changes, ignore_changes + 1);
backend_combo.set_active_text ((*i)->backend);
driver_combo.set_active_text ((*i)->driver);
device_combo.set_active_text ((*i)->device);
input_latency.set_value ((*i)->input_latency);
output_latency.set_value ((*i)->output_latency);
midi_option_combo.set_active_text ((*i)->midi_option);
- ignore_changes--;
break;
}
}
if (!state) {
state = save_state ();
assert (state);
+ } else {
+ store_state(state);
}
/* all off */
void
EngineControl::device_list_changed ()
{
- PBD::Unwinder<uint32_t> protect_ignore_changes (ignore_changes, ignore_changes + 1);
+ PBD::Unwinder<uint32_t> protect_ignore_changes (ignore_changes, ignore_changes + 1); // ??
list_devices ();
midi_option_changed();
}