From b278ecefbf3819184ef96a9397ed59ea337c0e6f Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Tue, 15 Apr 2025 10:17:28 +0200 Subject: [PATCH] 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 --- src/audio/capture/jack.c | 3 --- src/audio/playback/jack.c | 2 -- 2 files changed, 5 deletions(-) diff --git a/src/audio/capture/jack.c b/src/audio/capture/jack.c index 48b04956c..ec327092b 100644 --- a/src/audio/capture/jack.c +++ b/src/audio/capture/jack.c @@ -127,9 +127,6 @@ static void audio_cap_jack_help(const char *client_name) printf("\t\t - 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); diff --git a/src/audio/playback/jack.c b/src/audio/playback/jack.c index f3f3dabd3..6c53d2aa5 100644 --- a/src/audio/playback/jack.c +++ b/src/audio/playback/jack.c @@ -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=][:name=][:]\n");