mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	pulse-server: set record latency as fragsize / 2
The record latency is set to fragsize / 2 by pulseaudio, so do the same in pipewire. Fixes #2702
This commit is contained in:
		
							parent
							
								
									94336cb2c9
								
							
						
					
					
						commit
						d1cd199f16
					
				
					 1 changed files with 3 additions and 2 deletions
				
			
		| 
						 | 
					@ -685,9 +685,10 @@ static uint64_t fix_record_buffer_attr(struct stream *s, struct buffer_attr *att
 | 
				
			||||||
	if (attr->maxlength < attr->fragsize * 4)
 | 
						if (attr->maxlength < attr->fragsize * 4)
 | 
				
			||||||
		attr->maxlength = attr->fragsize * 4;
 | 
							attr->maxlength = attr->fragsize * 4;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	latency = attr->fragsize / frame_size;
 | 
						/* pulseaudio configures half the fragsize as latency in the source. */
 | 
				
			||||||
 | 
						latency = attr->fragsize / 2;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	lat->num = latency;
 | 
						lat->num = latency / frame_size;
 | 
				
			||||||
	lat->denom = rate;
 | 
						lat->denom = rate;
 | 
				
			||||||
	clamp_latency(s, lat);
 | 
						clamp_latency(s, lat);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue