diff --git a/backend-release.json b/backend-release.json index c4bb431..66e1428 100644 --- a/backend-release.json +++ b/backend-release.json @@ -1,7 +1,7 @@ { - "buildId": "f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c", + "buildId": "dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667", "target": "x86_64-unknown-linux-gnu", "version": "0.1.0", "protocolVersion": 1, - "sha256": "128b51b94609a7efbb8684de17eabd7066d74163770eb2e314e739185f6fc093" + "sha256": "ac324d4fae4be760b0795313127ac498283d6369988140e1dd004126e2cc3caa" } diff --git a/bin/omarchy-audio-service b/bin/omarchy-audio-service index f211b3c..f0ed4e9 100755 Binary files a/bin/omarchy-audio-service and b/bin/omarchy-audio-service differ diff --git a/manifest.json b/manifest.json index d12262c..e5e110e 100644 --- a/manifest.json +++ b/manifest.json @@ -11,9 +11,9 @@ "service" ], "entryPoints": { - "barWidget": "runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/panels/Panel.qml", - "panel": "runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/panels/AdvancedAudio.qml", - "service": "runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/core/Service.qml" + "barWidget": "runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/panels/Panel.qml", + "panel": "runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/panels/AdvancedAudio.qml", + "service": "runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/core/Service.qml" }, "barWidget": { "displayName": "Advanced Audio Control", diff --git a/qml/core/Model.js b/qml/core/Model.js index 710e5da..1410018 100644 --- a/qml/core/Model.js +++ b/qml/core/Model.js @@ -74,15 +74,42 @@ function isMonitorSource(node) { } // Quickshell's peak capture cannot start on a null-audio-sink presented as a -// source. Keep the source selectable; only omit its silent input meter. +// source, nor on a pro-audio source whose channels are all AUX positions: the +// capture stream asks for standard positions and Quickshell logs an error for +// every buffer. Keep the source selectable; only omit its input meter. function inputPeakSupported(node) { try { - return !!node && String(nodeProps(node)["factory.name"] || "") !== "support.null-audio-sink" + if (!node) return false + var properties = nodeProps(node) + if (String(properties["factory.name"] || "") === "support.null-audio-sink") return false + // PipeWire accepts bare SPA-JSON positions and quoted JSON strings. + var positions = String(properties["audio.position"] || "") + .match(/"(?:[^"\\]|\\.)*"|[^\s,\[\]]+/g) || [] + return positions.length === 0 || !positions.every(function(position) { + if (position.charAt(0) === '"') position = JSON.parse(position) + return /^AUX\d+$/i.test(position) + }) + } catch (e) { + return false + } +} + +// Visualizers and system-audio recorders capture a sink's monitor, not a +// microphone, so they must not count as microphone use. +function capturesSinkMonitor(node) { + try { + var value = nodeProps(node)["stream.capture.sink"] + return value === true || String(value) === "true" } catch (e) { return false } } +function microphoneRecordingStreams(streams) { + var values = Array.isArray(streams) ? streams : [] + return values.filter(function(node) { return !capturesSinkMonitor(node) }) +} + // Keep PipeWire classification in one place so every surface excludes the // plugin's own streams and monitor sources consistently. QML list properties // are array-like rather than true Arrays, hence the length-based input check. @@ -1340,6 +1367,8 @@ if (typeof module !== "undefined") { isInternalAudioNode: isInternalAudioNode, isMonitorSource: isMonitorSource, inputPeakSupported: inputPeakSupported, + capturesSinkMonitor: capturesSinkMonitor, + microphoneRecordingStreams: microphoneRecordingStreams, classifyAudioNodes: classifyAudioNodes, listSnapshot: listSnapshot, hasOwn: hasOwn, diff --git a/qml/panels/Panel.qml b/qml/panels/Panel.qml index f09923b..eec2be5 100644 --- a/qml/panels/Panel.qml +++ b/qml/panels/Panel.qml @@ -205,7 +205,8 @@ Panel { return list } - readonly property var activeRecordingLabels: Model.uniqueRecordingStreamLabels(recordingStreams) + readonly property var activeRecordingLabels: Model.uniqueRecordingStreamLabels( + Model.microphoneRecordingStreams(recordingStreams)) readonly property int recordingApplicationCount: activeRecordingLabels.length readonly property real inputPeakLevel: { if (inputMuted) return 0 diff --git a/runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/components/AudioBalanceRow.qml b/runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/components/AudioBalanceRow.qml similarity index 100% rename from runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/components/AudioBalanceRow.qml rename to runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/components/AudioBalanceRow.qml diff --git a/runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/components/AudioBarIcon.qml b/runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/components/AudioBarIcon.qml similarity index 100% rename from runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/components/AudioBarIcon.qml rename to runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/components/AudioBarIcon.qml diff --git a/runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/components/AudioDropdown.qml b/runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/components/AudioDropdown.qml similarity index 100% rename from runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/components/AudioDropdown.qml rename to runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/components/AudioDropdown.qml diff --git a/runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/components/AudioSinkRow.qml b/runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/components/AudioSinkRow.qml similarity index 100% rename from runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/components/AudioSinkRow.qml rename to runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/components/AudioSinkRow.qml diff --git a/runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/components/AudioSlider.qml b/runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/components/AudioSlider.qml similarity index 100% rename from runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/components/AudioSlider.qml rename to runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/components/AudioSlider.qml diff --git a/runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/components/AudioSourceRow.qml b/runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/components/AudioSourceRow.qml similarity index 100% rename from runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/components/AudioSourceRow.qml rename to runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/components/AudioSourceRow.qml diff --git a/runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/components/AudioStreamRow.qml b/runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/components/AudioStreamRow.qml similarity index 100% rename from runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/components/AudioStreamRow.qml rename to runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/components/AudioStreamRow.qml diff --git a/runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/core/AudioNodeModel.qml b/runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/core/AudioNodeModel.qml similarity index 100% rename from runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/core/AudioNodeModel.qml rename to runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/core/AudioNodeModel.qml diff --git a/runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/core/AudioProtocol.js b/runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/core/AudioProtocol.js similarity index 100% rename from runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/core/AudioProtocol.js rename to runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/core/AudioProtocol.js diff --git a/runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/core/AudioRuntime.qml b/runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/core/AudioRuntime.qml similarity index 100% rename from runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/core/AudioRuntime.qml rename to runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/core/AudioRuntime.qml diff --git a/runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/core/Model.js b/runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/core/Model.js similarity index 97% rename from runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/core/Model.js rename to runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/core/Model.js index 710e5da..1410018 100644 --- a/runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/core/Model.js +++ b/runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/core/Model.js @@ -74,15 +74,42 @@ function isMonitorSource(node) { } // Quickshell's peak capture cannot start on a null-audio-sink presented as a -// source. Keep the source selectable; only omit its silent input meter. +// source, nor on a pro-audio source whose channels are all AUX positions: the +// capture stream asks for standard positions and Quickshell logs an error for +// every buffer. Keep the source selectable; only omit its input meter. function inputPeakSupported(node) { try { - return !!node && String(nodeProps(node)["factory.name"] || "") !== "support.null-audio-sink" + if (!node) return false + var properties = nodeProps(node) + if (String(properties["factory.name"] || "") === "support.null-audio-sink") return false + // PipeWire accepts bare SPA-JSON positions and quoted JSON strings. + var positions = String(properties["audio.position"] || "") + .match(/"(?:[^"\\]|\\.)*"|[^\s,\[\]]+/g) || [] + return positions.length === 0 || !positions.every(function(position) { + if (position.charAt(0) === '"') position = JSON.parse(position) + return /^AUX\d+$/i.test(position) + }) + } catch (e) { + return false + } +} + +// Visualizers and system-audio recorders capture a sink's monitor, not a +// microphone, so they must not count as microphone use. +function capturesSinkMonitor(node) { + try { + var value = nodeProps(node)["stream.capture.sink"] + return value === true || String(value) === "true" } catch (e) { return false } } +function microphoneRecordingStreams(streams) { + var values = Array.isArray(streams) ? streams : [] + return values.filter(function(node) { return !capturesSinkMonitor(node) }) +} + // Keep PipeWire classification in one place so every surface excludes the // plugin's own streams and monitor sources consistently. QML list properties // are array-like rather than true Arrays, hence the length-based input check. @@ -1340,6 +1367,8 @@ if (typeof module !== "undefined") { isInternalAudioNode: isInternalAudioNode, isMonitorSource: isMonitorSource, inputPeakSupported: inputPeakSupported, + capturesSinkMonitor: capturesSinkMonitor, + microphoneRecordingStreams: microphoneRecordingStreams, classifyAudioNodes: classifyAudioNodes, listSnapshot: listSnapshot, hasOwn: hasOwn, diff --git a/runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/core/ReleasePaths.js b/runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/core/ReleasePaths.js similarity index 50% rename from runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/core/ReleasePaths.js rename to runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/core/ReleasePaths.js index 98f33cf..73293ce 100644 --- a/runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/core/ReleasePaths.js +++ b/runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/core/ReleasePaths.js @@ -1,3 +1,3 @@ // Generated release paths; edit the qml sources instead. var root = "../../../../" -var buildId = "f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c" +var buildId = "dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667" diff --git a/runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/core/Service.qml b/runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/core/Service.qml similarity index 100% rename from runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/core/Service.qml rename to runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/core/Service.qml diff --git a/runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/devices/AudioBluetoothPreferenceRow.qml b/runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/devices/AudioBluetoothPreferenceRow.qml similarity index 100% rename from runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/devices/AudioBluetoothPreferenceRow.qml rename to runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/devices/AudioBluetoothPreferenceRow.qml diff --git a/runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/devices/AudioDevicePrefRow.qml b/runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/devices/AudioDevicePrefRow.qml similarity index 100% rename from runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/devices/AudioDevicePrefRow.qml rename to runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/devices/AudioDevicePrefRow.qml diff --git a/runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/devices/AudioPortRow.qml b/runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/devices/AudioPortRow.qml similarity index 100% rename from runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/devices/AudioPortRow.qml rename to runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/devices/AudioPortRow.qml diff --git a/runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/devices/AudioProfileRow.qml b/runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/devices/AudioProfileRow.qml similarity index 100% rename from runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/devices/AudioProfileRow.qml rename to runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/devices/AudioProfileRow.qml diff --git a/runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/diagnostics/AudioDiagnosticActionRow.qml b/runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/diagnostics/AudioDiagnosticActionRow.qml similarity index 100% rename from runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/diagnostics/AudioDiagnosticActionRow.qml rename to runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/diagnostics/AudioDiagnosticActionRow.qml diff --git a/runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/diagnostics/AudioDiagnosticsController.qml b/runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/diagnostics/AudioDiagnosticsController.qml similarity index 100% rename from runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/diagnostics/AudioDiagnosticsController.qml rename to runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/diagnostics/AudioDiagnosticsController.qml diff --git a/runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/diagnostics/AudioDiagnosticsView.qml b/runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/diagnostics/AudioDiagnosticsView.qml similarity index 100% rename from runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/diagnostics/AudioDiagnosticsView.qml rename to runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/diagnostics/AudioDiagnosticsView.qml diff --git a/runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/microphone/AudioMicrophoneTestController.qml b/runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/microphone/AudioMicrophoneTestController.qml similarity index 100% rename from runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/microphone/AudioMicrophoneTestController.qml rename to runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/microphone/AudioMicrophoneTestController.qml diff --git a/runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/microphone/MicrophoneTestRow.qml b/runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/microphone/MicrophoneTestRow.qml similarity index 100% rename from runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/microphone/MicrophoneTestRow.qml rename to runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/microphone/MicrophoneTestRow.qml diff --git a/runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/panels/AdvancedAudio.qml b/runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/panels/AdvancedAudio.qml similarity index 100% rename from runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/panels/AdvancedAudio.qml rename to runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/panels/AdvancedAudio.qml diff --git a/runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/panels/Panel.qml b/runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/panels/Panel.qml similarity index 99% rename from runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/panels/Panel.qml rename to runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/panels/Panel.qml index f09923b..eec2be5 100644 --- a/runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/panels/Panel.qml +++ b/runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/panels/Panel.qml @@ -205,7 +205,8 @@ Panel { return list } - readonly property var activeRecordingLabels: Model.uniqueRecordingStreamLabels(recordingStreams) + readonly property var activeRecordingLabels: Model.uniqueRecordingStreamLabels( + Model.microphoneRecordingStreams(recordingStreams)) readonly property int recordingApplicationCount: activeRecordingLabels.length readonly property real inputPeakLevel: { if (inputMuted) return 0 diff --git a/runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/policy/AudioPolicyController.qml b/runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/policy/AudioPolicyController.qml similarity index 100% rename from runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/policy/AudioPolicyController.qml rename to runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/policy/AudioPolicyController.qml diff --git a/runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/policy/AudioPolicyToggleRow.qml b/runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/policy/AudioPolicyToggleRow.qml similarity index 100% rename from runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/policy/AudioPolicyToggleRow.qml rename to runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/policy/AudioPolicyToggleRow.qml diff --git a/runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/policy/AudioPolicyVolumeRow.qml b/runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/policy/AudioPolicyVolumeRow.qml similarity index 100% rename from runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/policy/AudioPolicyVolumeRow.qml rename to runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/policy/AudioPolicyVolumeRow.qml diff --git a/runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/routing/AudioAppRuleRow.qml b/runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/routing/AudioAppRuleRow.qml similarity index 100% rename from runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/routing/AudioAppRuleRow.qml rename to runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/routing/AudioAppRuleRow.qml diff --git a/runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/routing/AudioOutputGroupCreateRow.qml b/runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/routing/AudioOutputGroupCreateRow.qml similarity index 100% rename from runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/routing/AudioOutputGroupCreateRow.qml rename to runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/routing/AudioOutputGroupCreateRow.qml diff --git a/runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/routing/AudioOutputGroupMemberLevel.qml b/runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/routing/AudioOutputGroupMemberLevel.qml similarity index 100% rename from runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/routing/AudioOutputGroupMemberLevel.qml rename to runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/routing/AudioOutputGroupMemberLevel.qml diff --git a/runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/routing/AudioOutputGroupRow.qml b/runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/routing/AudioOutputGroupRow.qml similarity index 100% rename from runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/routing/AudioOutputGroupRow.qml rename to runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/routing/AudioOutputGroupRow.qml diff --git a/runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/routing/AudioOutputGroupsController.qml b/runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/routing/AudioOutputGroupsController.qml similarity index 100% rename from runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/routing/AudioOutputGroupsController.qml rename to runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/routing/AudioOutputGroupsController.qml diff --git a/runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/routing/AudioRulesController.qml b/runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/routing/AudioRulesController.qml similarity index 100% rename from runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/routing/AudioRulesController.qml rename to runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/routing/AudioRulesController.qml diff --git a/runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/scenes/AudioSceneController.qml b/runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/scenes/AudioSceneController.qml similarity index 100% rename from runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/scenes/AudioSceneController.qml rename to runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/scenes/AudioSceneController.qml diff --git a/runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/scenes/AudioSceneRow.qml b/runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/scenes/AudioSceneRow.qml similarity index 100% rename from runtime/f60c7acb0850c90f63d5a68cf3a62bc20fb96b25e8062e0705422ba3cb56ff0c/qml/scenes/AudioSceneRow.qml rename to runtime/dbca1daa77eabc715124defe44540e45a3f412bf9f7f76d4eb1ab5fe8cb79667/qml/scenes/AudioSceneRow.qml diff --git a/test/all b/test/all index b54fb97..da6a1f4 100755 --- a/test/all +++ b/test/all @@ -403,6 +403,38 @@ assert.equal(model.inputPeakSupported({ ready: true, properties: { assert.equal(model.inputPeakSupported({ ready: true, properties: { 'factory.name': 'api.alsa.pcm.source', 'media.class': 'Audio/Source' }}), true) +assert.equal(model.inputPeakSupported({ ready: true, properties: { + 'factory.name': 'api.alsa.pcm.source', 'media.class': 'Audio/Source', + 'audio.position': '[ AUX0 ]' +}}), false) +assert.equal(model.inputPeakSupported({ ready: true, properties: { + 'factory.name': 'api.alsa.pcm.source', 'audio.position': 'AUX0,AUX1,AUX2,AUX3' +}}), false) +for (const positions of ['[ "AUX0" ]', '["AUX0", "AUX1"]', '[ "AUX0" "AUX1" ]']) { + assert.equal(model.inputPeakSupported({ ready: true, properties: { + 'factory.name': 'api.alsa.pcm.source', 'audio.position': positions + }}), false, positions) +} +assert.equal(model.inputPeakSupported({ ready: true, properties: { + 'factory.name': 'api.alsa.pcm.source', 'audio.position': '[ MONO ]' +}}), true) +assert.equal(model.inputPeakSupported({ ready: true, properties: { + 'factory.name': 'api.alsa.pcm.source', 'audio.position': 'FL,FR' +}}), true) +for (const positions of ['[ "MONO" ]', '["FL", "FR"]']) { + assert.equal(model.inputPeakSupported({ ready: true, properties: { + 'factory.name': 'api.alsa.pcm.source', 'audio.position': positions + }}), true, positions) +} +const visualizerStream = { + name: 'cava', isStream: true, isSink: false, ready: true, audio: {}, + properties: { 'application.name': 'cava', 'stream.capture.sink': 'true' } +} +assert.equal(model.capturesSinkMonitor(visualizerStream), true) +assert.equal(model.capturesSinkMonitor(recordingStream), false) +assert.deepEqual(model.microphoneRecordingStreams([recordingStream, visualizerStream]) + .map(node => node.name), ['firefox-capture']) +assert.deepEqual(model.microphoneRecordingStreams(null), []) assert.equal(model.isPlaybackStream({ isStream: true, isSink: false, type: 'Stream/Output/Audio' }), false)