mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	Fix deferred volume not being applied if sink is closed
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
This commit is contained in:
		
							parent
							
								
									bb4b8f896e
								
							
						
					
					
						commit
						ca6057316d
					
				
					 2 changed files with 12 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -1751,8 +1751,12 @@ static void thread_func(void *userdata) {
 | 
			
		|||
        if (u->sink->flags & PA_SINK_DEFERRED_VOLUME) {
 | 
			
		||||
            pa_usec_t volume_sleep;
 | 
			
		||||
            pa_sink_volume_change_apply(u->sink, &volume_sleep);
 | 
			
		||||
            if (volume_sleep > 0)
 | 
			
		||||
                rtpoll_sleep = PA_MIN(volume_sleep, rtpoll_sleep);
 | 
			
		||||
            if (volume_sleep > 0) {
 | 
			
		||||
                if (rtpoll_sleep > 0)
 | 
			
		||||
                    rtpoll_sleep = PA_MIN(volume_sleep, rtpoll_sleep);
 | 
			
		||||
                else
 | 
			
		||||
                    rtpoll_sleep = volume_sleep;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (rtpoll_sleep > 0)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1452,8 +1452,12 @@ static void thread_func(void *userdata) {
 | 
			
		|||
        if (u->source->flags & PA_SOURCE_DEFERRED_VOLUME) {
 | 
			
		||||
            pa_usec_t volume_sleep;
 | 
			
		||||
            pa_source_volume_change_apply(u->source, &volume_sleep);
 | 
			
		||||
            if (volume_sleep > 0)
 | 
			
		||||
                rtpoll_sleep = PA_MIN(volume_sleep, rtpoll_sleep);
 | 
			
		||||
            if (volume_sleep > 0) {
 | 
			
		||||
                if (rtpoll_sleep > 0)
 | 
			
		||||
                    rtpoll_sleep = PA_MIN(volume_sleep, rtpoll_sleep);
 | 
			
		||||
                else
 | 
			
		||||
                    rtpoll_sleep = volume_sleep;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (rtpoll_sleep > 0)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue