aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2010-11-05 09:42:14 +0100
committerMax Kellermann <max@duempel.org>2010-11-05 09:49:22 +0100
commit90dc880e67bcadd50a05afdd60d33545e699e2f4 (patch)
tree93201a03bed658c98c8bf9c1f1cd62c688a9613d
parente11ff967d0876177fdc5058d55427fdba9625f9c (diff)
downloadmpd-90dc880e67bcadd50a05afdd60d33545e699e2f4.tar.gz
mpd-90dc880e67bcadd50a05afdd60d33545e699e2f4.tar.xz
mpd-90dc880e67bcadd50a05afdd60d33545e699e2f4.zip
output/httpd: implement delay()
Diffstat (limited to '')
-rw-r--r--NEWS2
-rw-r--r--src/output/httpd_output_plugin.c13
2 files changed, 12 insertions, 3 deletions
diff --git a/NEWS b/NEWS
index 57b765547..9f8d87b8d 100644
--- a/NEWS
+++ b/NEWS
@@ -65,7 +65,7 @@ ver 0.16 (20??/??/??)
- httpd: bind_to_address support (including IPv6)
- oss: 24 bit support via OSS4
- win32: new output plugin for Windows Wave
- - shout: more responsive to control commands
+ - shout, httpd: more responsive to control commands
- wildcards allowed in audio_format configuration
- consistently lock audio output objects
* player:
diff --git a/src/output/httpd_output_plugin.c b/src/output/httpd_output_plugin.c
index a7102d454..72994018a 100644
--- a/src/output/httpd_output_plugin.c
+++ b/src/output/httpd_output_plugin.c
@@ -375,6 +375,16 @@ httpd_output_send_header(struct httpd_output *httpd,
httpd_client_send(client, httpd->header);
}
+static unsigned
+httpd_output_delay(void *data)
+{
+ struct httpd_output *httpd = data;
+
+ return httpd->timer->started
+ ? timer_delay(httpd->timer)
+ : 0;
+}
+
static void
httpd_client_check_queue(gpointer data, G_GNUC_UNUSED gpointer user_data)
{
@@ -464,8 +474,6 @@ httpd_output_play(void *data, const void *chunk, size_t size, GError **error)
if (!httpd->timer->started)
timer_start(httpd->timer);
- else
- timer_sync(httpd->timer);
timer_add(httpd->timer, size);
return size;
@@ -575,6 +583,7 @@ const struct audio_output_plugin httpd_output_plugin = {
.disable = httpd_output_disable,
.open = httpd_output_open,
.close = httpd_output_close,
+ .delay = httpd_output_delay,
.send_tag = httpd_output_tag,
.play = httpd_output_play,
.pause = httpd_output_pause,