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 8597f39b
This commit is contained in:
Martin Pulec
2025-04-15 10:17:28 +02:00
parent dc102f7b27
commit b278ecefbf
2 changed files with 0 additions and 5 deletions

View File

@@ -127,9 +127,6 @@ static void audio_cap_jack_help(const char *client_name)
printf("\t\t<n> - name of the JACK client (default: %s)\n", PACKAGE_NAME);
printf("\n");
if(!available_devices)
return;
printf("Available devices:\n");
for(i = 0; i < count; i++){
printf("\t%s\n", available_devices[i].name);

View File

@@ -136,8 +136,6 @@ static void audio_play_jack_help(const char *client_name)
int count = 0;
int i = 0;
struct device_info *available_devices = audio_jack_probe(client_name, JackPortIsInput, &count);
if(!available_devices)
return;
printf("Usage:\n");
printf("\t-r jack[:first_channel=<f>][:name=<n>][:<device>]\n");