aboutsummaryrefslogtreecommitdiffstats
path: root/src/mixer
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-12-15 19:17:40 +0100
committerMax Kellermann <max@duempel.org>2013-12-15 19:17:40 +0100
commit9cfd9d7ce028160a034ecf29ebdc4d085f0b3784 (patch)
tree1187b7b174dc80b41fd9f6e4d0b9e42032e227d2 /src/mixer
parent66d90dd412cd102879a1ceff83df5aad9f08a21c (diff)
parent42a09ff17a47ec670b9a6d3ecd0aae14e0d52cde (diff)
downloadmpd-9cfd9d7ce028160a034ecf29ebdc4d085f0b3784.tar.gz
mpd-9cfd9d7ce028160a034ecf29ebdc4d085f0b3784.tar.xz
mpd-9cfd9d7ce028160a034ecf29ebdc4d085f0b3784.zip
Merge branch 'v0.18.x'
Diffstat (limited to 'src/mixer')
-rw-r--r--src/mixer/AlsaMixerPlugin.cxx14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/mixer/AlsaMixerPlugin.cxx b/src/mixer/AlsaMixerPlugin.cxx
index b81ca4246..d643a3325 100644
--- a/src/mixer/AlsaMixerPlugin.cxx
+++ b/src/mixer/AlsaMixerPlugin.cxx
@@ -47,10 +47,22 @@ class AlsaMixerMonitor final : private MultiSocketMonitor {
public:
AlsaMixerMonitor(EventLoop &_loop, snd_mixer_t *_mixer)
:MultiSocketMonitor(_loop), mixer(_mixer) {
- BlockingCall(_loop, [this](){ InvalidateSockets(); });
+#ifdef USE_INTERNAL_EVENTLOOP
+ _loop.AddCall([this](){ InvalidateSockets(); });
+#else
+ _loop.AddIdle(InitAlsaMixerMonitor, this);
+#endif
}
private:
+#ifndef USE_INTERNAL_EVENTLOOP
+ static gboolean InitAlsaMixerMonitor(gpointer data) {
+ AlsaMixerMonitor &amm = *(AlsaMixerMonitor *)data;
+ amm.InvalidateSockets();
+ return false;
+ }
+#endif
+
virtual int PrepareSockets() override;
virtual void DispatchSockets() override;
};