mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	maintain a pa_core state variable
This commit is contained in:
		
							parent
							
								
									88c9f9fba6
								
							
						
					
					
						commit
						a3162a396e
					
				
					 2 changed files with 13 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -90,6 +90,7 @@ pa_core* pa_core_new(pa_mainloop_api *m, pa_bool_t shared, size_t shm_size) {
 | 
			
		|||
    c->parent.parent.free = core_free;
 | 
			
		||||
    c->parent.process_msg = core_process_msg;
 | 
			
		||||
 | 
			
		||||
    c->state = PA_CORE_STARTUP;
 | 
			
		||||
    c->mainloop = m;
 | 
			
		||||
    c->clients = pa_idxset_new(NULL, NULL);
 | 
			
		||||
    c->sinks = pa_idxset_new(NULL, NULL);
 | 
			
		||||
| 
						 | 
				
			
			@ -149,6 +150,8 @@ pa_core* pa_core_new(pa_mainloop_api *m, pa_bool_t shared, size_t shm_size) {
 | 
			
		|||
 | 
			
		||||
    pa_core_check_idle(c);
 | 
			
		||||
 | 
			
		||||
    c->state = PA_CORE_RUNNING;
 | 
			
		||||
 | 
			
		||||
    return c;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -157,6 +160,8 @@ static void core_free(pa_object *o) {
 | 
			
		|||
    int j;
 | 
			
		||||
    pa_assert(c);
 | 
			
		||||
 | 
			
		||||
    c->state = PA_CORE_SHUTDOWN;
 | 
			
		||||
 | 
			
		||||
    pa_module_unload_all(c);
 | 
			
		||||
    pa_assert(!c->modules);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue