From 288256f33f6298204cd0166cea3202d1fde100da Mon Sep 17 00:00:00 2001 From: Matt Porter Date: Thu, 20 Apr 2017 12:49:15 -0400 Subject: Add support for handling external sink/source volume change events Subscribes to PA volume change events, updating the local cached volume levels, and propagating the change to the UI. This allows changes to sink/source volumes levels from the command line (pactl) or a master volume control to be reflected in the mixer UI controls. Change-Id: I1d570dffeab9fcf4b6ba51e4792852b44a6149ca AGL-Bug: SPEC-549 Signed-off-by: Matt Porter --- app/main.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/main.cpp') diff --git a/app/main.cpp b/app/main.cpp index 76e755b..1868ac6 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -67,6 +67,8 @@ int main(int argc, char *argv[]) PaControlModel *pacm = mobjs.first()->findChild("pacm"); QObject::connect(client, SIGNAL(controlAdded(int, QString, int, int, const char *, int)), pacm, SLOT(addOneControl(int, QString, int, int, const char *, int))); + QObject::connect(client, SIGNAL(volumeExternallyChanged(uint32_t, uint32_t, uint32_t, uint32_t)), + pacm, SLOT(changeExternalVolume(uint32_t, uint32_t, uint32_t, uint32_t))); QObject::connect(pacm, SIGNAL(volumeChanged(uint32_t, uint32_t, uint32_t, uint32_t)), client, SLOT(setVolume(uint32_t, uint32_t, uint32_t, uint32_t))); -- cgit 1.2.3-korg