diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-09-06 13:39:26 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-09-06 13:39:26 -0400 |
commit | 4729bbde5f5f6833b878155da5a395d5ecd9e565 (patch) | |
tree | e19f588f54c0737cba632d00777aac3bc78904f1 /gtk2_ardour/engine_dialog.h | |
parent | 4a135c82fba6775e71bde1d709a163876381f82a (diff) | |
parent | 04567886638a7049e79c0383c2ed99923abfee0a (diff) |
fix merge conflicts with audioengine
Diffstat (limited to 'gtk2_ardour/engine_dialog.h')
-rw-r--r-- | gtk2_ardour/engine_dialog.h | 174 |
1 files changed, 97 insertions, 77 deletions
diff --git a/gtk2_ardour/engine_dialog.h b/gtk2_ardour/engine_dialog.h index 0d7ce29b46..7c9c652f57 100644 --- a/gtk2_ardour/engine_dialog.h +++ b/gtk2_ardour/engine_dialog.h @@ -26,7 +26,6 @@ #include <gtkmm/checkbutton.h> #include <gtkmm/spinbutton.h> -#include <gtkmm/notebook.h> #include <gtkmm/comboboxtext.h> #include <gtkmm/table.h> #include <gtkmm/expander.h> @@ -40,87 +39,108 @@ class EngineControl : public Gtk::VBox { ~EngineControl (); static bool need_setup (); - int setup_engine (); + int setup_engine (bool start); - bool was_used() const { return _used; } XMLNode& get_state (); 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::string>&); - - std::map<std::string,std::vector<std::string> > devices; - std::vector<std::string> backend_devs; - void enumerate_devices (const std::string& driver); - -#ifdef __APPLE__ - std::vector<std::string> enumerate_coreaudio_devices (); -#else - std::vector<std::string> enumerate_alsa_devices (); - std::vector<std::string> enumerate_oss_devices (); - std::vector<std::string> enumerate_netjack_devices (); - std::vector<std::string> enumerate_freebob_devices (); - std::vector<std::string> enumerate_ffado_devices (); - std::vector<std::string> enumerate_dummy_devices (); -#endif - - void redisplay_latency (); - uint32_t get_rate(); - void audio_mode_changed (); - std::vector<std::string> server_strings; - void find_jack_servers (std::vector<std::string>&); - std::string get_device_name (const std::string& driver, const std::string& human_readable_name); + Gtk::Notebook notebook; + + /* 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; + + /* 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 device_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 midi_packer; + Gtk::HBox basic_hbox; + Gtk::HBox midi_hbox; + + sigc::connection sr_connection; + sigc::connection bs_connection; + + static bool engine_running (); + + void driver_changed (); + void backend_changed (); + void sample_rate_changed (); + void buffer_size_changed (); + + uint32_t get_rate() const; + uint32_t get_buffer_size() const; + uint32_t get_input_channels() const; + uint32_t get_output_channels() const; + uint32_t get_input_latency() const; + uint32_t get_output_latency() const; + std::string get_device_name() const; + std::string get_driver() const; + + void audio_mode_changed (); + void device_changed (); + void list_devices (); + void reshow_buffer_sizes (bool choice_changed); + + struct State { + std::string backend; + std::string driver; + std::string device; + std::string sample_rate; + std::string buffer_size; + std::string input_latency; + std::string output_latency; + std::string input_channels; + std::string output_channels; + bool active; + + State() : active (false) {}; + }; + + typedef std::list<State> StateList; + + StateList states; + + State* get_matching_state (const std::string& backend, + const std::string& driver, + const std::string& device); + State* get_current_state (); + void maybe_set_state (); + void save_state (); }; #endif /* __gtk2_ardour_engine_dialog_h__ */ |