diff options
author | Thomas Martitz <kuge@rockbox.org> | 2012-10-30 11:35:24 +0100 |
---|---|---|
committer | Arun Raghavan <arun.raghavan@collabora.co.uk> | 2012-10-30 16:22:18 +0530 |
commit | 7e344b5ff04512b7323d6c42a7bcbe5438ea4e3f (patch) | |
tree | 0810bd2df114bd62d1678c827e28d4bae375c18b /src/pulse/mainloop.c | |
parent | fb52466d6a484c13dbf459fc4e464e8485183b81 (diff) |
core: Proper poll() emulation to fix pacat and friends on Windows
Currently, Windows versions of pacat and friends fail because the current
poll emulation is not sufficient (it only works for socket fds).
Luckily Gnulib has a much better emulation that seems to work good enough.
The implementation has been largely copied (except a few bug fix
regarding timeout handling, to be pushed upstream) and works on pipes
and files as well. The copy has been obtained through their gnulib-tool utility,
which gives a LGPLv2.1+ licensed file.
This fixes the "Assertion (!e->dead) failed" error coming and lets pacat
and friends stream happily to/from a server (I didn't actually test parec).
Diffstat (limited to 'src/pulse/mainloop.c')
-rw-r--r-- | src/pulse/mainloop.c | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/src/pulse/mainloop.c b/src/pulse/mainloop.c index 5c0345ed6..725bdb4f3 100644 --- a/src/pulse/mainloop.c +++ b/src/pulse/mainloop.c @@ -175,24 +175,6 @@ static pa_io_event* mainloop_io_new( e->callback = callback; e->userdata = userdata; -#ifdef OS_IS_WIN32 - { - fd_set xset; - struct timeval tv; - - tv.tv_sec = 0; - tv.tv_usec = 0; - - FD_ZERO (&xset); - FD_SET (fd, &xset); - - if ((select(fd, NULL, NULL, &xset, &tv) == -1) && (WSAGetLastError() == WSAENOTSOCK)) { - pa_log_warn("Cannot monitor non-socket file descriptors."); - e->dead = TRUE; - } - } -#endif - PA_LLIST_PREPEND(pa_io_event, m->io_events, e); m->rebuild_pollfds = TRUE; m->n_io_events ++; |