2 Copyright (C) 2010 Paul Davis
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #ifndef __gtk2_ardour_engine_dialog_h__
21 #define __gtk2_ardour_engine_dialog_h__
27 #include <gtkmm/checkbutton.h>
28 #include <gtkmm/spinbutton.h>
29 #include <gtkmm/notebook.h>
30 #include <gtkmm/comboboxtext.h>
31 #include <gtkmm/table.h>
32 #include <gtkmm/expander.h>
33 #include <gtkmm/box.h>
34 #include <gtkmm/buttonbox.h>
35 #include <gtkmm/button.h>
37 class EngineControl
: public Gtk::VBox
{
42 static bool engine_running ();
45 bool was_used() const { return _used
; }
46 XMLNode
& get_state ();
47 void set_state (const XMLNode
&);
50 Gtk::Adjustment periods_adjustment
;
51 Gtk::SpinButton periods_spinner
;
52 Gtk::Adjustment priority_adjustment
;
53 Gtk::SpinButton priority_spinner
;
54 Gtk::Adjustment ports_adjustment
;
55 Gtk::SpinButton ports_spinner
;
56 Gtk::SpinButton input_channels
;
57 Gtk::SpinButton output_channels
;
58 Gtk::Adjustment input_latency_adjustment
;
59 Gtk::SpinButton input_latency
;
60 Gtk::Adjustment output_latency_adjustment
;
61 Gtk::SpinButton output_latency
;
62 Gtk::Label latency_label
;
64 Gtk::CheckButton realtime_button
;
65 Gtk::CheckButton no_memory_lock_button
;
66 Gtk::CheckButton unlock_memory_button
;
67 Gtk::CheckButton soft_mode_button
;
68 Gtk::CheckButton monitor_button
;
69 Gtk::CheckButton force16bit_button
;
70 Gtk::CheckButton hw_monitor_button
;
71 Gtk::CheckButton hw_meter_button
;
72 Gtk::CheckButton verbose_output_button
;
74 Gtk::Button start_button
;
75 Gtk::Button stop_button
;
76 Gtk::HButtonBox button_box
;
78 Gtk::ComboBoxText sample_rate_combo
;
79 Gtk::ComboBoxText period_size_combo
;
81 Gtk::ComboBoxText preset_combo
;
82 Gtk::ComboBoxText serverpath_combo
;
83 Gtk::ComboBoxText driver_combo
;
84 Gtk::ComboBoxText interface_combo
;
85 Gtk::ComboBoxText timeout_combo
;
86 Gtk::ComboBoxText dither_mode_combo
;
87 Gtk::ComboBoxText audio_mode_combo
;
88 Gtk::ComboBoxText input_device_combo
;
89 Gtk::ComboBoxText output_device_combo
;
90 Gtk::ComboBoxText midi_driver_combo
;
92 Gtk::Table basic_packer
;
93 Gtk::Table options_packer
;
94 Gtk::Table device_packer
;
96 Gtk::HBox options_hbox
;
97 Gtk::HBox device_hbox
;
98 Gtk::Notebook notebook
;
102 void realtime_changed ();
103 void driver_changed ();
104 void build_command_line (std::vector
<std::string
>&);
106 std::map
<std::string
,std::vector
<std::string
> > devices
;
107 std::vector
<std::string
> backend_devs
;
108 void enumerate_devices (const std::string
& driver
);
111 std::vector
<std::string
> enumerate_coreaudio_devices ();
113 std::vector
<std::string
> enumerate_alsa_devices ();
114 std::vector
<std::string
> enumerate_oss_devices ();
115 std::vector
<std::string
> enumerate_netjack_devices ();
116 std::vector
<std::string
> enumerate_freebob_devices ();
117 std::vector
<std::string
> enumerate_ffado_devices ();
118 std::vector
<std::string
> enumerate_dummy_devices ();
121 void redisplay_latency ();
123 void audio_mode_changed ();
124 std::vector
<std::string
> server_strings
;
125 void find_jack_servers (std::vector
<std::string
>&);
126 std::string
get_device_name (const std::string
& driver
, const std::string
& human_readable_name
);
129 #endif /* __gtk2_ardour_engine_dialog_h__ */