raop-sink: use default latency of 2 seconds

See #2131
This commit is contained in:
Wim Taymans 2022-02-13 18:41:01 +01:00
parent 01a83a1362
commit fa484f346e

View file

@ -93,6 +93,8 @@ PW_LOG_TOPIC_STATIC(mod_topic, "mod." NAME);
#define DEFAULT_CHANNELS "2" #define DEFAULT_CHANNELS "2"
#define DEFAULT_POSITION "[ FL FR ]" #define DEFAULT_POSITION "[ FL FR ]"
#define DEFAULT_LATENCY (DEFAULT_RATE*2)
#define MODULE_USAGE "[ node.latency=<latency as fraction> ] " \ #define MODULE_USAGE "[ node.latency=<latency as fraction> ] " \
"[ node.name=<name of the nodes> ] " \ "[ node.name=<name of the nodes> ] " \
"[ node.description=<description of the nodes> ] " \ "[ node.description=<description of the nodes> ] " \
@ -687,7 +689,9 @@ static void rtsp_record_reply(void *data, int status, const struct spa_dict *hea
if ((str = spa_dict_lookup(headers, "Audio-Latency")) != NULL) { if ((str = spa_dict_lookup(headers, "Audio-Latency")) != NULL) {
if (!spa_atou32(str, &impl->latency, 0)) if (!spa_atou32(str, &impl->latency, 0))
impl->latency = 0; impl->latency = DEFAULT_LATENCY;
} else {
impl->latency = DEFAULT_LATENCY;
} }
spa_zero(latency); spa_zero(latency);