aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS1
-rw-r--r--src/output/shout_plugin.c7
2 files changed, 8 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index e0f6a433d..4442c70ef 100644
--- a/NEWS
+++ b/NEWS
@@ -8,6 +8,7 @@ ver 0.15.2 (2009/??/??)
- flac: don't allocate cuesheet twice (memleak)
* output:
- shout: fixed stuck pause bug
+ - shout: minimize the unpause latency
* update: free empty path string (memleak)
* update: free temporary string in container scan (memleak)
* directory: free empty directories after removing them (memleak)
diff --git a/src/output/shout_plugin.c b/src/output/shout_plugin.c
index 8e091679e..4412d26ff 100644
--- a/src/output/shout_plugin.c
+++ b/src/output/shout_plugin.c
@@ -448,8 +448,15 @@ my_shout_play(void *data, const void *chunk, size_t size, GError **error)
static bool
my_shout_pause(void *data)
{
+ struct shout_data *sd = (struct shout_data *)data;
static const char silence[1020];
+ if (shout_delay(sd->shout_conn) > 500) {
+ /* cap the latency for unpause */
+ g_usleep(500000);
+ return true;
+ }
+
return my_shout_play(data, silence, sizeof(silence), NULL);
}