summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Fletcher <colin.m.fletcher@googlemail.com>2013-10-23 16:03:18 +0100
committerColin Fletcher <colin.m.fletcher@googlemail.com>2013-10-23 19:27:09 +0100
commitac81ea642e2448abed8dbb697fa7ee662079832f (patch)
tree1bd85fb45189b29c5992abfcff36252229bc3bd4
parenta4b6a4f8bbc475f7bf26b96c2a0be093b42452a1 (diff)
Don't fail jackd command line creation for jack dummy backend.
The dummy jackd backend doesn't require a device to be specified, so much of the error checking in get_jack_command_line_string() is irrelevant, if not actively wrong, when the dummy backend is specified. Only perform the checks if the chosen jack backend is not the dummy.
-rw-r--r--libs/backends/jack/jack_utils.cc65
1 files changed, 34 insertions, 31 deletions
diff --git a/libs/backends/jack/jack_utils.cc b/libs/backends/jack/jack_utils.cc
index 92f175d9cb..0aa0eca9b1 100644
--- a/libs/backends/jack/jack_utils.cc
+++ b/libs/backends/jack/jack_utils.cc
@@ -756,6 +756,9 @@ ARDOUR::get_jack_command_line_string (JackCommandLineOptions& options, string& c
string command_line_driver_name;
+ string command_line_input_device_name;
+ string command_line_output_device_name;
+
if (!get_jack_command_line_audio_driver_name (options.driver, command_line_driver_name)) {
return false;
}
@@ -763,44 +766,44 @@ ARDOUR::get_jack_command_line_string (JackCommandLineOptions& options, string& c
args.push_back ("-d");
args.push_back (command_line_driver_name);
- if (options.output_device.empty() && options.input_device.empty()) {
- return false;
- }
-
- string command_line_input_device_name;
- string command_line_output_device_name;
+ if (options.driver != dummy_driver_name) {
+ if (options.output_device.empty() && options.input_device.empty()) {
+ return false;
+ }
- if (!get_jack_command_line_audio_device_name (options.driver,
- options.input_device, command_line_input_device_name)) {
- return false;
- }
- if (!get_jack_command_line_audio_device_name (options.driver,
- options.output_device, command_line_output_device_name)) {
- return false;
- }
-
- if (options.input_device.empty()) {
- // playback only
- if (options.output_device.empty()) {
+ if (!get_jack_command_line_audio_device_name (options.driver,
+ options.input_device, command_line_input_device_name)) {
return false;
}
- args.push_back ("-P");
- } else if (options.output_device.empty()) {
- // capture only
- if (options.input_device.empty()) {
+
+ if (!get_jack_command_line_audio_device_name (options.driver,
+ options.output_device, command_line_output_device_name)) {
return false;
}
- args.push_back ("-C");
- } else if (options.input_device != options.output_device) {
- // capture and playback on two devices if supported
- if (get_jack_audio_driver_supports_two_devices (options.driver)) {
- args.push_back ("-C");
- args.push_back (command_line_input_device_name);
+
+ if (options.input_device.empty()) {
+ // playback only
+ if (options.output_device.empty()) {
+ return false;
+ }
args.push_back ("-P");
- args.push_back (command_line_output_device_name);
- } else {
- return false;
+ } else if (options.output_device.empty()) {
+ // capture only
+ if (options.input_device.empty()) {
+ return false;
+ }
+ args.push_back ("-C");
+ } else if (options.input_device != options.output_device) {
+ // capture and playback on two devices if supported
+ if (get_jack_audio_driver_supports_two_devices (options.driver)) {
+ args.push_back ("-C");
+ args.push_back (command_line_input_device_name);
+ args.push_back ("-P");
+ args.push_back (command_line_output_device_name);
+ } else {
+ return false;
+ }
}
}