mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	sink-input, source-output: remove the state getters
pa_sink_input_get_state() and pa_source_output_get_state() just return the state variable. We can as well access the state variable directly. There are no behaviour changes, except that some filter sources accessed the main thread's state variable from their push() callbacks. I fixed them so that they use the thread_info.state variable instead.
This commit is contained in:
		
							parent
							
								
									64ba239f65
								
							
						
					
					
						commit
						b4a36453da
					
				
					 21 changed files with 57 additions and 81 deletions
				
			
		| 
						 | 
				
			
			@ -280,7 +280,7 @@ static int sink_set_state_in_main_thread_cb(pa_sink *s, pa_sink_state_t state, p
 | 
			
		|||
    pa_assert_se(u = s->userdata);
 | 
			
		||||
 | 
			
		||||
    if (!PA_SINK_IS_LINKED(state) ||
 | 
			
		||||
        !PA_SINK_INPUT_IS_LINKED(pa_sink_input_get_state(u->sink_input)))
 | 
			
		||||
        !PA_SINK_INPUT_IS_LINKED(u->sink_input->state))
 | 
			
		||||
        return 0;
 | 
			
		||||
 | 
			
		||||
    pa_sink_input_cork(u->sink_input, state == PA_SINK_SUSPENDED);
 | 
			
		||||
| 
						 | 
				
			
			@ -344,7 +344,7 @@ static void sink_set_volume_cb(pa_sink *s) {
 | 
			
		|||
    pa_assert_se(u = s->userdata);
 | 
			
		||||
 | 
			
		||||
    if (!PA_SINK_IS_LINKED(pa_sink_get_state(s)) ||
 | 
			
		||||
        !PA_SINK_INPUT_IS_LINKED(pa_sink_input_get_state(u->sink_input)))
 | 
			
		||||
        !PA_SINK_INPUT_IS_LINKED(u->sink_input->state))
 | 
			
		||||
        return;
 | 
			
		||||
 | 
			
		||||
    pa_sink_input_set_volume(u->sink_input, &s->real_volume, s->save_volume, true);
 | 
			
		||||
| 
						 | 
				
			
			@ -358,7 +358,7 @@ static void sink_set_mute_cb(pa_sink *s) {
 | 
			
		|||
    pa_assert_se(u = s->userdata);
 | 
			
		||||
 | 
			
		||||
    if (!PA_SINK_IS_LINKED(pa_sink_get_state(s)) ||
 | 
			
		||||
        !PA_SINK_INPUT_IS_LINKED(pa_sink_input_get_state(u->sink_input)))
 | 
			
		||||
        !PA_SINK_INPUT_IS_LINKED(u->sink_input->state))
 | 
			
		||||
        return;
 | 
			
		||||
 | 
			
		||||
    pa_sink_input_set_mute(u->sink_input, s->muted, s->save_muted);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue