Remove an unnecessary boolean argument in jack utils
Specify latency in JackCommandLineOptions instead
This commit is contained in:
parent
ef0f13cb84
commit
34d9b2148e
@ -464,8 +464,13 @@ JACKAudioBackend::setup_jack_startup_command (bool for_latency_measurement)
|
|||||||
options.num_periods = 2;
|
options.num_periods = 2;
|
||||||
options.input_device = _target_device;
|
options.input_device = _target_device;
|
||||||
options.output_device = _target_device;
|
options.output_device = _target_device;
|
||||||
options.input_latency = _target_systemic_input_latency;
|
if (for_latency_measurement) {
|
||||||
options.output_latency = _target_systemic_output_latency;
|
options.input_latency = 0;
|
||||||
|
options.output_latency = 0;
|
||||||
|
} else {
|
||||||
|
options.input_latency = _target_systemic_input_latency;
|
||||||
|
options.output_latency = _target_systemic_output_latency;
|
||||||
|
}
|
||||||
options.input_channels = _target_input_channels;
|
options.input_channels = _target_input_channels;
|
||||||
options.output_channels = _target_output_channels;
|
options.output_channels = _target_output_channels;
|
||||||
if (_target_sample_format == FormatInt16) {
|
if (_target_sample_format == FormatInt16) {
|
||||||
@ -483,7 +488,7 @@ JACKAudioBackend::setup_jack_startup_command (bool for_latency_measurement)
|
|||||||
|
|
||||||
string cmdline;
|
string cmdline;
|
||||||
|
|
||||||
if (!get_jack_command_line_string (options, cmdline, for_latency_measurement)) {
|
if (!get_jack_command_line_string (options, cmdline)) {
|
||||||
/* error, somehow - we will still try to start JACK
|
/* error, somehow - we will still try to start JACK
|
||||||
* automatically but it will be without our preferred options
|
* automatically but it will be without our preferred options
|
||||||
*/
|
*/
|
||||||
|
@ -688,7 +688,7 @@ ARDOUR::JackCommandLineOptions::JackCommandLineOptions ()
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
ARDOUR::get_jack_command_line_string (JackCommandLineOptions& options, string& command_line, bool for_latency_measurement)
|
ARDOUR::get_jack_command_line_string (JackCommandLineOptions& options, string& command_line)
|
||||||
{
|
{
|
||||||
vector<string> args;
|
vector<string> args;
|
||||||
|
|
||||||
@ -841,7 +841,7 @@ ARDOUR::get_jack_command_line_string (JackCommandLineOptions& options, string& c
|
|||||||
args.push_back ("-p");
|
args.push_back ("-p");
|
||||||
args.push_back (to_string (options.period_size, std::dec));
|
args.push_back (to_string (options.period_size, std::dec));
|
||||||
|
|
||||||
if (!for_latency_measurement && get_jack_audio_driver_supports_latency_adjustment (options.driver)) {
|
if (get_jack_audio_driver_supports_latency_adjustment (options.driver)) {
|
||||||
if (options.input_latency) {
|
if (options.input_latency) {
|
||||||
args.push_back ("-I");
|
args.push_back ("-I");
|
||||||
args.push_back (to_string (options.input_latency, std::dec));
|
args.push_back (to_string (options.input_latency, std::dec));
|
||||||
|
@ -236,5 +236,5 @@ namespace ARDOUR {
|
|||||||
/**
|
/**
|
||||||
* @return true if able to build a valid command line based on options
|
* @return true if able to build a valid command line based on options
|
||||||
*/
|
*/
|
||||||
bool get_jack_command_line_string (JackCommandLineOptions& options, std::string& command_line, bool for_latency_measurement);
|
bool get_jack_command_line_string (JackCommandLineOptions& options, std::string& command_line);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user