mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -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
							
								
									cda2522384
								
							
						
					
					
						commit
						e4d6cca32a
					
				
					 1 changed files with 5 additions and 7 deletions
				
			
		| 
						 | 
					@ -167,7 +167,7 @@ PW_LOG_TOPIC_STATIC(mod_topic, "mod." NAME);
 | 
				
			||||||
			"( raop.encryption.type=<encryption, default:none> ) "			\
 | 
								"( raop.encryption.type=<encryption, default:none> ) "			\
 | 
				
			||||||
			"( raop.audio.codec=PCM ) "						\
 | 
								"( raop.audio.codec=PCM ) "						\
 | 
				
			||||||
			"( raop.password=<password for auth> ) "				\
 | 
								"( raop.password=<password for auth> ) "				\
 | 
				
			||||||
			"( raop.latency.ms=<min latency in ms, default:"SPA_STRINGIFY(RAOP_LATENCY_MS)"> ) "	\
 | 
								"( raop.latency.ms=<min latency in ms, default:"SPA_STRINGIFY(DEFAULT_LATENCY_MS)"> ) "	\
 | 
				
			||||||
			"( node.latency=<latency as fraction> ) "				\
 | 
								"( 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> ) "			\
 | 
				
			||||||
| 
						 | 
					@ -892,12 +892,9 @@ static int rtsp_record_reply(void *data, int status, const struct spa_dict *head
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if ((str = spa_dict_lookup(headers, "Audio-Latency")) != NULL) {
 | 
						if ((str = spa_dict_lookup(headers, "Audio-Latency")) != NULL) {
 | 
				
			||||||
		uint32_t l;
 | 
							uint32_t l;
 | 
				
			||||||
		if (spa_atou32(str, &l, 0)) {
 | 
							if (spa_atou32(str, &l, 0))
 | 
				
			||||||
			if (l == 0)
 | 
					 | 
				
			||||||
				l = msec_to_samples(impl, DEFAULT_LATENCY_MS);
 | 
					 | 
				
			||||||
			impl->latency = SPA_MAX(l, impl->latency);
 | 
								impl->latency = SPA_MAX(l, impl->latency);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	spa_zero(latency);
 | 
						spa_zero(latency);
 | 
				
			||||||
	latency.direction = PW_DIRECTION_INPUT;
 | 
						latency.direction = PW_DIRECTION_INPUT;
 | 
				
			||||||
| 
						 | 
					@ -1854,7 +1851,8 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args)
 | 
				
			||||||
	impl->mtu = impl->stride * impl->psamples;
 | 
						impl->mtu = impl->stride * impl->psamples;
 | 
				
			||||||
	impl->sync_period = impl->rate / impl->psamples;
 | 
						impl->sync_period = impl->rate / impl->psamples;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if ((str = pw_properties_get(props, "raop.latency.ms")) != NULL)
 | 
						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)));
 | 
						impl->latency = SPA_MAX(impl->latency, msec_to_samples(impl, atoi(str)));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (pw_properties_get(props, PW_KEY_AUDIO_FORMAT) == NULL)
 | 
						if (pw_properties_get(props, PW_KEY_AUDIO_FORMAT) == NULL)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue