diff options
author | Tanu Kaskinen <tanuk@iki.fi> | 2009-06-29 18:35:06 +0300 |
---|---|---|
committer | Tanu Kaskinen <tanuk@iki.fi> | 2009-06-29 18:35:06 +0300 |
commit | 0bc538b08ca5c4efea86700cb6c4685da3f34345 (patch) | |
tree | e5b0fe4b967ecb7e9251faf21904bbbe825aaab7 /src/modules/module-sine-source.c | |
parent | b152f3a052eca7225870a7dc4d8a719bee107f0f (diff) | |
parent | 2654eb7781ddcfe53064745bbad77bffe5c8eada (diff) |
Merge branch 'master' into dbus-work
Conflicts:
src/daemon/daemon-conf.c
src/daemon/daemon-conf.h
src/daemon/main.c
src/pulsecore/dbus-util.h
Diffstat (limited to 'src/modules/module-sine-source.c')
-rw-r--r-- | src/modules/module-sine-source.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/modules/module-sine-source.c b/src/modules/module-sine-source.c index 14a04e47..9826e5f4 100644 --- a/src/modules/module-sine-source.c +++ b/src/modules/module-sine-source.c @@ -34,19 +34,20 @@ #include <sys/ioctl.h> #include <sys/poll.h> -#include <pulse/xmalloc.h> +#include <pulse/rtclock.h> #include <pulse/timeval.h> +#include <pulse/xmalloc.h> #include <pulsecore/core-error.h> #include <pulsecore/source.h> #include <pulsecore/module.h> +#include <pulsecore/core-rtclock.h> #include <pulsecore/core-util.h> #include <pulsecore/modargs.h> #include <pulsecore/log.h> #include <pulsecore/thread.h> #include <pulsecore/thread-mq.h> #include <pulsecore/rtpoll.h> -#include <pulsecore/rtclock.h> #include "module-sine-source-symdef.h" @@ -101,14 +102,14 @@ static int source_process_msg( case PA_SOURCE_MESSAGE_SET_STATE: if (PA_PTR_TO_UINT(data) == PA_SOURCE_RUNNING) - u->timestamp = pa_rtclock_usec(); + u->timestamp = pa_rtclock_now(); break; case PA_SOURCE_MESSAGE_GET_LATENCY: { pa_usec_t now, left_to_fill; - now = pa_rtclock_usec(); + now = pa_rtclock_now(); left_to_fill = u->timestamp > now ? u->timestamp - now : 0ULL; *((pa_usec_t*) data) = u->block_usec > left_to_fill ? u->block_usec - left_to_fill : 0ULL; @@ -166,9 +167,8 @@ static void thread_func(void *userdata) { pa_log_debug("Thread starting up"); pa_thread_mq_install(&u->thread_mq); - pa_rtpoll_install(u->rtpoll); - u->timestamp = pa_rtclock_usec(); + u->timestamp = pa_rtclock_now(); for (;;) { int ret; @@ -176,7 +176,7 @@ static void thread_func(void *userdata) { if (PA_SOURCE_IS_OPENED(u->source->thread_info.state)) { pa_usec_t now; - now = pa_rtclock_usec(); + now = pa_rtclock_now(); if (u->timestamp <= now) process_render(u, now); |