mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-10-29 05:40:27 -04:00 
			
		
		
		
	plugins: alsa: increase follower write synchronization when htimestamps are enabled
alsa_write_sync can insert or remove some data from alsa when resynchronization is needed. Avail and delay are equal when high precision timestamps are not allowed. When the high precision timestamps are enabled, the delay is avail adjusted to current_time. Signed-off-by: Martin Geier <martin.geier@streamunlimited.com>
This commit is contained in:
		
							parent
							
								
									7e135a5235
								
							
						
					
					
						commit
						d04ee91714
					
				
					 1 changed files with 4 additions and 4 deletions
				
			
		|  | @ -3020,10 +3020,10 @@ static int alsa_write_sync(struct state *state, uint64_t current_time) | ||||||
| 						state->name, avail, delay, | 						state->name, avail, delay, | ||||||
| 						target, state->threshold, suppressed); | 						target, state->threshold, suppressed); | ||||||
| 
 | 
 | ||||||
| 				if (avail > target) | 				if (delay > target) | ||||||
| 					snd_pcm_rewind(state->hndl, avail - target); | 					snd_pcm_rewind(state->hndl, delay - target); | ||||||
| 				else if (avail < target) | 				else if (delay < target) | ||||||
| 					spa_alsa_silence(state, target - avail); | 					spa_alsa_silence(state, target - delay); | ||||||
| 				avail = target; | 				avail = target; | ||||||
| 			} | 			} | ||||||
| 			spa_dll_init(&state->dll); | 			spa_dll_init(&state->dll); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Martin Geier
						Martin Geier