mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	core: Factor out passthrough checks into their own functions
Since we currently have two mechanisms to signal a passthrough connection (non-PCM format or PA_SINK_INPUT_PASSTHROUGH flag), we move all the related checks into functions and use those everywhere. This makes things more consistent, and should we decide to get rid of the flag, we only need to change pa_sink_input_*_is_passthrough() accordingly.
This commit is contained in:
		
							parent
							
								
									9a39a3df10
								
							
						
					
					
						commit
						4fb68b91ac
					
				
					 4 changed files with 41 additions and 17 deletions
				
			
		| 
						 | 
				
			
			@ -1252,7 +1252,7 @@ pa_bool_t pa_sink_is_passthrough(pa_sink *s) {
 | 
			
		|||
    if (pa_idxset_size(s->inputs) == 1) {
 | 
			
		||||
        alt_i = pa_idxset_first(s->inputs, &idx);
 | 
			
		||||
 | 
			
		||||
        if (!pa_format_info_is_pcm(alt_i->format))
 | 
			
		||||
        if (pa_sink_input_is_passthrough(alt_i))
 | 
			
		||||
            return TRUE;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue