services/pipewire: update volume props from device for device nodes

Yet another device node edge case. In addition to only writing via
a pw_device when present, now we only read from one as well.

This fixes missing state changes not conveyed by the pw_node.

Fixes #35
This commit is contained in:
outfoxxed 2025-06-19 05:12:24 -07:00
parent 579d589290
commit 95d0af8113
Signed by untrusted user: outfoxxed
GPG key ID: 4C88A185FB89301E
5 changed files with 61 additions and 19 deletions

View file

@ -8,9 +8,11 @@
#include <qcontainerfwd.h>
#include <qhash.h>
#include <qtmetamacros.h>
#include <qtypes.h>
#include <spa/pod/builder.h>
#include "core.hpp"
#include "node.hpp"
#include "registry.hpp"
namespace qs::service::pipewire {
@ -32,6 +34,7 @@ public:
signals:
void deviceReady();
void routeVolumesChanged(qint32 routeDevice, const PwVolumeProps& volumeProps);
private slots:
void polled();
@ -43,7 +46,7 @@ private:
onParam(void* data, qint32 seq, quint32 id, quint32 index, quint32 next, const spa_pod* param);
QHash<qint32, qint32> routeDeviceIndexes;
QHash<qint32, qint32> stagingIndexes;
QList<qint32> stagingIndexes;
void addDeviceIndexPairs(const spa_pod* param);
bool