more SAE + gtkosx changes - try to find jackd in the bundle; hard code SAE session...
[ardour.git] / gtk2_ardour / engine_dialog.h
1 #ifndef __gtk2_ardour_engine_dialog_h__
2 #define __gtk2_ardour_engine_dialog_h__
3
4 #include <map>
5 #include <vector>
6 #include <string>
7
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>
17
18 class EngineControl : public Gtk::VBox {
19   public:
20         EngineControl ();
21         ~EngineControl ();
22
23         static bool engine_running ();
24         int start_engine ();
25         int stop_engine ();
26
27   private:
28         Gtk::Adjustment periods_adjustment;
29         Gtk::SpinButton periods_spinner;
30         Gtk::Adjustment priority_adjustment;
31         Gtk::SpinButton priority_spinner;
32         Gtk::Adjustment ports_adjustment;
33         Gtk::SpinButton ports_spinner;
34         Gtk::SpinButton input_channels;
35         Gtk::SpinButton output_channels;
36         Gtk::SpinButton input_latency;
37         Gtk::SpinButton output_latency;
38         Gtk::Label latency_label;
39
40         Gtk::CheckButton realtime_button;
41         Gtk::CheckButton no_memory_lock_button;
42         Gtk::CheckButton unlock_memory_button;
43         Gtk::CheckButton soft_mode_button;
44         Gtk::CheckButton monitor_button;
45         Gtk::CheckButton force16bit_button;
46         Gtk::CheckButton hw_monitor_button;
47         Gtk::CheckButton hw_meter_button;
48         Gtk::CheckButton verbose_output_button;
49         
50         Gtk::Button start_button;
51         Gtk::Button stop_button;
52         Gtk::HButtonBox button_box;
53
54         Gtk::ComboBoxText sample_rate_combo;
55         Gtk::ComboBoxText period_size_combo;
56
57         Gtk::ComboBoxText preset_combo;
58         Gtk::ComboBoxText serverpath_combo;
59         Gtk::ComboBoxText driver_combo;
60         Gtk::ComboBoxText interface_combo;
61         Gtk::ComboBoxText timeout_combo;
62         Gtk::ComboBoxText dither_mode_combo;
63         Gtk::ComboBoxText audio_mode_combo;
64         Gtk::ComboBoxText input_device_combo;
65         Gtk::ComboBoxText output_device_combo;
66
67         Gtk::Table basic_packer;
68         Gtk::Table options_packer;
69         Gtk::Table device_packer;
70
71         Gtk::Notebook notebook;
72
73         void realtime_changed ();
74         void driver_changed ();
75
76         void build_command_line (std::vector<std::string>&);
77         Glib::Pid engine_pid;
78         int engine_stdin;
79         int engine_stdout;
80         int engine_stderr;
81
82         std::map<std::string,std::vector<std::string> > devices;
83         void enumerate_devices ();
84 #ifdef __APPLE
85         std::vector<std::string> enumerate_coreaudio_devices ();
86 #else
87         std::vector<std::string> enumerate_alsa_devices ();
88         std::vector<std::string> enumerate_oss_devices ();
89         std::vector<std::string> enumerate_netjack_devices ();
90         std::vector<std::string> enumerate_ffado_devices ();
91         std::vector<std::string> enumerate_dummy_devices ();
92 #endif  
93
94         void redisplay_latency ();
95         uint32_t get_rate();
96         void audio_mode_changed ();
97         void find_jack_servers (std::vector<std::string>&);
98 };
99
100 #endif /* __gtk2_ardour_engine_dialog_h__ */