mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	sink: simplify silence checks
This commit is contained in:
		
							parent
							
								
									320d76f158
								
							
						
					
					
						commit
						973a4ebdba
					
				
					 1 changed files with 10 additions and 12 deletions
				
			
		| 
						 | 
				
			
			@ -926,7 +926,6 @@ void pa_sink_render(pa_sink*s, size_t length, pa_memchunk *result) {
 | 
			
		|||
 | 
			
		||||
        pa_sw_cvolume_multiply(&volume, &s->thread_info.soft_volume, &info[0].volume);
 | 
			
		||||
 | 
			
		||||
        if (s->thread_info.soft_muted || !pa_cvolume_is_norm(&volume)) {
 | 
			
		||||
        if (s->thread_info.soft_muted || pa_cvolume_is_muted(&volume)) {
 | 
			
		||||
            pa_memblock_unref(result->memblock);
 | 
			
		||||
            pa_silence_memchunk_get(&s->core->silence_cache,
 | 
			
		||||
| 
						 | 
				
			
			@ -934,11 +933,10 @@ void pa_sink_render(pa_sink*s, size_t length, pa_memchunk *result) {
 | 
			
		|||
                                    result,
 | 
			
		||||
                                    &s->sample_spec,
 | 
			
		||||
                                    result->length);
 | 
			
		||||
            } else {
 | 
			
		||||
        } else if (!pa_cvolume_is_norm(&volume)) {
 | 
			
		||||
            pa_memchunk_make_writable(result, 0);
 | 
			
		||||
            pa_volume_memchunk(result, &s->sample_spec, &volume);
 | 
			
		||||
        }
 | 
			
		||||
        }
 | 
			
		||||
    } else {
 | 
			
		||||
        void *ptr;
 | 
			
		||||
        result->memblock = pa_memblock_new(s->core->mempool, length);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue