more NSD changes. if JACK is not running and no interface has ever been chosen, show...
[ardour2.git] / gtk2_ardour / engine_dialog.h
blob6fc075271c15d83796bdeb8b7d0b1e6e4ec9be9e
1 #ifndef __gtk2_ardour_engine_dialog_h__
2 #define __gtk2_ardour_engine_dialog_h__
4 #include <map>
5 #include <vector>
6 #include <string>
8 #include <gtkmm/checkbutton.h>
9 #include <gtkmm/spinbutton.h>
10 #include <gtkmm/notebook.h>
11 #include <gtkmm/comboboxtext.h>
12 #include <gtkmm/table.h>
13 #include <gtkmm/expander.h>
14 #include <gtkmm/box.h>
15 #include <gtkmm/buttonbox.h>
16 #include <gtkmm/button.h>
18 class EngineControl : public Gtk::VBox {
19 public:
20 EngineControl ();
21 ~EngineControl ();
23 static bool engine_running ();
24 int setup_engine ();
25 void discover_servers ();
27 bool interface_chosen () const { return _interface_chosen; }
28 bool was_used() const { return _used; }
29 XMLNode& get_state ();
30 void set_state (const XMLNode&);
32 sigc::signal<void> InterfaceChosen;
33 void emit_interface_chosen(); /* grr, need to figure out how to connect signalsl directly */
35 private:
36 Gtk::Adjustment periods_adjustment;
37 Gtk::SpinButton periods_spinner;
38 Gtk::Adjustment priority_adjustment;
39 Gtk::SpinButton priority_spinner;
40 Gtk::Adjustment ports_adjustment;
41 Gtk::SpinButton ports_spinner;
42 Gtk::SpinButton input_channels;
43 Gtk::SpinButton output_channels;
44 Gtk::SpinButton input_latency;
45 Gtk::SpinButton output_latency;
46 Gtk::Label latency_label;
48 Gtk::CheckButton realtime_button;
49 Gtk::CheckButton no_memory_lock_button;
50 Gtk::CheckButton unlock_memory_button;
51 Gtk::CheckButton soft_mode_button;
52 Gtk::CheckButton monitor_button;
53 Gtk::CheckButton force16bit_button;
54 Gtk::CheckButton hw_monitor_button;
55 Gtk::CheckButton hw_meter_button;
56 Gtk::CheckButton verbose_output_button;
58 Gtk::Button start_button;
59 Gtk::Button stop_button;
60 Gtk::HButtonBox button_box;
62 Gtk::ComboBoxText sample_rate_combo;
63 Gtk::ComboBoxText period_size_combo;
65 Gtk::ComboBoxText preset_combo;
66 Gtk::ComboBoxText serverpath_combo;
67 Gtk::ComboBoxText driver_combo;
68 Gtk::ComboBoxText interface_combo;
69 Gtk::ComboBoxText timeout_combo;
70 Gtk::ComboBoxText dither_mode_combo;
71 Gtk::ComboBoxText audio_mode_combo;
72 Gtk::ComboBoxText input_device_combo;
73 Gtk::ComboBoxText output_device_combo;
75 Gtk::Table basic_packer;
76 Gtk::Table options_packer;
77 Gtk::Table device_packer;
78 Gtk::HBox basic_hbox;
79 Gtk::HBox options_hbox;
80 Gtk::HBox device_hbox;
81 Gtk::Notebook notebook;
83 bool _used;
84 bool _interface_chosen;
86 void realtime_changed ();
87 void driver_changed ();
88 void build_command_line (std::vector<std::string>&);
90 std::map<std::string,std::vector<std::string> > devices;
91 std::vector<std::string> backend_devs;
92 void enumerate_devices (const string& driver);
94 #ifdef __APPLE__
95 std::vector<std::string> enumerate_coreaudio_devices ();
96 #else
97 std::vector<std::string> enumerate_alsa_devices ();
98 std::vector<std::string> enumerate_oss_devices ();
99 std::vector<std::string> enumerate_netjack_devices ();
100 std::vector<std::string> enumerate_ffado_devices ();
101 std::vector<std::string> enumerate_dummy_devices ();
102 #endif
104 void redisplay_latency ();
105 uint32_t get_rate();
106 void audio_mode_changed ();
107 std::vector<std::string> server_strings;
108 int server_row;
109 void find_jack_servers (std::vector<std::string>&);
110 std::string get_device_name (const std::string& driver, const std::string& human_readable_name);
113 #endif /* __gtk2_ardour_engine_dialog_h__ */