mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	sink, source: Prevent unnecessary rate update attempts
We don't need to try a rate update if the desired sample rate is the same as the one the sink or source is already using.
This commit is contained in:
		
							parent
							
								
									0a0189d972
								
							
						
					
					
						commit
						cd1102cce0
					
				
					 4 changed files with 10 additions and 18 deletions
				
			
		| 
						 | 
				
			
			@ -1392,6 +1392,9 @@ pa_bool_t pa_sink_update_rate(pa_sink *s, uint32_t rate, pa_bool_t passthrough)
 | 
			
		|||
            desired_rate = rate; /* use stream sampling rate, discard default/alternate settings */
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (desired_rate == s->sample_spec.rate)
 | 
			
		||||
            return FALSE;
 | 
			
		||||
 | 
			
		||||
        if (!passthrough && pa_sink_used_by(s) > 0)
 | 
			
		||||
            return FALSE;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue