mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	sink,source: Fix corked stream handling in update_rate()
This fixes the conditional that checks for corked streams and prevents rate updates.
This commit is contained in:
		
							parent
							
								
									0a238f69ad
								
							
						
					
					
						commit
						75573435a0
					
				
					 2 changed files with 8 additions and 6 deletions
				
			
		| 
						 | 
				
			
			@ -972,9 +972,10 @@ pa_bool_t pa_source_update_rate(pa_source *s, uint32_t rate, pa_bool_t passthrou
 | 
			
		|||
            desired_rate = rate; /* use stream sampling rate, discard default/alternate settings */
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (passthrough || pa_source_linked_by(s) == 0) {
 | 
			
		||||
            pa_source_suspend(s, TRUE, PA_SUSPEND_IDLE); /* needed before rate update, will be resumed automatically */
 | 
			
		||||
        }
 | 
			
		||||
        if (!passthrough && pa_source_linked_by(s) > 0)
 | 
			
		||||
            return FALSE;
 | 
			
		||||
 | 
			
		||||
        pa_source_suspend(s, TRUE, PA_SUSPEND_IDLE); /* needed before rate update, will be resumed automatically */
 | 
			
		||||
 | 
			
		||||
        if (s->update_rate(s, desired_rate) == TRUE) {
 | 
			
		||||
            pa_log_info("Changed sampling rate successfully ");
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue