aboutsummaryrefslogtreecommitdiffstats
path: root/src/output/httpd_output_plugin.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2012-08-14 21:46:43 +0200
committerMax Kellermann <max@duempel.org>2012-08-14 21:54:47 +0200
commit249dcd967ede5ad20cda92a7c6c85ba303eed87f (patch)
tree22b7b84d550bdbf2e083ee7b45deeaea16efcb2b /src/output/httpd_output_plugin.c
parent302972e9fc179fe17b8d658b8c5b4d47c1b8eeab (diff)
downloadmpd-249dcd967ede5ad20cda92a7c6c85ba303eed87f.tar.gz
mpd-249dcd967ede5ad20cda92a7c6c85ba303eed87f.tar.xz
mpd-249dcd967ede5ad20cda92a7c6c85ba303eed87f.zip
output/httpd: move delay from _pause() to _delay()
Diffstat (limited to 'src/output/httpd_output_plugin.c')
-rw-r--r--src/output/httpd_output_plugin.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/output/httpd_output_plugin.c b/src/output/httpd_output_plugin.c
index a063479db..abef826bc 100644
--- a/src/output/httpd_output_plugin.c
+++ b/src/output/httpd_output_plugin.c
@@ -428,6 +428,11 @@ httpd_output_delay(struct audio_output *ao)
will not fill the buffer and it will not update the
timer; therefore, we reset the timer here */
timer_reset(httpd->timer);
+
+ /* some arbitrary delay that is long enough to avoid
+ consuming too much CPU, and short enough to notice
+ new clients quickly enough */
+ return 1000;
}
return httpd->timer->started
@@ -535,7 +540,6 @@ httpd_output_pause(struct audio_output *ao)
return httpd_output_play(ao, silence, sizeof(silence),
NULL) > 0;
} else {
- g_usleep(100000);
return true;
}
}