int row = 0;
_used = false;
+ _interface_chosen = false;
strings.push_back (_("8000Hz"));
strings.push_back (_("22050Hz"));
cmd.push_back ("-d");
cmd.push_back (device);
+ _interface_chosen = true;
}
if (hw_meter_button.get_active()) {
clist = root.children();
for (citer = clist.begin(); citer != clist.end(); ++citer) {
- if ( prop && (prop->value() == "FFADO" ))
- continue;
+
+ if (prop && (prop->value() == "FFADO" )) {
+ continue;
+ }
+
child = *citer;
prop = child->property ("val");
if (!prop || prop->value().empty()) {
- if ( using_dummy && ( child->name() == "interface" || child->name() == "inputdevice" || child->name() == "outputdevice" ))
+ if (using_dummy && ( child->name() == "interface" || child->name() == "inputdevice" || child->name() == "outputdevice" )) {
continue;
+ }
+
error << string_compose (_("AudioSetup value for %1 is missing data"), child->name()) << endmsg;
continue;
}
driver_combo.set_active_text(strval);
} else if (child->name() == "interface") {
interface_combo.set_active_text(strval);
+ if (!strval.empty()) {
+ _interface_chosen = true;
+ }
} else if (child->name() == "timeout") {
timeout_combo.set_active_text(strval);
} else if (child->name() == "dither") {
int setup_engine ();
void discover_servers ();
+ bool interface_chosen () const { return _interface_chosen; }
bool was_used() const { return _used; }
XMLNode& get_state ();
void set_state (const XMLNode&);
Gtk::Notebook notebook;
bool _used;
+ bool _interface_chosen;
void realtime_changed ();
void driver_changed ();
} else {
if (!(page_set & EnginePage)) {
engine_control.discover_servers ();
- m_notebook->append_page (engine_control, _("Audio Setup"));
+ if (engine_control.interface_chosen()) {
+ m_notebook->append_page (engine_control, _("Audio Setup"));
+ } else {
+ /* no interface ever selected - make it the first page */
+ m_notebook->prepend_page (engine_control, _("Audio Setup"));
+ }
m_notebook->show_all_children();
page_set = Pages (page_set | EnginePage);
}