summaryrefslogtreecommitdiffstats
path: root/app/main.cpp
diff options
context:
space:
mode:
authorMatt Porter <mporter@konsulko.com>2017-04-20 12:49:15 -0400
committerMatt Porter <mporter@konsulko.com>2017-04-21 12:50:02 -0400
commit288256f33f6298204cd0166cea3202d1fde100da (patch)
tree2aa30a1b09c99e63ce3868ce2fa925472b70bf7c /app/main.cpp
parent9e23981d8a86a3530c03be2d541585ce88e7b914 (diff)
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 <mporter@konsulko.com>
Diffstat (limited to 'app/main.cpp')
-rw-r--r--app/main.cpp2
1 files changed, 2 insertions, 0 deletions
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<PaControlModel *>("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)));