aboutsummaryrefslogtreecommitdiffstats
path: root/src/Partition.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-02-05 23:20:33 +0100
committerMax Kellermann <max@duempel.org>2014-02-19 21:40:14 +0100
commit8d6fedf8177d0d2ced81e6d93d35c368b2ac69db (patch)
tree17890432eb5d7f6cbdf5feb32a0105dc6f9d8974 /src/Partition.cxx
parentf4f8fa7c947af10235d1cdd70b294a3b8810c6f4 (diff)
downloadmpd-8d6fedf8177d0d2ced81e6d93d35c368b2ac69db.tar.gz
mpd-8d6fedf8177d0d2ced81e6d93d35c368b2ac69db.tar.xz
mpd-8d6fedf8177d0d2ced81e6d93d35c368b2ac69db.zip
Mixer: add class MixerListener
Use a listener interface instead of GlobalEvents.
Diffstat (limited to 'src/Partition.cxx')
-rw-r--r--src/Partition.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Partition.cxx b/src/Partition.cxx
index 4d4504338..512912f96 100644
--- a/src/Partition.cxx
+++ b/src/Partition.cxx
@@ -21,6 +21,8 @@
#include "Partition.hxx"
#include "DetachedSong.hxx"
#include "output/MultipleOutputs.hxx"
+#include "mixer/Volume.hxx"
+#include "Idle.hxx"
#ifdef ENABLE_DATABASE
@@ -47,3 +49,12 @@ Partition::SyncWithPlayer()
{
playlist.SyncWithPlayer(pc);
}
+
+void
+Partition::OnMixerVolumeChanged(gcc_unused Mixer &mixer, gcc_unused int volume)
+{
+ InvalidateHardwareVolume();
+
+ /* notify clients */
+ idle_add(IDLE_MIXER);
+}