From a3c4d0ab1a7247253379e85efe73e3813f27b9ca Mon Sep 17 00:00:00 2001 From: bbedward Date: Mon, 26 Oct 2026 19:51:30 -0400 Subject: [PATCH] cava: stop the capture stream from dragging the pipewire quantum down ref #810 port 2.0 --- quickshell/Modules/DBar/Widgets/AudioVisualization.qml | 4 ++-- quickshell/Services/CavaService.qml | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/quickshell/Modules/DBar/Widgets/AudioVisualization.qml b/quickshell/Modules/DBar/Widgets/AudioVisualization.qml index 1f1128554..bd3d43e3c 100644 --- a/quickshell/Modules/DBar/Widgets/AudioVisualization.qml +++ b/quickshell/Modules/DBar/Widgets/AudioVisualization.qml @@ -29,7 +29,7 @@ Item { } Loader { - active: root.live + active: root.live && root.available sourceComponent: Component { Ref { service: CavaService @@ -39,7 +39,7 @@ Item { Connections { target: CavaService - enabled: root.live + enabled: root.live && root.available function onValuesChanged() { const v = CavaService.values; if (v.length < 6) diff --git a/quickshell/Services/CavaService.qml b/quickshell/Services/CavaService.qml index 315150bf0..d781c33f3 100644 --- a/quickshell/Services/CavaService.qml +++ b/quickshell/Services/CavaService.qml @@ -41,6 +41,11 @@ Singleton { id: cavaProcess running: root.cavaAvailable && root.refCount > 0 + // cava asks for 512 frames, which drags the graph quantum down on spawn and back up on exit, audible on some hardware (#810) + environment: ({ + "PIPEWIRE_LATENCY": "2400/48000", + "PULSE_LATENCY_MSEC": "50" + }) command: ["sh", "-c", `cat <<'CAVACONF' > ${root._confPath} [general] framerate=25