raop: add option back to set custom latency

This commit is contained in:
Wim Taymans 2023-12-11 16:10:06 +01:00
parent ae045ef3f6
commit cda2522384

View file

@ -167,6 +167,7 @@ PW_LOG_TOPIC_STATIC(mod_topic, "mod." NAME);
"( raop.encryption.type=<encryption, default:none> ) " \
"( raop.audio.codec=PCM ) " \
"( raop.password=<password for auth> ) " \
"( raop.latency.ms=<min latency in ms, default:"SPA_STRINGIFY(RAOP_LATENCY_MS)"> ) " \
"( node.latency=<latency as fraction> ) " \
"( node.name=<name of the nodes> ) " \
"( node.description=<description of the nodes> ) " \
@ -1853,6 +1854,9 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args)
impl->mtu = impl->stride * impl->psamples;
impl->sync_period = impl->rate / impl->psamples;
if ((str = pw_properties_get(props, "raop.latency.ms")) != NULL)
impl->latency = SPA_MAX(impl->latency, msec_to_samples(impl, atoi(str)));
if (pw_properties_get(props, PW_KEY_AUDIO_FORMAT) == NULL)
pw_properties_setf(props, PW_KEY_AUDIO_FORMAT, "%s", RAOP_FORMAT);
if (pw_properties_get(props, PW_KEY_AUDIO_RATE) == NULL)