From 622b9e2437573d0683cad6574e392065095b9642 Mon Sep 17 00:00:00 2001 From: Karl Stavestrand Date: Sun, 27 Oct 2024 20:49:24 +0100 Subject: [PATCH] don't spawn audio thread when listing portaudio devices --- cava.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cava.c b/cava.c index 258d2963..a1c17b91 100644 --- a/cava.c +++ b/cava.c @@ -464,7 +464,11 @@ as of 0.4.0 all options are specified in config file, see in '/home/username/.co case INPUT_PORTAUDIO: audio.format = 16; audio.rate = 44100; - thr_id = pthread_create(&p_thread, NULL, input_portaudio, (void *)&audio); + if (!strcmp(audio.source, "list")) { + input_portaudio((void *)&audio); + } else { + thr_id = pthread_create(&p_thread, NULL, input_portaudio, (void *)&audio); + } break; #endif #ifdef PIPEWIRE