From a869dfea852e0961992b1563b2e14257e7ba3e03 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 14 Aug 2012 19:02:26 +0200 Subject: timer: use monotonic clock if available --- NEWS | 2 ++ 1 file changed, 2 insertions(+) (limited to 'NEWS') diff --git a/NEWS b/NEWS index 812d0390..9b72f6ba 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,8 @@ ver 0.17.2 (2012/??/??) * protocol: - fix crash in local file check +* output: + - httpd: use monotonic clock, avoid hiccups after system clock adjustment * mapper: fix non-UTF8 music directory name -- cgit v1.2.3 From 302972e9fc179fe17b8d658b8c5b4d47c1b8eeab Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 14 Aug 2012 21:39:33 +0200 Subject: output/httpd: fix throttling bug after resuming playback Reset the timer when paused and no client is connected. This fixes Mantis ticket 0003527. --- NEWS | 1 + src/output/httpd_output_plugin.c | 8 ++++++++ 2 files changed, 9 insertions(+) (limited to 'NEWS') diff --git a/NEWS b/NEWS index 9b72f6ba..27817a27 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,7 @@ ver 0.17.2 (2012/??/??) - fix crash in local file check * output: - httpd: use monotonic clock, avoid hiccups after system clock adjustment + - httpd: fix throttling bug after resuming playback * mapper: fix non-UTF8 music directory name diff --git a/src/output/httpd_output_plugin.c b/src/output/httpd_output_plugin.c index f7c6127c..a063479d 100644 --- a/src/output/httpd_output_plugin.c +++ b/src/output/httpd_output_plugin.c @@ -422,6 +422,14 @@ httpd_output_delay(struct audio_output *ao) { struct httpd_output *httpd = (struct httpd_output *)ao; + if (!httpd_output_lock_has_clients(httpd) && httpd->base.pause) { + /* if there's no client and this output is paused, + then httpd_output_pause() will not do anything, it + will not fill the buffer and it will not update the + timer; therefore, we reset the timer here */ + timer_reset(httpd->timer); + } + return httpd->timer->started ? timer_delay(httpd->timer) : 0; -- cgit v1.2.3