aboutsummaryrefslogtreecommitdiffstats
path: root/src/mixer/Volume.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/mixer/Volume.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 '')
-rw-r--r--src/mixer/Volume.cxx16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/mixer/Volume.cxx b/src/mixer/Volume.cxx
index aaae5d9ee..596b3c12a 100644
--- a/src/mixer/Volume.cxx
+++ b/src/mixer/Volume.cxx
@@ -21,7 +21,6 @@
#include "Volume.hxx"
#include "output/MultipleOutputs.hxx"
#include "Idle.hxx"
-#include "GlobalEvents.hxx"
#include "util/StringUtil.hxx"
#include "util/Domain.hxx"
#include "system/PeriodClock.hxx"
@@ -41,22 +40,11 @@ static int last_hardware_volume = -1;
/** the age of #last_hardware_volume */
static PeriodClock hardware_volume_clock;
-/**
- * Handler for #GlobalEvents::MIXER.
- */
-static void
-mixer_event_callback(void)
+void
+InvalidateHardwareVolume()
{
/* flush the hardware volume cache */
last_hardware_volume = -1;
-
- /* notify clients */
- idle_add(IDLE_MIXER);
-}
-
-void volume_init(void)
-{
- GlobalEvents::Register(GlobalEvents::MIXER, mixer_event_callback);
}
int