mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	ignore sinks that do not carry decibel information
This commit is contained in:
		
							parent
							
								
									776c8dec3c
								
							
						
					
					
						commit
						8bc58cc757
					
				
					 1 changed files with 6 additions and 0 deletions
				
			
		| 
						 | 
					@ -69,6 +69,9 @@ static void process_input_volume_change(pa_cvolume *dest_volume, const pa_cvolum
 | 
				
			||||||
    pa_assert(dest_channel_map);
 | 
					    pa_assert(dest_channel_map);
 | 
				
			||||||
    pa_assert(sink);
 | 
					    pa_assert(sink);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (!(sink->flags & PA_SINK_DECIBEL_VOLUME))
 | 
				
			||||||
 | 
					        return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    pa_log_debug("Sink input volume changed");
 | 
					    pa_log_debug("Sink input volume changed");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    max_volume = *dest_virtual_volume;
 | 
					    max_volume = *dest_virtual_volume;
 | 
				
			||||||
| 
						 | 
					@ -167,6 +170,9 @@ static void subscribe_callback(pa_core *core, pa_subscription_event_type_t t, ui
 | 
				
			||||||
    if (!(sink = pa_idxset_get_by_index(core->sinks, idx)))
 | 
					    if (!(sink = pa_idxset_get_by_index(core->sinks, idx)))
 | 
				
			||||||
        return;
 | 
					        return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (!(sink->flags & PA_SINK_DECIBEL_VOLUME))
 | 
				
			||||||
 | 
					        return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    pa_log_debug("Sink volume changed");
 | 
					    pa_log_debug("Sink volume changed");
 | 
				
			||||||
    pa_log_debug("sink = %.2f", (double)pa_cvolume_avg(pa_sink_get_volume(sink, FALSE)) / PA_VOLUME_NORM);
 | 
					    pa_log_debug("sink = %.2f", (double)pa_cvolume_avg(pa_sink_get_volume(sink, FALSE)) / PA_VOLUME_NORM);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue