From b6dfb481006323b34885d9b870afb0663060dd10 Mon Sep 17 00:00:00 2001 From: ejurgensen Date: Sun, 3 May 2020 23:10:40 +0200 Subject: [PATCH] [raop] Adjust keep alive interval 30s -> 25s Testing with Homepod/ATV points at 25s working better, see: https://github.com/ejurgensen/forked-daapd/issues/734#issuecomment-622959334 --- src/outputs/raop.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/outputs/raop.c b/src/outputs/raop.c index 5a224e5a..3a4699b0 100644 --- a/src/outputs/raop.c +++ b/src/outputs/raop.c @@ -100,6 +100,12 @@ #define RAOP_MD_WANTS_ARTWORK (1 << 1) #define RAOP_MD_WANTS_PROGRESS (1 << 2) +// ATV4 and Homepod disconnect for reasons that are not clear, but sending them +// progress metadata at regular intervals reduces the problem. The below +// interval was determined via testing, see: +// https://github.com/ejurgensen/forked-daapd/issues/734#issuecomment-622959334 +#define RAOP_KEEP_ALIVE_INTERVAL 25 + // This is an arbitrary value which just needs to be kept in sync with the config #define RAOP_CONFIG_MAX_VOLUME 11 @@ -339,7 +345,7 @@ static struct output_metadata *raop_cur_metadata; /* Keep-alive timer - hack for ATV's with tvOS 10 */ static struct event *keep_alive_timer; -static struct timeval keep_alive_tv = { 30, 0 }; +static struct timeval keep_alive_tv = { RAOP_KEEP_ALIVE_INTERVAL, 0 }; /* Sessions */ static struct raop_master_session *raop_master_sessions;