mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	solaris: Use real_volume for set/get volume
This got missed when other bits were updated. Patch submitted by Brian Cameron <brian.cameron@oracle.com>.
This commit is contained in:
		
							parent
							
								
									4ce0eb18c2
								
							
						
					
					
						commit
						5bb9d52b7e
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
					@ -526,7 +526,7 @@ static void source_set_volume(pa_source *s) {
 | 
				
			||||||
    if (u->fd >= 0) {
 | 
					    if (u->fd >= 0) {
 | 
				
			||||||
        AUDIO_INITINFO(&info);
 | 
					        AUDIO_INITINFO(&info);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        info.play.gain = pa_cvolume_max(&s->volume) * AUDIO_MAX_GAIN / PA_VOLUME_NORM;
 | 
					        info.play.gain = pa_cvolume_max(&s->real_volume) * AUDIO_MAX_GAIN / PA_VOLUME_NORM;
 | 
				
			||||||
        assert(info.play.gain <= AUDIO_MAX_GAIN);
 | 
					        assert(info.play.gain <= AUDIO_MAX_GAIN);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (ioctl(u->fd, AUDIO_SETINFO, &info) < 0) {
 | 
					        if (ioctl(u->fd, AUDIO_SETINFO, &info) < 0) {
 | 
				
			||||||
| 
						 | 
					@ -548,7 +548,7 @@ static void source_get_volume(pa_source *s) {
 | 
				
			||||||
        if (ioctl(u->fd, AUDIO_GETINFO, &info) < 0)
 | 
					        if (ioctl(u->fd, AUDIO_GETINFO, &info) < 0)
 | 
				
			||||||
            pa_log("AUDIO_SETINFO: %s", pa_cstrerror(errno));
 | 
					            pa_log("AUDIO_SETINFO: %s", pa_cstrerror(errno));
 | 
				
			||||||
        else
 | 
					        else
 | 
				
			||||||
            pa_cvolume_set(&s->volume, s->sample_spec.channels, info.play.gain * PA_VOLUME_NORM / AUDIO_MAX_GAIN);
 | 
					            pa_cvolume_set(&s->real_volume, s->sample_spec.channels, info.play.gain * PA_VOLUME_NORM / AUDIO_MAX_GAIN);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue