mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
raop: use default 1500ms latency again
Use 1500ms as the default latency and use the raop.latency.ms to configure a smaller value. Fixes #3605
This commit is contained in:
parent
ca011af2cd
commit
8079194952
1 changed files with 6 additions and 4 deletions
|
|
@ -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(DEFAULT_LATENCY_MS)"> ) " \
|
||||
"( node.latency=<latency as fraction> ) " \
|
||||
"( node.name=<name of the nodes> ) " \
|
||||
"( node.description=<description of the nodes> ) " \
|
||||
|
|
@ -891,11 +892,8 @@ static int rtsp_record_reply(void *data, int status, const struct spa_dict *head
|
|||
|
||||
if ((str = spa_dict_lookup(headers, "Audio-Latency")) != NULL) {
|
||||
uint32_t l;
|
||||
if (spa_atou32(str, &l, 0)) {
|
||||
if (l == 0)
|
||||
l = msec_to_samples(impl, DEFAULT_LATENCY_MS);
|
||||
if (spa_atou32(str, &l, 0))
|
||||
impl->latency = SPA_MAX(l, impl->latency);
|
||||
}
|
||||
}
|
||||
|
||||
spa_zero(latency);
|
||||
|
|
@ -1853,6 +1851,10 @@ 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)
|
||||
str = SPA_STRINGIFY(DEFAULT_LATENCY_MS);
|
||||
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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue