diff options
author | Lennart Poettering <lennart@poettering.net> | 2007-06-14 16:53:40 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2007-06-14 16:53:40 +0000 |
commit | 111dcd5e34434324adafd9f43c656592f3a02d60 (patch) | |
tree | e43447fd414818c83d036f8d5fe278bc21a141f6 /src/modules/module-pipe-sink.c | |
parent | be4a8828360b3607414c3ebfd836494e6490267d (diff) |
trivial cleanups
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1475 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/modules/module-pipe-sink.c')
-rw-r--r-- | src/modules/module-pipe-sink.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/modules/module-pipe-sink.c b/src/modules/module-pipe-sink.c index da9124a7..216e42ac 100644 --- a/src/modules/module-pipe-sink.c +++ b/src/modules/module-pipe-sink.c @@ -28,7 +28,6 @@ #include <stdlib.h> #include <sys/stat.h> #include <stdio.h> -#include <assert.h> #include <errno.h> #include <string.h> #include <fcntl.h> @@ -40,7 +39,6 @@ #include <pulse/xmalloc.h> #include <pulsecore/core-error.h> -#include <pulsecore/iochannel.h> #include <pulsecore/sink.h> #include <pulsecore/module.h> #include <pulsecore/core-util.h> @@ -170,6 +168,8 @@ static void thread_func(void *userdata) { l = pa_write(u->fd, (uint8_t*) p + u->memchunk.index, u->memchunk.length, &write_type); pa_memblock_release(u->memchunk.memblock); + pa_assert(l != 0); + if (l < 0) { if (errno == EINTR) @@ -202,7 +202,10 @@ static void thread_func(void *userdata) { if (pa_asyncmsgq_before_poll(u->asyncmsgq) < 0) continue; +/* pa_log("polling for %u (underrun=%i)", pollfd[POLLFD_FIFO].events, underrun); */ r = poll(pollfd, POLLFD_MAX, -1); +/* pa_log("polling got %u", r > 0 ? pollfd[POLLFD_FIFO].revents : 0); */ + pa_asyncmsgq_after_poll(u->asyncmsgq); if (r < 0) { @@ -232,11 +235,11 @@ finish: } int pa__init(pa_core *c, pa_module*m) { - struct userdata *u = NULL; + struct userdata *u; struct stat st; pa_sample_spec ss; pa_channel_map map; - pa_modargs *ma = NULL; + pa_modargs *ma; char *t; pa_assert(c); |