X-Git-Url: https://code.delx.au/pulseaudio/blobdiff_plain/125c52889626b2ac408ecbcc8ea85575f5808e07..e8028304b30c359ee4c0e97fb57a0f6e985227e8:/src/modules/module-esound-sink.c diff --git a/src/modules/module-esound-sink.c b/src/modules/module-esound-sink.c index 2df8a0e8..1e26e5e4 100644 --- a/src/modules/module-esound-sink.c +++ b/src/modules/module-esound-sink.c @@ -24,18 +24,22 @@ #endif #include -#include #include #include #include -#include #include -#include -#include -#include + +#ifdef HAVE_NETINET_IN_H #include +#endif + +#ifdef HAVE_NETINET_TCP_H #include +#endif + +#ifdef HAVE_SYS_IOCTL_H #include +#endif #ifdef HAVE_LINUX_SOCKIOS_H #include @@ -45,11 +49,11 @@ #include #include +#include #include #include #include #include -#include #include #include #include @@ -60,6 +64,8 @@ #include #include #include +#include +#include #include "module-esound-sink-symdef.h" @@ -201,7 +207,6 @@ static void thread_func(void *userdata) { pa_log_debug("Thread starting up"); pa_thread_mq_install(&u->thread_mq); - pa_rtpoll_install(u->rtpoll); pa_smoother_set_time_offset(u->smoother, pa_rtclock_now()); @@ -372,7 +377,7 @@ static int do_write(struct userdata *u) { pa_make_tcp_socket_low_delay(u->fd); - if (getsockopt(u->fd, SOL_SOCKET, SO_SNDBUF, &so_sndbuf, &sl) < 0) + if (getsockopt(u->fd, SOL_SOCKET, SO_SNDBUF, (void *) &so_sndbuf, &sl) < 0) pa_log_warn("getsockopt(SO_SNDBUF) failed: %s", pa_cstrerror(errno)); else { pa_log_debug("SO_SNDBUF is %zu.", (size_t) so_sndbuf); @@ -609,7 +614,7 @@ int pa__init(pa_module*m) { pa_sink_set_asyncmsgq(u->sink, u->thread_mq.inq); pa_sink_set_rtpoll(u->sink, u->rtpoll); - if (!(u->client = pa_socket_client_new_string(u->core->mainloop, espeaker, ESD_DEFAULT_PORT))) { + if (!(u->client = pa_socket_client_new_string(u->core->mainloop, TRUE, espeaker, ESD_DEFAULT_PORT))) { pa_log("Failed to connect to server."); goto fail; } @@ -629,7 +634,7 @@ int pa__init(pa_module*m) { /* Reserve space for the response */ u->read_data = pa_xmalloc(u->read_length = sizeof(int32_t)); - if (!(u->thread = pa_thread_new(thread_func, u))) { + if (!(u->thread = pa_thread_new("esound-sink", thread_func, u))) { pa_log("Failed to create thread."); goto fail; }