diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2007-06-29 17:08:52 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2007-06-29 17:08:52 +0000 |
commit | 80cdd6bf1d1a30c59d6be2dd32e8f081e1319ba1 (patch) | |
tree | 418e11b1f3af8e0f74df62715a81ea1e88470d8a | |
parent | 2b2f34669e53cba52e8362bfda2ce1349ce4b58b (diff) |
make a start on JACK control dialog
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2085 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r-- | gtk2_ardour/SConscript | 1 | ||||
-rw-r--r-- | gtk2_ardour/ardour.menus | 1 | ||||
-rw-r--r-- | gtk2_ardour/ardour_ui.cc | 10 | ||||
-rw-r--r-- | gtk2_ardour/ardour_ui.h | 2 | ||||
-rw-r--r-- | gtk2_ardour/ardour_ui_ed.cc | 3 | ||||
-rw-r--r-- | gtk2_ardour/engine_dialog.cc | 146 | ||||
-rw-r--r-- | gtk2_ardour/engine_dialog.h | 56 |
7 files changed, 219 insertions, 0 deletions
diff --git a/gtk2_ardour/SConscript b/gtk2_ardour/SConscript index 24adb55538..6df694380e 100644 --- a/gtk2_ardour/SConscript +++ b/gtk2_ardour/SConscript @@ -138,6 +138,7 @@ editor_selection.cc editor_selection_list.cc editor_tempodisplay.cc editor_timefx.cc +engine_dialog.cc export_dialog.cc export_session_dialog.cc export_region_dialog.cc diff --git a/gtk2_ardour/ardour.menus b/gtk2_ardour/ardour.menus index 39d5e77df1..137f23715b 100644 --- a/gtk2_ardour/ardour.menus +++ b/gtk2_ardour/ardour.menus @@ -218,6 +218,7 @@ <menu name='JACK' action='JACK'> <menuitem action='JACKDisconnect'/> <menuitem action='JACKReconnect'/> + <menuitem action='AudioEngineSetup'/> <menu name='Latency' action='Latency'> <menuitem action='JACKLatency32'/> <menuitem action='JACKLatency64'/> diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 0223e8d027..5cc6418a5e 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -76,6 +76,7 @@ #include "utils.h" #include "gui_thread.h" #include "color_manager.h" +#include "engine_dialog.h" #include "i18n.h" @@ -2784,3 +2785,12 @@ ARDOUR_UI::setup_profile () Profile->set_small_screen (); } } + +void +ARDOUR_UI::audioengine_setup () +{ + EngineDialog ed; + + ed.show_all (); + ed.run (); +} diff --git a/gtk2_ardour/ardour_ui.h b/gtk2_ardour/ardour_ui.h index 1fa9c54f7d..551919ee03 100644 --- a/gtk2_ardour/ardour_ui.h +++ b/gtk2_ardour/ardour_ui.h @@ -711,6 +711,8 @@ class ARDOUR_UI : public Gtkmm2ext::UI void no_memory_warning (); void check_memory_locking (); + + void audioengine_setup (); }; #endif /* __ardour_gui_h__ */ diff --git a/gtk2_ardour/ardour_ui_ed.cc b/gtk2_ardour/ardour_ui_ed.cc index 0e54e6253e..27ee75b320 100644 --- a/gtk2_ardour/ardour_ui_ed.cc +++ b/gtk2_ardour/ardour_ui_ed.cc @@ -155,6 +155,9 @@ ARDOUR_UI::install_actions () Glib::RefPtr<ActionGroup> jack_actions = ActionGroup::create (X_("JACK")); ActionManager::register_action (jack_actions, X_("JACK"), _("JACK")); ActionManager::register_action (jack_actions, X_("Latency"), _("Latency")); + + /* not sensitive to the presence or absence of JACK */ + act = ActionManager::register_action (jack_actions, X_("AudioEngineSetup"), _("Setup"), mem_fun (*(ARDOUR_UI::instance()), &ARDOUR_UI::audioengine_setup)); act = ActionManager::register_action (jack_actions, X_("JACKReconnect"), _("Reconnect"), mem_fun (*(ARDOUR_UI::instance()), &ARDOUR_UI::reconnect_to_jack)); ActionManager::jack_opposite_sensitive_actions.push_back (act); diff --git a/gtk2_ardour/engine_dialog.cc b/gtk2_ardour/engine_dialog.cc new file mode 100644 index 0000000000..850e93092c --- /dev/null +++ b/gtk2_ardour/engine_dialog.cc @@ -0,0 +1,146 @@ +#include <vector> + +#include <gtkmm/stock.h> +#include <gtkmm2ext/utils.h> + +#include "engine_dialog.h" +#include "i18n.h" + +using namespace std; +using namespace Gtk; +using namespace Gtkmm2ext; + +EngineDialog::EngineDialog () + : ArdourDialog (_("Audio Engine"), false, true), + realtime_button (_("Realtime")), + no_memory_lock_button (_("Do not lock memory")), + unlock_memory_button (_("Unlock memory")), + soft_mode_button (_("No zombies")), + monitor_button (_("Monitor ports")), + force16bit_button (_("Force 16 bit")), + hw_monitor_button (_("H/W monitoring")), + hw_meter_button (_("H/W metering")), + verbose_output_button (_("Verbose output")), + basic_packer (2, 2), + options_packer (11, 2), + device_packer (10, 2) +{ + using namespace Notebook_Helpers; + Label* label; + + vector<string> strings; + + strings.push_back (_("8000Hz")); + strings.push_back (_("22050Hz")); + strings.push_back (_("44100Hz")); + strings.push_back (_("48000Hz")); + strings.push_back (_("88200Hz")); + strings.push_back (_("96000Hz")); + strings.push_back (_("192000Hz")); + set_popdown_strings (sample_rate_combo, strings); + + strings.clear (); + strings.push_back ("32"); + strings.push_back ("64"); + strings.push_back ("128"); + strings.push_back ("256"); + strings.push_back ("512"); + strings.push_back ("1024"); + strings.push_back ("2048"); + strings.push_back ("4096"); + strings.push_back ("8192"); + set_popdown_strings (period_size_combo, strings); + + /* parameters */ + + basic_packer.set_spacings (6); + + label = manage (new Label (_("Sample Rate"))); + basic_packer.attach (*label, 0, 1, 0, 1, FILL|EXPAND, (AttachOptions) 0); + basic_packer.attach (sample_rate_combo, 1, 2, 0, 1, FILL|EXPAND, (AttachOptions) 0); + + label = manage (new Label (_("Period Size"))); + basic_packer.attach (*label, 0, 1, 1, 2, FILL|EXPAND, (AttachOptions) 0); + basic_packer.attach (period_size_combo, 1, 2, 1, 2, FILL|EXPAND, (AttachOptions) 0); + + + /* options */ + + options_packer.attach (realtime_button, 0, 1, 0, 1, FILL|EXPAND, (AttachOptions) 0); + options_packer.attach (no_memory_lock_button, 0, 1, 1, 2, FILL|EXPAND, (AttachOptions) 0); + options_packer.attach (unlock_memory_button, 0, 1, 2, 3, FILL|EXPAND, (AttachOptions) 0); + options_packer.attach (monitor_button, 0, 1, 3, 4, FILL|EXPAND, (AttachOptions) 0); + options_packer.attach (soft_mode_button, 0, 1, 4, 5, FILL|EXPAND, (AttachOptions) 0); + options_packer.attach (force16bit_button, 0, 1, 5, 6, FILL|EXPAND, (AttachOptions) 0); + options_packer.attach (hw_monitor_button, 0, 1, 6, 7, FILL|EXPAND, (AttachOptions) 0); + options_packer.attach (hw_meter_button, 0, 1, 7, 8, FILL|EXPAND, (AttachOptions) 0); + options_packer.attach (verbose_output_button, 0, 1, 8, 9, FILL|EXPAND, (AttachOptions) 0); + options_packer.attach (priority_spinner, 0, 1, 9, 10, FILL|EXPAND, (AttachOptions) 0); + options_packer.attach (periods_spinner, 0, 1, 10, 11, FILL|EXPAND, (AttachOptions) 0); + + /* device */ + + device_packer.set_spacings (6); + + strings.clear (); +#ifndef __APPLE + strings.push_back (X_("ALSA")); + strings.push_back (X_("OSS")); + strings.push_back (X_("FFADO")); +#else + strings.push_back (X_("CoreAudio")); +#endif + strings.push_back (X_("NetJACK")); + strings.push_back (X_("Dummy")); + set_popdown_strings (driver_combo, strings); + driver_combo.set_active_text (strings.front()); + + strings.clear (); + strings.push_back (_("Duplex")); + strings.push_back (_("Playback only")); + strings.push_back (_("Capture only")); + set_popdown_strings (audio_mode_combo, strings); + audio_mode_combo.set_active_text (strings.front()); + + label = manage (new Label (_("Driver"))); + device_packer.attach (*label, 0, 1, 0, 1, FILL|EXPAND, (AttachOptions) 0); + device_packer.attach (driver_combo, 1, 2, 0, 1, FILL|EXPAND, (AttachOptions) 0); + label = manage (new Label (_("Interface"))); + device_packer.attach (*label, 0, 1, 1, 2, FILL|EXPAND, (AttachOptions) 0); + device_packer.attach (interface_combo, 1, 2, 1, 2, FILL|EXPAND, (AttachOptions) 0); + label = manage (new Label (_("Audio Mode"))); + device_packer.attach (*label, 0, 1, 2, 3, FILL|EXPAND, (AttachOptions) 0); + device_packer.attach (audio_mode_combo, 1, 2, 2, 3, FILL|EXPAND, (AttachOptions) 0); + label = manage (new Label (_("Input device"))); + device_packer.attach (*label, 0, 1, 3, 4, FILL|EXPAND, (AttachOptions) 0); + device_packer.attach (input_device_combo, 1, 2, 3, 4, FILL|EXPAND, (AttachOptions) 0); + label = manage (new Label (_("Output device"))); + device_packer.attach (*label, 0, 1, 4, 5, FILL|EXPAND, (AttachOptions) 0); + device_packer.attach (output_device_combo, 1, 2, 4, 5, FILL|EXPAND, (AttachOptions) 0); + label = manage (new Label (_("Input channels"))); + device_packer.attach (*label, 0, 1, 5, 6, FILL|EXPAND, (AttachOptions) 0); + device_packer.attach (input_channels, 1, 2, 5, 6, FILL|EXPAND, (AttachOptions) 0); + label = manage (new Label (_("Output channels"))); + device_packer.attach (*label, 0, 1, 6, 7, FILL|EXPAND, (AttachOptions) 0); + device_packer.attach (output_channels, 1, 2, 6, 7, FILL|EXPAND, (AttachOptions) 0); + label = manage (new Label (_("Input latency"))); + device_packer.attach (*label, 0, 1, 7, 8, FILL|EXPAND, (AttachOptions) 0); + device_packer.attach (input_latency, 1, 2, 7, 8, FILL|EXPAND, (AttachOptions) 0); + label = manage (new Label (_("Output latency"))); + device_packer.attach (*label, 0, 1, 8, 9, FILL|EXPAND, (AttachOptions) 0); + device_packer.attach (output_latency, 1, 2, 8, 9, FILL|EXPAND, (AttachOptions) 0); + + notebook.pages().push_back (TabElem (basic_packer, _("Parameters"))); + notebook.pages().push_back (TabElem (options_packer, _("Options"))); + notebook.pages().push_back (TabElem (device_packer, _("Device"))); + + get_vbox()->set_border_width (12); + get_vbox()->pack_start (notebook); + + add_button (Stock::OK, RESPONSE_ACCEPT); +} + +EngineDialog::~EngineDialog () +{ + +} diff --git a/gtk2_ardour/engine_dialog.h b/gtk2_ardour/engine_dialog.h new file mode 100644 index 0000000000..1e6ac40ccb --- /dev/null +++ b/gtk2_ardour/engine_dialog.h @@ -0,0 +1,56 @@ +#ifndef __gtk2_ardour_engine_dialog_h__ +#define __gtk2_ardour_engine_dialog_h__ + +#include <gtkmm/checkbutton.h> +#include <gtkmm/spinbutton.h> +#include <gtkmm/notebook.h> +#include <gtkmm/comboboxtext.h> +#include <gtkmm/table.h> + +#include "ardour_dialog.h" + +class EngineDialog : public ArdourDialog { + public: + EngineDialog (); + ~EngineDialog (); + + private: + 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::SpinButton priority_spinner; + Gtk::SpinButton periods_spinner; + Gtk::SpinButton input_channels; + Gtk::SpinButton output_channels; + Gtk::SpinButton input_latency; + Gtk::SpinButton output_latency; + + 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 port_maximum_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::Table basic_packer; + Gtk::Table options_packer; + Gtk::Table device_packer; + + Gtk::Notebook notebook; +}; + +#endif /* __gtk2_ardour_engine_dialog_h__ */ |