mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	volume: Clamp volume to PA_VOLUME_MAX
This ensures that we always clamp the volume to PA_VOLUME_MAX. While this currently has no effect, it will be required for making sure we don't exceed PA_VOLUME_MAX when its value changes in the future.
This commit is contained in:
		
							parent
							
								
									1d2ef7923d
								
							
						
					
					
						commit
						49101fc540
					
				
					 7 changed files with 24 additions and 19 deletions
				
			
		| 
						 | 
				
			
			@ -188,8 +188,8 @@ int pa__init(pa_module*m) {
 | 
			
		|||
    u->sink_name = pa_xstrdup(pa_modargs_get_value(ma, "sink", NULL));
 | 
			
		||||
    u->fd = -1;
 | 
			
		||||
    u->fd_type = 0;
 | 
			
		||||
    u->volume_limit = volume_limit;
 | 
			
		||||
    u->volume_step = volume_step;
 | 
			
		||||
    u->volume_limit = PA_CLAMP_VOLUME(volume_limit);
 | 
			
		||||
    u->volume_step = PA_CLAMP_VOLUME(volume_step);
 | 
			
		||||
 | 
			
		||||
    if ((u->fd = pa_open_cloexec(pa_modargs_get_value(ma, "device", DEFAULT_DEVICE), O_RDONLY, 0)) < 0) {
 | 
			
		||||
        pa_log("Failed to open evdev device: %s", pa_cstrerror(errno));
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue