Skip to content

Commit b278ece

Browse files
committed
aplay/jack: print the help even if no ports found
Even if no devices were found, print the help and empty list of devices. Without that, it would be missleading because the help shows nothing. Print the empty list ("Available deviviecs:" with nothing) also for acap/jack to make clear that there are actually no devices. improves 8597f39
1 parent dc102f7 commit b278ece

File tree

2 files changed

+0
-5
lines changed

2 files changed

+0
-5
lines changed

src/audio/capture/jack.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,6 @@ static void audio_cap_jack_help(const char *client_name)
127127
printf("\t\t<n> - name of the JACK client (default: %s)\n", PACKAGE_NAME);
128128
printf("\n");
129129

130-
if(!available_devices)
131-
return;
132-
133130
printf("Available devices:\n");
134131
for(i = 0; i < count; i++){
135132
printf("\t%s\n", available_devices[i].name);

src/audio/playback/jack.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,6 @@ static void audio_play_jack_help(const char *client_name)
136136
int count = 0;
137137
int i = 0;
138138
struct device_info *available_devices = audio_jack_probe(client_name, JackPortIsInput, &count);
139-
if(!available_devices)
140-
return;
141139

142140
printf("Usage:\n");
143141
printf("\t-r jack[:first_channel=<f>][:name=<n>][:<device>]\n");

0 commit comments

Comments
 (0)