From: Andre Noll Date: Thu, 22 Apr 2010 21:11:17 +0000 (+0200) Subject: audiod: Make the time display more smooth. X-Git-Tag: v0.4.2~2 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=4b260054e8b8c03de7ffdc96b879ceb2be1a1122 audiod: Make the time display more smooth. If playing, request a timeout that expires at the next second. --- diff --git a/audiod.c b/audiod.c index 21020d4d..cc4164fe 100644 --- a/audiod.c +++ b/audiod.c @@ -1156,6 +1156,13 @@ static void status_pre_select(struct sched *s, struct task *t) sched_request_barrier_or_min_delay(&st->restart_barrier, s); if (cafn >= 0) sched_request_barrier(&afi[cafn].restart_barrier, s); + /* + * If para_server is playing we'd like to have a smooth time display + * even if we are running in standby mode. So we request a timeout that + * expires at the next full second. + */ + if (stat_task->vss_status & VSS_STATUS_FLAG_PLAYING) + sched_request_timeout_ms(1000 - now->tv_usec / 1000, s); return; min_delay: sched_min_delay(s);