mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	Solaris: build fixes (resent)
Fix bit rot due to recent flat volume changes.
This commit is contained in:
		
							parent
							
								
									b96390fc98
								
							
						
					
					
						commit
						44c7aa55e2
					
				
					 1 changed files with 5 additions and 7 deletions
				
			
		| 
						 | 
				
			
			@ -479,7 +479,7 @@ static void sink_set_volume(pa_sink *s) {
 | 
			
		|||
    if (u->fd >= 0) {
 | 
			
		||||
        AUDIO_INITINFO(&info);
 | 
			
		||||
 | 
			
		||||
        info.play.gain = pa_cvolume_max(&s->virtual_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);
 | 
			
		||||
 | 
			
		||||
        if (ioctl(u->fd, AUDIO_SETINFO, &info) < 0) {
 | 
			
		||||
| 
						 | 
				
			
			@ -501,8 +501,7 @@ static void sink_get_volume(pa_sink *s) {
 | 
			
		|||
        if (ioctl(u->fd, AUDIO_GETINFO, &info) < 0)
 | 
			
		||||
            pa_log("AUDIO_SETINFO: %s", pa_cstrerror(errno));
 | 
			
		||||
        else
 | 
			
		||||
            pa_cvolume_set(&s->virtual_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);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -515,7 +514,7 @@ static void source_set_volume(pa_source *s) {
 | 
			
		|||
    if (u->fd >= 0) {
 | 
			
		||||
        AUDIO_INITINFO(&info);
 | 
			
		||||
 | 
			
		||||
        info.play.gain = pa_cvolume_max(&s->virtual_volume) * AUDIO_MAX_GAIN / PA_VOLUME_NORM;
 | 
			
		||||
        info.play.gain = pa_cvolume_max(&s->volume) * AUDIO_MAX_GAIN / PA_VOLUME_NORM;
 | 
			
		||||
        assert(info.play.gain <= AUDIO_MAX_GAIN);
 | 
			
		||||
 | 
			
		||||
        if (ioctl(u->fd, AUDIO_SETINFO, &info) < 0) {
 | 
			
		||||
| 
						 | 
				
			
			@ -537,8 +536,7 @@ static void source_get_volume(pa_source *s) {
 | 
			
		|||
        if (ioctl(u->fd, AUDIO_GETINFO, &info) < 0)
 | 
			
		||||
            pa_log("AUDIO_SETINFO: %s", pa_cstrerror(errno));
 | 
			
		||||
        else
 | 
			
		||||
            pa_cvolume_set(&s->virtual_volume, s->sample_spec.channels,
 | 
			
		||||
                info.play.gain * PA_VOLUME_NORM / AUDIO_MAX_GAIN);
 | 
			
		||||
            pa_cvolume_set(&s->volume, s->sample_spec.channels, info.play.gain * PA_VOLUME_NORM / AUDIO_MAX_GAIN);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -797,7 +795,7 @@ static void sig_callback(pa_mainloop_api *api, pa_signal_event*e, int sig, void
 | 
			
		|||
    pa_log_debug("caught signal");
 | 
			
		||||
 | 
			
		||||
    if (u->sink) {
 | 
			
		||||
        pa_sink_get_volume(u->sink, TRUE, FALSE);
 | 
			
		||||
        pa_sink_get_volume(u->sink, TRUE);
 | 
			
		||||
        pa_sink_get_mute(u->sink, TRUE);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue