13
0

patch from Johan Mattson to make -I/-O options in engine dialog actually work (fixes #2975

git-svn-id: svn://localhost/ardour2/branches/3.0@7795 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2010-09-17 20:43:38 +00:00
parent bbb131d895
commit 4400489f15
2 changed files with 32 additions and 0 deletions

View File

@ -65,6 +65,10 @@ EngineControl::EngineControl ()
priority_spinner (priority_adjustment), priority_spinner (priority_adjustment),
ports_adjustment (128, 8, 1024, 1, 16), ports_adjustment (128, 8, 1024, 1, 16),
ports_spinner (ports_adjustment), ports_spinner (ports_adjustment),
input_latency_adjustment (0, 0, 99999, 1),
input_latency (input_latency_adjustment),
output_latency_adjustment (0, 0, 99999, 1),
output_latency (output_latency_adjustment),
realtime_button (_("Realtime")), realtime_button (_("Realtime")),
no_memory_lock_button (_("Do not lock memory")), no_memory_lock_button (_("Do not lock memory")),
unlock_memory_button (_("Unlock memory")), unlock_memory_button (_("Unlock memory")),
@ -584,6 +588,19 @@ EngineControl::build_command_line (vector<string>& cmd)
cmd.push_back ("-X raw"); cmd.push_back ("-X raw");
} }
double val = input_latency_adjustment.get_value();
if (val) {
cmd.push_back ("-I");
cmd.push_back (to_string ((uint32_t) val, std::dec));
}
val = output_latency_adjustment.get_value();
if (val) {
cmd.push_back ("-O");
cmd.push_back (to_string ((uint32_t) val, std::dec));
}
} else if (using_coreaudio) { } else if (using_coreaudio) {
#ifdef __APPLE__ #ifdef __APPLE__
@ -597,6 +614,19 @@ EngineControl::build_command_line (vector<string>& cmd)
cmd.push_back ("-d"); cmd.push_back ("-d");
cmd.push_back (device); cmd.push_back (device);
double val = input_latency_adjustment.get_value();
if (val) {
cmd.push_back ("-I");
cmd.push_back (to_string ((uint32_t) val, std::dec));
}
double val = output_latency_adjustment.get_value();
if (val) {
cmd.push_back ("-O");
cmd.push_back (to_string ((uint32_t) val, std::dec));
}
#endif #endif
} else if (using_oss) { } else if (using_oss) {

View File

@ -55,7 +55,9 @@ class EngineControl : public Gtk::VBox {
Gtk::SpinButton ports_spinner; Gtk::SpinButton ports_spinner;
Gtk::SpinButton input_channels; Gtk::SpinButton input_channels;
Gtk::SpinButton output_channels; Gtk::SpinButton output_channels;
Gtk::Adjustment input_latency_adjustment;
Gtk::SpinButton input_latency; Gtk::SpinButton input_latency;
Gtk::Adjustment output_latency_adjustment;
Gtk::SpinButton output_latency; Gtk::SpinButton output_latency;
Gtk::Label latency_label; Gtk::Label latency_label;