From 7218bd91de3b69032e515617449702f368db59d2 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sun, 4 Aug 2013 14:03:19 -0400 Subject: start work on the changes to EngineControl (dialog) to integrate with new backend design, and add "requires-driver" concept to AudioBackend to handle JACK specifically --- gtk2_ardour/engine_dialog.h | 135 ++++++++++++++++++++------------------------ 1 file changed, 61 insertions(+), 74 deletions(-) (limited to 'gtk2_ardour/engine_dialog.h') diff --git a/gtk2_ardour/engine_dialog.h b/gtk2_ardour/engine_dialog.h index 0d7ce29b46..ac96fbc520 100644 --- a/gtk2_ardour/engine_dialog.h +++ b/gtk2_ardour/engine_dialog.h @@ -47,80 +47,67 @@ class EngineControl : public Gtk::VBox { void set_state (const XMLNode&); private: - Gtk::Adjustment periods_adjustment; - Gtk::SpinButton periods_spinner; - Gtk::Adjustment ports_adjustment; - Gtk::SpinButton ports_spinner; - Gtk::Adjustment input_latency_adjustment; - Gtk::SpinButton input_latency; - Gtk::Adjustment output_latency_adjustment; - Gtk::SpinButton output_latency; - Gtk::Label latency_label; - - Gtk::CheckButton realtime_button; - Gtk::CheckButton no_memory_lock_button; - Gtk::CheckButton unlock_memory_button; - Gtk::CheckButton soft_mode_button; - Gtk::CheckButton monitor_button; - Gtk::CheckButton force16bit_button; - Gtk::CheckButton hw_monitor_button; - Gtk::CheckButton hw_meter_button; - Gtk::CheckButton verbose_output_button; - - Gtk::Button start_button; - Gtk::Button stop_button; - Gtk::HButtonBox button_box; - - Gtk::ComboBoxText sample_rate_combo; - Gtk::ComboBoxText period_size_combo; - - Gtk::ComboBoxText preset_combo; - Gtk::ComboBoxText serverpath_combo; - Gtk::ComboBoxText driver_combo; - Gtk::ComboBoxText interface_combo; - Gtk::ComboBoxText timeout_combo; - Gtk::ComboBoxText dither_mode_combo; - Gtk::ComboBoxText audio_mode_combo; - Gtk::ComboBoxText input_device_combo; - Gtk::ComboBoxText output_device_combo; - Gtk::ComboBoxText midi_driver_combo; - - Gtk::Table basic_packer; - Gtk::Table options_packer; - Gtk::Table device_packer; - Gtk::HBox basic_hbox; - Gtk::HBox options_hbox; - Gtk::HBox device_hbox; - Gtk::Notebook notebook; - - bool _used; - - static bool engine_running (); - - void driver_changed (); - void build_command_line (std::vector&); - - std::map > devices; - std::vector backend_devs; - void enumerate_devices (const std::string& driver); - -#ifdef __APPLE__ - std::vector enumerate_coreaudio_devices (); -#else - std::vector enumerate_alsa_devices (); - std::vector enumerate_oss_devices (); - std::vector enumerate_netjack_devices (); - std::vector enumerate_freebob_devices (); - std::vector enumerate_ffado_devices (); - std::vector enumerate_dummy_devices (); -#endif - - void redisplay_latency (); - uint32_t get_rate(); - void audio_mode_changed (); - std::vector server_strings; - void find_jack_servers (std::vector&); - std::string get_device_name (const std::string& driver, const std::string& human_readable_name); + /* core fields used by all backends */ + + Gtk::ComboBoxText backend_combo; + Gtk::ComboBoxText input_device_combo; + Gtk::ComboBoxText output_device_combo; + Gtk::ComboBoxText sample_rate_combo; + Gtk::ComboBoxText buffer_size_combo; + Gtk::Adjustment input_latency_adjustment; + Gtk::SpinButton input_latency; + Gtk::Adjustment output_latency_adjustment; + Gtk::SpinButton output_latency; + Gtk::Adjustment input_channels_adjustment; + Gtk::SpinButton input_channels; + Gtk::Adjustment output_channels_adjustment; + Gtk::SpinButton output_channels; + Gtk::Adjustment ports_adjustment; + Gtk::SpinButton ports_spinner; + Gtk::Label latency_label; + + /* JACK specific */ + + Gtk::CheckButton realtime_button; + Gtk::CheckButton no_memory_lock_button; + Gtk::CheckButton unlock_memory_button; + Gtk::CheckButton soft_mode_button; + Gtk::CheckButton monitor_button; + Gtk::CheckButton force16bit_button; + Gtk::CheckButton hw_monitor_button; + Gtk::CheckButton hw_meter_button; + Gtk::CheckButton verbose_output_button; + + + Gtk::ComboBoxText preset_combo; + Gtk::ComboBoxText serverpath_combo; + Gtk::ComboBoxText driver_combo; + Gtk::ComboBoxText interface_combo; + Gtk::ComboBoxText timeout_combo; + Gtk::ComboBoxText dither_mode_combo; + Gtk::ComboBoxText audio_mode_combo; + Gtk::ComboBoxText midi_driver_combo; + + Gtk::Table basic_packer; + Gtk::Table options_packer; + Gtk::Table device_packer; + Gtk::HBox basic_hbox; + Gtk::HBox options_hbox; + Gtk::HBox device_hbox; + Gtk::Notebook notebook; + + bool _used; + + static bool engine_running (); + + void driver_changed (); + void backend_changed (); + + void redisplay_latency (); + uint32_t get_rate(); + void audio_mode_changed (); + void interface_changed (); + void list_devices (); }; #endif /* __gtk2_ardour_engine_dialog_h__ */ -- cgit v1.2.3