mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	resample: completely fill resampler
start with a completely filled resampler so that the first input byte immediately gives an output sample. When then have n_taps/2 leading (almost) 0 samples. Also make the passthrough resampler act like the real resampler by introducing an n_taps/2 delay.
This commit is contained in:
		
							parent
							
								
									b1bfc900d6
								
							
						
					
					
						commit
						a232e67dd8
					
				
					 2 changed files with 4 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -243,7 +243,7 @@ static void impl_native_reset (struct resample *r)
 | 
			
		|||
{
 | 
			
		||||
	struct native_data *d = r->data;
 | 
			
		||||
	memset(d->hist_mem, 0, r->channels * sizeof(float) * d->n_taps * 2);
 | 
			
		||||
	d->hist = d->n_taps / 2;
 | 
			
		||||
	d->hist = d->n_taps - 1;
 | 
			
		||||
	d->phase = 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue