bool valid = true;
size_t devices_available = 0;
+ bool engine_running = ARDOUR::AudioEngine::instance()->running();
if (backend->use_separate_input_and_output_devices ()) {
devices_available += get_popdown_string_count (input_device_combo);
} else {
input_latency.set_sensitive (true);
output_latency.set_sensitive (true);
- input_channels.set_sensitive (true);
- output_channels.set_sensitive (true);
+ input_channels.set_sensitive (!engine_running);
+ output_channels.set_sensitive (!engine_running);
}
if (get_popdown_string_count (buffer_size_combo) > 0) {
- if (!ARDOUR::AudioEngine::instance()->running()) {
+ if (!engine_running) {
buffer_size_combo.set_sensitive (valid);
} else if (backend->can_change_sample_rate_when_running()) {
buffer_size_combo.set_sensitive (valid || !_have_control);
if (get_popdown_string_count (sample_rate_combo) > 0) {
bool allow_to_set_rate = false;
- if (!ARDOUR::AudioEngine::instance()->running()) {
+ if (!engine_running) {
if (!ARDOUR_UI::instance()->session_loaded) {
// engine is not running, no session loaded -> anything goes.
allow_to_set_rate = true;
}
if (get_popdown_string_count (nperiods_combo) > 0) {
- if (!ARDOUR::AudioEngine::instance()->running()) {
+ if (!engine_running) {
nperiods_combo.set_sensitive (true);
} else {
nperiods_combo.set_sensitive (false);
if (_have_control) {
start_stop_button.set_sensitive(true);
start_stop_button.show();
- if (ARDOUR::AudioEngine::instance()->running()) {
+ if (engine_running) {
start_stop_button.set_text("Stop");
update_devices_button.set_sensitive(false);
use_buffered_io_button.set_sensitive(false);
start_stop_button.hide();
}
- if (ARDOUR::AudioEngine::instance()->running() && _have_control) {
+ if (engine_running && _have_control) {
input_device_combo.set_sensitive (false);
output_device_combo.set_sensitive (false);
device_combo.set_sensitive (false);
driver_combo.set_sensitive (false);
}
}
+
+ midi_option_combo.set_sensitive (!engine_running);
}
void