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
				
			
		| 
						 | 
				
			
			@ -1058,7 +1058,7 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse
 | 
			
		|||
            pa_sink_input *i = PA_SINK_INPUT(data);
 | 
			
		||||
            int r = 0;
 | 
			
		||||
 | 
			
		||||
            if (PA_LIKELY(pa_format_info_is_pcm(i->format)))
 | 
			
		||||
            if (PA_LIKELY(!pa_sink_input_is_passthrough(i)))
 | 
			
		||||
                break;
 | 
			
		||||
 | 
			
		||||
            u->old_rate = u->sink->sample_spec.rate;
 | 
			
		||||
| 
						 | 
				
			
			@ -1084,7 +1084,7 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse
 | 
			
		|||
            pa_sink_input *i = PA_SINK_INPUT(data);
 | 
			
		||||
            int r = 0;
 | 
			
		||||
 | 
			
		||||
            if (PA_LIKELY(pa_format_info_is_pcm(i->format)))
 | 
			
		||||
            if (PA_LIKELY(!pa_sink_input_is_passthrough(i)))
 | 
			
		||||
                break;
 | 
			
		||||
 | 
			
		||||
            /* Passthrough format, see if we need to reset sink sample rate */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue