Skip to content

Commit 622b9e2

Browse files
Karl StavestrandKarl Stavestrand
Karl Stavestrand
authored and
Karl Stavestrand
committed
don't spawn audio thread when listing portaudio devices
1 parent d800dcf commit 622b9e2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cava.c

+5-1
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,11 @@ as of 0.4.0 all options are specified in config file, see in '/home/username/.co
464464
case INPUT_PORTAUDIO:
465465
audio.format = 16;
466466
audio.rate = 44100;
467-
thr_id = pthread_create(&p_thread, NULL, input_portaudio, (void *)&audio);
467+
if (!strcmp(audio.source, "list")) {
468+
input_portaudio((void *)&audio);
469+
} else {
470+
thr_id = pthread_create(&p_thread, NULL, input_portaudio, (void *)&audio);
471+
}
468472
break;
469473
#endif
470474
#ifdef PIPEWIRE

0 commit comments

Comments
 (0)