mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	sink: volume handling rework, new flat volume logic
- We now implement a logic where the sink maintains two distinct volumes: the 'reference' volume which is shown to the users, and the 'real' volume, which is configured to the hardware. The latter is configured to the max of all streams. Volume changes on sinks are propagated back to the streams proportional to the reference volume change. Volume changes on sink inputs are forwarded to the sink by 'pushing' the volume if necessary. This renames the old 'virtual_volume' to 'real_volume'. The 'reference_volume' is now the one exposed to users. By this logic the sink volume visible to the user, will always be the "upper" boundary for everything that is played. Saved/restored stream volumes are measured relative to this boundary, the factor here is always < 1.0. - introduce accuracy for sink volumes, similar to the accuracy we already have for source volumes. - other cleanups.
This commit is contained in:
		
							parent
							
								
									5207e19142
								
							
						
					
					
						commit
						8c31974f56
					
				
					 16 changed files with 342 additions and 295 deletions
				
			
		| 
						 | 
				
			
			@ -218,7 +218,7 @@ static void subscribe_callback(pa_core *c, pa_subscription_event_type_t t, uint3
 | 
			
		|||
 | 
			
		||||
        if (sink->save_volume) {
 | 
			
		||||
            entry.channel_map = sink->channel_map;
 | 
			
		||||
            entry.volume = *pa_sink_get_volume(sink, FALSE, TRUE);
 | 
			
		||||
            entry.volume = *pa_sink_get_volume(sink, FALSE);
 | 
			
		||||
            entry.volume_valid = TRUE;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue