forked from quickshell/quickshell
service/pipewire: avoid overloading devices with volume changes
Wait until in-flight changes have been responded to before sending more.
This commit is contained in:
parent
c60871a7fb
commit
79b22af093
4 changed files with 140 additions and 71 deletions
|
|
@ -28,6 +28,12 @@ public:
|
|||
bool setVolumes(qint32 routeDevice, const QVector<float>& volumes);
|
||||
bool setMuted(qint32 routeDevice, bool muted);
|
||||
|
||||
void waitForDevice();
|
||||
[[nodiscard]] bool waitingForDevice() const;
|
||||
|
||||
signals:
|
||||
void deviceReady();
|
||||
|
||||
private slots:
|
||||
void polled();
|
||||
|
||||
|
|
@ -44,6 +50,8 @@ private:
|
|||
bool
|
||||
setRouteProps(qint32 routeDevice, const std::function<void*(spa_pod_builder*)>& propsCallback);
|
||||
|
||||
bool mWaitingForDevice = false;
|
||||
bool deviceResponded = false;
|
||||
SpaHook listener;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue