mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	client: Don't update smoother while corked
This prevents the smoother attached to the stream clock from being updated while the stream is corked, which in turn ensures that once corking is completed, pa_stream_get_time() always returns the same value until the stream is uncorked - i.e., the clock does not advance when the client believes that it will not. The actual call to pa_smoother_put() happens on things like stream suspend/unsuspend, which trigger timing updates. This changes the smoother coefficients, which means that a call to pa_smoother_get() for the same value of 'x' can return different values before and after a timing update.
This commit is contained in:
		
							parent
							
								
									6b280e97e3
								
							
						
					
					
						commit
						67d188894c
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -1717,8 +1717,8 @@ static void stream_get_timing_info_callback(pa_pdispatch *pd, uint32_t command,
 | 
			
		|||
                i->read_index -= (int64_t) pa_memblockq_get_length(o->stream->record_memblockq);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /* Update smoother */
 | 
			
		||||
        if (o->stream->smoother) {
 | 
			
		||||
        /* Update smoother if we're not corked */
 | 
			
		||||
        if (o->stream->smoother && !o->stream->corked) {
 | 
			
		||||
            pa_usec_t u, x;
 | 
			
		||||
 | 
			
		||||
            u = x = pa_rtclock_now() - i->transport_usec;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue