diff options
Diffstat (limited to 'src/mixer/AlsaMixerPlugin.cxx')
-rw-r--r-- | src/mixer/AlsaMixerPlugin.cxx | 14 |
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; }; |