mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	alsa-seq: add some comments
This commit is contained in:
		
							parent
							
								
									f539b42a03
								
							
						
					
					
						commit
						44840c4a55
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -470,12 +470,15 @@ static int process_read(struct seq_state *state)
 | 
			
		|||
			data[2] = 0x40;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		/* queue_time is the estimated current time of the queue as calculated by
 | 
			
		||||
		 * the DLL. Calculate the age of the event. */
 | 
			
		||||
		ev_time = SPA_TIMESPEC_TO_NSEC(&ev->time.time);
 | 
			
		||||
		if (state->queue_time > ev_time)
 | 
			
		||||
			diff = state->queue_time - ev_time;
 | 
			
		||||
		else
 | 
			
		||||
			diff = 0;
 | 
			
		||||
 | 
			
		||||
		/* convert the age to samples and convert to an offset */
 | 
			
		||||
		offset = (diff * state->rate.denom) / (state->rate.num * SPA_NSEC_PER_SEC);
 | 
			
		||||
		if (state->duration > offset)
 | 
			
		||||
			offset = state->duration - offset;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue