3
#include <gtkmm/stock.h>
4
#include <gtkmm2ext/utils.h>
6
#include "engine_dialog.h"
11
using namespace Gtkmm2ext;
13
EngineDialog::EngineDialog ()
14
: ArdourDialog (_("Audio Engine"), false, true),
15
realtime_button (_("Realtime")),
16
no_memory_lock_button (_("Do not lock memory")),
17
unlock_memory_button (_("Unlock memory")),
18
soft_mode_button (_("No zombies")),
19
monitor_button (_("Monitor ports")),
20
force16bit_button (_("Force 16 bit")),
21
hw_monitor_button (_("H/W monitoring")),
22
hw_meter_button (_("H/W metering")),
23
verbose_output_button (_("Verbose output")),
25
options_packer (11, 2),
28
using namespace Notebook_Helpers;
31
vector<string> strings;
33
strings.push_back (_("8000Hz"));
34
strings.push_back (_("22050Hz"));
35
strings.push_back (_("44100Hz"));
36
strings.push_back (_("48000Hz"));
37
strings.push_back (_("88200Hz"));
38
strings.push_back (_("96000Hz"));
39
strings.push_back (_("192000Hz"));
40
set_popdown_strings (sample_rate_combo, strings);
43
strings.push_back ("32");
44
strings.push_back ("64");
45
strings.push_back ("128");
46
strings.push_back ("256");
47
strings.push_back ("512");
48
strings.push_back ("1024");
49
strings.push_back ("2048");
50
strings.push_back ("4096");
51
strings.push_back ("8192");
52
set_popdown_strings (period_size_combo, strings);
56
basic_packer.set_spacings (6);
58
label = manage (new Label (_("Sample Rate")));
59
basic_packer.attach (*label, 0, 1, 0, 1, FILL|EXPAND, (AttachOptions) 0);
60
basic_packer.attach (sample_rate_combo, 1, 2, 0, 1, FILL|EXPAND, (AttachOptions) 0);
62
label = manage (new Label (_("Period Size")));
63
basic_packer.attach (*label, 0, 1, 1, 2, FILL|EXPAND, (AttachOptions) 0);
64
basic_packer.attach (period_size_combo, 1, 2, 1, 2, FILL|EXPAND, (AttachOptions) 0);
69
options_packer.attach (realtime_button, 0, 1, 0, 1, FILL|EXPAND, (AttachOptions) 0);
70
options_packer.attach (no_memory_lock_button, 0, 1, 1, 2, FILL|EXPAND, (AttachOptions) 0);
71
options_packer.attach (unlock_memory_button, 0, 1, 2, 3, FILL|EXPAND, (AttachOptions) 0);
72
options_packer.attach (monitor_button, 0, 1, 3, 4, FILL|EXPAND, (AttachOptions) 0);
73
options_packer.attach (soft_mode_button, 0, 1, 4, 5, FILL|EXPAND, (AttachOptions) 0);
74
options_packer.attach (force16bit_button, 0, 1, 5, 6, FILL|EXPAND, (AttachOptions) 0);
75
options_packer.attach (hw_monitor_button, 0, 1, 6, 7, FILL|EXPAND, (AttachOptions) 0);
76
options_packer.attach (hw_meter_button, 0, 1, 7, 8, FILL|EXPAND, (AttachOptions) 0);
77
options_packer.attach (verbose_output_button, 0, 1, 8, 9, FILL|EXPAND, (AttachOptions) 0);
78
options_packer.attach (priority_spinner, 0, 1, 9, 10, FILL|EXPAND, (AttachOptions) 0);
79
options_packer.attach (periods_spinner, 0, 1, 10, 11, FILL|EXPAND, (AttachOptions) 0);
83
device_packer.set_spacings (6);
87
strings.push_back (X_("ALSA"));
88
strings.push_back (X_("OSS"));
89
strings.push_back (X_("FFADO"));
91
strings.push_back (X_("CoreAudio"));
93
strings.push_back (X_("NetJACK"));
94
strings.push_back (X_("Dummy"));
95
set_popdown_strings (driver_combo, strings);
96
driver_combo.set_active_text (strings.front());
99
strings.push_back (_("Duplex"));
100
strings.push_back (_("Playback only"));
101
strings.push_back (_("Capture only"));
102
set_popdown_strings (audio_mode_combo, strings);
103
audio_mode_combo.set_active_text (strings.front());
105
label = manage (new Label (_("Driver")));
106
device_packer.attach (*label, 0, 1, 0, 1, FILL|EXPAND, (AttachOptions) 0);
107
device_packer.attach (driver_combo, 1, 2, 0, 1, FILL|EXPAND, (AttachOptions) 0);
108
label = manage (new Label (_("Interface")));
109
device_packer.attach (*label, 0, 1, 1, 2, FILL|EXPAND, (AttachOptions) 0);
110
device_packer.attach (interface_combo, 1, 2, 1, 2, FILL|EXPAND, (AttachOptions) 0);
111
label = manage (new Label (_("Audio Mode")));
112
device_packer.attach (*label, 0, 1, 2, 3, FILL|EXPAND, (AttachOptions) 0);
113
device_packer.attach (audio_mode_combo, 1, 2, 2, 3, FILL|EXPAND, (AttachOptions) 0);
114
label = manage (new Label (_("Input device")));
115
device_packer.attach (*label, 0, 1, 3, 4, FILL|EXPAND, (AttachOptions) 0);
116
device_packer.attach (input_device_combo, 1, 2, 3, 4, FILL|EXPAND, (AttachOptions) 0);
117
label = manage (new Label (_("Output device")));
118
device_packer.attach (*label, 0, 1, 4, 5, FILL|EXPAND, (AttachOptions) 0);
119
device_packer.attach (output_device_combo, 1, 2, 4, 5, FILL|EXPAND, (AttachOptions) 0);
120
label = manage (new Label (_("Input channels")));
121
device_packer.attach (*label, 0, 1, 5, 6, FILL|EXPAND, (AttachOptions) 0);
122
device_packer.attach (input_channels, 1, 2, 5, 6, FILL|EXPAND, (AttachOptions) 0);
123
label = manage (new Label (_("Output channels")));
124
device_packer.attach (*label, 0, 1, 6, 7, FILL|EXPAND, (AttachOptions) 0);
125
device_packer.attach (output_channels, 1, 2, 6, 7, FILL|EXPAND, (AttachOptions) 0);
126
label = manage (new Label (_("Input latency")));
127
device_packer.attach (*label, 0, 1, 7, 8, FILL|EXPAND, (AttachOptions) 0);
128
device_packer.attach (input_latency, 1, 2, 7, 8, FILL|EXPAND, (AttachOptions) 0);
129
label = manage (new Label (_("Output latency")));
130
device_packer.attach (*label, 0, 1, 8, 9, FILL|EXPAND, (AttachOptions) 0);
131
device_packer.attach (output_latency, 1, 2, 8, 9, FILL|EXPAND, (AttachOptions) 0);
133
notebook.pages().push_back (TabElem (basic_packer, _("Parameters")));
134
notebook.pages().push_back (TabElem (options_packer, _("Options")));
135
notebook.pages().push_back (TabElem (device_packer, _("Device")));
137
get_vbox()->set_border_width (12);
138
get_vbox()->pack_start (notebook);
140
add_button (Stock::OK, RESPONSE_ACCEPT);
143
EngineDialog::~EngineDialog ()