mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	resampler: Only use copy when rate is 1.0
The rate we get from dlls can have a subsample precision. However, the check for using process_copy is in sample precision. This means that an adaptive stream will oscillate rather then lock into the exact rate.
This commit is contained in:
		
							parent
							
								
									77f6c009c1
								
							
						
					
					
						commit
						a5419ea670
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -157,7 +157,7 @@ static void impl_native_update_rate(struct resample *r, double rate)
 | 
				
			||||||
	data->inc = data->in_rate / data->out_rate;
 | 
						data->inc = data->in_rate / data->out_rate;
 | 
				
			||||||
	data->frac = data->in_rate % data->out_rate;
 | 
						data->frac = data->in_rate % data->out_rate;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (data->in_rate == data->out_rate) {
 | 
						if (data->in_rate == data->out_rate && rate == 1.0) {
 | 
				
			||||||
		data->func = data->info->process_copy;
 | 
							data->func = data->info->process_copy;
 | 
				
			||||||
		r->func_name = data->info->copy_name;
 | 
							r->func_name = data->info->copy_name;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue