Merge branch 'v0.18.x'

This commit is contained in:
Max Kellermann 2013-12-15 19:17:40 +01:00
commit 9cfd9d7ce0

View File

@ -47,10 +47,22 @@ class AlsaMixerMonitor final : private MultiSocketMonitor {
public: public:
AlsaMixerMonitor(EventLoop &_loop, snd_mixer_t *_mixer) AlsaMixerMonitor(EventLoop &_loop, snd_mixer_t *_mixer)
:MultiSocketMonitor(_loop), mixer(_mixer) { :MultiSocketMonitor(_loop), mixer(_mixer) {
BlockingCall(_loop, [this](){ InvalidateSockets(); }); #ifdef USE_INTERNAL_EVENTLOOP
_loop.AddCall([this](){ InvalidateSockets(); });
#else
_loop.AddIdle(InitAlsaMixerMonitor, this);
#endif
} }
private: private:
#ifndef USE_INTERNAL_EVENTLOOP
static gboolean InitAlsaMixerMonitor(gpointer data) {
AlsaMixerMonitor &amm = *(AlsaMixerMonitor *)data;
amm.InvalidateSockets();
return false;
}
#endif
virtual int PrepareSockets() override; virtual int PrepareSockets() override;
virtual void DispatchSockets() override; virtual void DispatchSockets() override;
}; };