fix: misc music fixes + add visualizer options

This commit is contained in:
ferreo
2025-07-14 23:38:31 +01:00
parent c169e7702a
commit ab29e3a084
7 changed files with 129 additions and 19 deletions
+2 -4
View File
@@ -20,6 +20,7 @@ Scope {
mono_option: monoOption,
}
})
property var values: Array(count).fill(0) // 0 <= value <= 1
Process {
@@ -28,7 +29,7 @@ Scope {
stdinEnabled: true
running: MusicManager.isPlaying
command: ["cava", "-p", "/dev/stdin"]
onExited: { stdinEnabled = true; index = 0 }
onExited: { stdinEnabled = true; index = 0; values = []; }
onStarted: {
const iniParts = []
for (const k in config) {
@@ -55,9 +56,6 @@ Scope {
newValues[i + process.index] = Math.min(data.charCodeAt(i), 128) / 128
}
process.index += data.length
if (newValues.length !== values.length) {
console.log("length!", values.length, newValues.length)
}
values = newValues
}
}