service/pipewire: set device node volumes with device object

Fixes discrepancies between pulse and qs volumes, and volumes not
persisting across reboot or vt switches.
This commit is contained in:
outfoxxed 2024-08-27 01:28:28 -07:00
parent b40d4147e0
commit c60871a7fb
Signed by untrusted user: outfoxxed
GPG key ID: 4C88A185FB89301E
9 changed files with 380 additions and 74 deletions

View file

@ -9,6 +9,7 @@
#include <qloggingcategory.h>
#include <qobject.h>
#include <qsocketnotifier.h>
#include <qtmetamacros.h>
#include <spa/utils/defs.h>
#include <spa/utils/hook.h>
@ -68,11 +69,12 @@ bool PwCore::isValid() const {
return this->core != nullptr;
}
void PwCore::poll() const {
void PwCore::poll() {
qCDebug(logLoop) << "Pipewire event loop received new events, iterating.";
// Spin pw event loop.
pw_loop_iterate(this->loop, 0);
qCDebug(logLoop) << "Done iterating pipewire event loop.";
emit this->polled();
}
SpaHook::SpaHook() { // NOLINT