summaryrefslogtreecommitdiffstats
path: root/src/modules/raop/module-raop-sink.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-06-22 23:09:46 +0200
committerLennart Poettering <lennart@poettering.net>2009-06-22 23:09:46 +0200
commitfc33f7ee97da6a8b7263620775b7b74b4c754402 (patch)
tree519635b1f72acc7613b4b7c4ad70fbc39ab3901b /src/modules/raop/module-raop-sink.c
parent048e576a6dfe2bfe62fa33c74c30cc34057ee740 (diff)
parente4d914c945c13d23b131d7ba75fbdd03cb6d0043 (diff)
Merge most of elmarco/rtclock2
Merge commit 'e4d914c945c13d23b131d7ba75fbdd03cb6d0043'
Diffstat (limited to 'src/modules/raop/module-raop-sink.c')
-rw-r--r--src/modules/raop/module-raop-sink.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/modules/raop/module-raop-sink.c b/src/modules/raop/module-raop-sink.c
index cab3a82a..9699132d 100644
--- a/src/modules/raop/module-raop-sink.c
+++ b/src/modules/raop/module-raop-sink.c
@@ -42,13 +42,15 @@
#include <linux/sockios.h>
#endif
-#include <pulse/xmalloc.h>
+#include <pulse/rtclock.h>
#include <pulse/timeval.h>
+#include <pulse/xmalloc.h>
#include <pulsecore/core-error.h>
#include <pulsecore/iochannel.h>
#include <pulsecore/sink.h>
#include <pulsecore/module.h>
+#include <pulsecore/core-rtclock.h>
#include <pulsecore/core-util.h>
#include <pulsecore/modargs.h>
#include <pulsecore/log.h>
@@ -57,7 +59,6 @@
#include <pulsecore/thread-mq.h>
#include <pulsecore/thread.h>
#include <pulsecore/time-smoother.h>
-#include <pulsecore/rtclock.h>
#include <pulsecore/socket-util.h>
#include "module-raop-sink-symdef.h"
@@ -181,7 +182,7 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse
case PA_SINK_SUSPENDED:
pa_assert(PA_SINK_IS_OPENED(u->sink->thread_info.state));
- pa_smoother_pause(u->smoother, pa_rtclock_usec());
+ pa_smoother_pause(u->smoother, pa_rtclock_now());
/* Issue a FLUSH if we are connected */
if (u->fd >= 0) {
@@ -193,7 +194,7 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse
case PA_SINK_RUNNING:
if (u->sink->thread_info.state == PA_SINK_SUSPENDED) {
- pa_smoother_resume(u->smoother, pa_rtclock_usec(), TRUE);
+ pa_smoother_resume(u->smoother, pa_rtclock_now(), TRUE);
/* The connection can be closed when idle, so check to
see if we need to reestablish it */
@@ -216,7 +217,7 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse
case PA_SINK_MESSAGE_GET_LATENCY: {
pa_usec_t w, r;
- r = pa_smoother_get(u->smoother, pa_rtclock_usec());
+ r = pa_smoother_get(u->smoother, pa_rtclock_now());
w = pa_bytes_to_usec((u->offset - u->encoding_overhead + (u->encoded_memchunk.length / u->encoding_ratio)), &u->sink->sample_spec);
*((pa_usec_t*) data) = w > r ? w - r : 0;
@@ -324,7 +325,7 @@ static void thread_func(void *userdata) {
pa_thread_mq_install(&u->thread_mq);
- pa_smoother_set_time_offset(u->smoother, pa_rtclock_usec());
+ pa_smoother_set_time_offset(u->smoother, pa_rtclock_now());
/* Create a chunk of memory that is our encoded silence sample. */
pa_memchunk_reset(&silence);
@@ -464,7 +465,7 @@ static void thread_func(void *userdata) {
else
usec = 0;
- pa_smoother_put(u->smoother, pa_rtclock_usec(), usec);
+ pa_smoother_put(u->smoother, pa_rtclock_now(), usec);
}
/* Hmm, nothing to do. Let's sleep */