aboutsummaryrefslogtreecommitdiffstats
path: root/src/mixer/AlsaMixerPlugin.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-08-10 10:57:00 +0200
committerMax Kellermann <max@duempel.org>2013-08-10 11:52:31 +0200
commitbe0c8495cdb60847279ffbb6b6e1c1efed607e98 (patch)
tree8bac73de8f2cad0695ff819326e073f23c40e424 /src/mixer/AlsaMixerPlugin.cxx
parentcbd0709d1cf8f7a33e57b3d1bb84d7fd527e2ff2 (diff)
downloadmpd-be0c8495cdb60847279ffbb6b6e1c1efed607e98.tar.gz
mpd-be0c8495cdb60847279ffbb6b6e1c1efed607e98.tar.xz
mpd-be0c8495cdb60847279ffbb6b6e1c1efed607e98.zip
event/MultiSocketMonitor: PrepareSockets() returns timeout
Simplify the API, don't use GLib specific integer type.
Diffstat (limited to '')
-rw-r--r--src/mixer/AlsaMixerPlugin.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mixer/AlsaMixerPlugin.cxx b/src/mixer/AlsaMixerPlugin.cxx
index 5ab19a8d6..5191826c5 100644
--- a/src/mixer/AlsaMixerPlugin.cxx
+++ b/src/mixer/AlsaMixerPlugin.cxx
@@ -44,7 +44,7 @@ public:
:MultiSocketMonitor(_loop), mixer(_mixer) {}
private:
- virtual void PrepareSockets(gcc_unused gint *timeout_r) override;
+ virtual int PrepareSockets() override;
virtual void DispatchSockets() override;
};
@@ -83,8 +83,8 @@ alsa_mixer_quark(void)
return g_quark_from_static_string("alsa_mixer");
}
-void
-AlsaMixerMonitor::PrepareSockets(gcc_unused gint *timeout_r)
+int
+AlsaMixerMonitor::PrepareSockets()
{
int count = snd_mixer_poll_descriptors_count(mixer);
if (count < 0)
@@ -113,6 +113,8 @@ AlsaMixerMonitor::PrepareSockets(gcc_unused gint *timeout_r)
for (auto i = pfds; i != end; ++i)
if (i->events != 0)
AddSocket(i->fd, i->events);
+
+ return -1;
}
void