mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	device-port: Fire a hook when the latency offset changes.
This change adds a new hook type: PA_CORE_HOOK_PORT_LATENCY_OFFSET_CHANGED And it is fired when the port latency offset changes.
This commit is contained in:
		
							parent
							
								
									56a3561803
								
							
						
					
					
						commit
						477d6b71b6
					
				
					 2 changed files with 2 additions and 0 deletions
				
			
		| 
						 | 
					@ -116,6 +116,7 @@ typedef enum pa_core_hook {
 | 
				
			||||||
    PA_CORE_HOOK_CARD_PROFILE_ADDED,
 | 
					    PA_CORE_HOOK_CARD_PROFILE_ADDED,
 | 
				
			||||||
    PA_CORE_HOOK_PORT_AVAILABLE_CHANGED,
 | 
					    PA_CORE_HOOK_PORT_AVAILABLE_CHANGED,
 | 
				
			||||||
    PA_CORE_HOOK_PORT_ADDED,
 | 
					    PA_CORE_HOOK_PORT_ADDED,
 | 
				
			||||||
 | 
					    PA_CORE_HOOK_PORT_LATENCY_OFFSET_CHANGED,
 | 
				
			||||||
    PA_CORE_HOOK_MAX
 | 
					    PA_CORE_HOOK_MAX
 | 
				
			||||||
} pa_core_hook_t;
 | 
					} pa_core_hook_t;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -127,4 +127,5 @@ void pa_device_port_set_latency_offset(pa_device_port *p, int64_t offset) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    pa_assert_se(core = p->core);
 | 
					    pa_assert_se(core = p->core);
 | 
				
			||||||
    pa_subscription_post(core, PA_SUBSCRIPTION_EVENT_CARD|PA_SUBSCRIPTION_EVENT_CHANGE, p->card->index);
 | 
					    pa_subscription_post(core, PA_SUBSCRIPTION_EVENT_CARD|PA_SUBSCRIPTION_EVENT_CHANGE, p->card->index);
 | 
				
			||||||
 | 
					    pa_hook_fire(&core->hooks[PA_CORE_HOOK_PORT_LATENCY_OFFSET_CHANGED], p);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue