CavaService improvements
- bring back autosens for better visualization at low volume input - enable Cava process as long as we have a visualizer and the sidePanel is open, this helps capture audio when there is no active mpris player (ex: mpv, game audio, etc...)
This commit is contained in:
parent
c5c06449bd
commit
5419b7134e
3 changed files with 10 additions and 4 deletions
|
|
@ -3,6 +3,7 @@ pragma Singleton
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import Quickshell
|
import Quickshell
|
||||||
import Quickshell.Io
|
import Quickshell.Io
|
||||||
|
import qs.Commons
|
||||||
|
|
||||||
Singleton {
|
Singleton {
|
||||||
id: root
|
id: root
|
||||||
|
|
@ -14,9 +15,8 @@ Singleton {
|
||||||
"general": {
|
"general": {
|
||||||
"bars": barsCount,
|
"bars": barsCount,
|
||||||
"framerate": 60,
|
"framerate": 60,
|
||||||
"autosens": 0,
|
"autosens": 1,
|
||||||
"overshoot": 0,
|
"sensitivity": 100,
|
||||||
"sensitivity": 200,
|
|
||||||
"lower_cutoff_freq": 50,
|
"lower_cutoff_freq": 50,
|
||||||
"higher_cutoff_freq": 12000
|
"higher_cutoff_freq": 12000
|
||||||
},
|
},
|
||||||
|
|
@ -37,7 +37,7 @@ Singleton {
|
||||||
Process {
|
Process {
|
||||||
id: process
|
id: process
|
||||||
stdinEnabled: true
|
stdinEnabled: true
|
||||||
running: MediaService.isPlaying
|
running: (Settings.data.audio.visualizerType !== "none") && PanelService.sidePanel.isLoaded
|
||||||
command: ["cava", "-p", "/dev/stdin"]
|
command: ["cava", "-p", "/dev/stdin"]
|
||||||
onExited: {
|
onExited: {
|
||||||
stdinEnabled = true
|
stdinEnabled = true
|
||||||
|
|
|
||||||
|
|
@ -5,5 +5,8 @@ import Quickshell
|
||||||
Singleton {
|
Singleton {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
|
// Currently opened panel
|
||||||
property var openedPanel: null
|
property var openedPanel: null
|
||||||
|
|
||||||
|
property var sidePanel: null
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,9 @@ ShellRoot {
|
||||||
IPCManager {}
|
IPCManager {}
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
|
// Save a ref. to our sidePanel so we can access it from services
|
||||||
|
PanelService.sidePanel = sidePanel
|
||||||
|
|
||||||
// Ensure our singleton is created as soon as possible so we start fetching weather asap
|
// Ensure our singleton is created as soon as possible so we start fetching weather asap
|
||||||
LocationService.init()
|
LocationService.init()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue