mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	pulse: try to fix inaccuracy with uncork timing for streams that are created in corked state
This commit is contained in:
		
							parent
							
								
									b8acf5586f
								
							
						
					
					
						commit
						a3b5a94488
					
				
					 1 changed files with 16 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -376,6 +376,22 @@ static void check_smoother_status(pa_stream *s, pa_bool_t aposteriori, pa_bool_t
 | 
			
		|||
    if (!s->smoother)
 | 
			
		||||
        return;
 | 
			
		||||
 | 
			
		||||
    if (!s->timing_info_valid &&
 | 
			
		||||
        !aposteriori &&
 | 
			
		||||
        !force_start &&
 | 
			
		||||
        !force_stop &&
 | 
			
		||||
        s->context->version >= 13) {
 | 
			
		||||
 | 
			
		||||
        /* If the server supports STARTED and UNDERFLOW events we take
 | 
			
		||||
         * them as indications when audio really starts/stops playing,
 | 
			
		||||
         * if we don't have any timing info yet -- instead of trying
 | 
			
		||||
         * to be smart and guessing the server time. Otherwise the
 | 
			
		||||
         * unknown transport delay we don't know might add too much
 | 
			
		||||
         * noise to our time calculations. */
 | 
			
		||||
 | 
			
		||||
        return;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    x = pa_rtclock_now();
 | 
			
		||||
 | 
			
		||||
    if (s->timing_info_valid) {
 | 
			
		||||
| 
						 | 
				
			
			@ -390,7 +406,6 @@ static void check_smoother_status(pa_stream *s, pa_bool_t aposteriori, pa_bool_t
 | 
			
		|||
    else if (force_start || s->buffer_attr.prebuf == 0)
 | 
			
		||||
        pa_smoother_resume(s->smoother, x, TRUE);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    /* Please note that we have no idea if playback actually started
 | 
			
		||||
     * if prebuf is non-zero! */
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue