volume mixer: manual node filtering to make it work with easyeffects

This commit is contained in:
end-4
2025-06-29 08:51:07 +02:00
parent 36db4ae327
commit fdc0f16b08
@@ -16,6 +16,10 @@ Item {
property bool deviceSelectorInput property bool deviceSelectorInput
property int dialogMargins: 16 property int dialogMargins: 16
property PwNode selectedDevice property PwNode selectedDevice
readonly property list<PwNode> appPwNodes: Pipewire.nodes.values.filter((node) => {
// return node.type == "21" // Alternative, not as clean
return node.isSink && node.isStream
})
function showDeviceSelectorDialog(input: bool) { function showDeviceSelectorDialog(input: bool) {
root.selectedDevice = null root.selectedDevice = null
@@ -59,21 +63,13 @@ Item {
anchors.margins: 10 anchors.margins: 10
spacing: 10 spacing: 10
// Get a list of nodes that output to the default sink
PwNodeLinkTracker {
id: linkTracker
node: Pipewire.defaultAudioSink
}
Repeater { Repeater {
model: linkTracker.linkGroups model: root.appPwNodes
VolumeMixerEntry { VolumeMixerEntry {
Layout.fillWidth: true Layout.fillWidth: true
// Get links to the default sinnk required property var modelData
required property PwLinkGroup modelData node: modelData
// Consider sources that output to the default sink
node: modelData.source
} }
} }
} }
@@ -84,7 +80,7 @@ Item {
anchors.fill: flickable anchors.fill: flickable
visible: opacity > 0 visible: opacity > 0
opacity: (linkTracker.linkGroups.length === 0) ? 1 : 0 opacity: (root.appPwNodes.length === 0) ? 1 : 0
Behavior on opacity { Behavior on opacity {
NumberAnimation { NumberAnimation {