mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	core: volume ramping fix
Hi,
I found that volume ramping is inside PA now.
there's a minor fix here, it is a bug i found after the patch is submitted:
line 1781 of sink-input.c :
if ((i->thread_info.ramp_info.envelope_dying - nbytes) <= 0) {
need to be changed to
if ((i->thread_info.ramp_info.envelope_dying - (ssize_t) nbytes) <= 0) {
otherwise this argument will never be negative since nbytes is of type
size_t which is unsigned.
Please change it when you have time, sorry if bring any inconvenience.  :)
			
			
This commit is contained in:
		
							parent
							
								
									6dfb1ee27e
								
							
						
					
					
						commit
						aa9348441d
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -1780,7 +1780,7 @@ static void sink_input_rewind_ramp_info(pa_sink_input *i, size_t nbytes) {
 | 
			
		|||
                i->thread_info.ramp_info.is_ramping = TRUE;
 | 
			
		||||
            }
 | 
			
		||||
        } else if (i->thread_info.ramp_info.envelope_dying < envelope_length) {
 | 
			
		||||
            if ((i->thread_info.ramp_info.envelope_dying - nbytes) <= 0) {
 | 
			
		||||
            if ((i->thread_info.ramp_info.envelope_dying - (ssize_t) nbytes) <= 0) {
 | 
			
		||||
                pa_log_debug("Envelope Restart");
 | 
			
		||||
                pa_envelope_restart(i->thread_info.ramp_info.envelope);
 | 
			
		||||
            }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue