mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	a few modernizations
This commit is contained in:
		
							parent
							
								
									e65c514542
								
							
						
					
					
						commit
						46f0f9ed8b
					
				
					 1 changed files with 6 additions and 6 deletions
				
			
		| 
						 | 
					@ -42,7 +42,7 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct pa_subscription {
 | 
					struct pa_subscription {
 | 
				
			||||||
    pa_core *core;
 | 
					    pa_core *core;
 | 
				
			||||||
    int dead;
 | 
					    pa_bool_t dead;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    pa_subscription_cb_t callback;
 | 
					    pa_subscription_cb_t callback;
 | 
				
			||||||
    void *userdata;
 | 
					    void *userdata;
 | 
				
			||||||
| 
						 | 
					@ -72,7 +72,7 @@ pa_subscription* pa_subscription_new(pa_core *c, pa_subscription_mask_t m, pa_su
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    s = pa_xnew(pa_subscription, 1);
 | 
					    s = pa_xnew(pa_subscription, 1);
 | 
				
			||||||
    s->core = c;
 | 
					    s->core = c;
 | 
				
			||||||
    s->dead = 0;
 | 
					    s->dead = FALSE;
 | 
				
			||||||
    s->callback = callback;
 | 
					    s->callback = callback;
 | 
				
			||||||
    s->userdata = userdata;
 | 
					    s->userdata = userdata;
 | 
				
			||||||
    s->mask = m;
 | 
					    s->mask = m;
 | 
				
			||||||
| 
						 | 
					@ -86,7 +86,7 @@ void pa_subscription_free(pa_subscription*s) {
 | 
				
			||||||
    pa_assert(s);
 | 
					    pa_assert(s);
 | 
				
			||||||
    pa_assert(!s->dead);
 | 
					    pa_assert(!s->dead);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    s->dead = 1;
 | 
					    s->dead = TRUE;
 | 
				
			||||||
    sched_event(s->core);
 | 
					    sched_event(s->core);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -145,7 +145,7 @@ static void dump_event(const char * prefix, pa_subscription_event*e) {
 | 
				
			||||||
        [PA_SUBSCRIPTION_EVENT_REMOVE] = "REMOVE"
 | 
					        [PA_SUBSCRIPTION_EVENT_REMOVE] = "REMOVE"
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    pa_log("%s event (%s|%s|%u)",
 | 
					    pa_log_debug("%s event (%s|%s|%u)",
 | 
				
			||||||
           prefix,
 | 
					           prefix,
 | 
				
			||||||
           fac_table[e->type & PA_SUBSCRIPTION_EVENT_FACILITY_MASK],
 | 
					           fac_table[e->type & PA_SUBSCRIPTION_EVENT_FACILITY_MASK],
 | 
				
			||||||
           type_table[e->type & PA_SUBSCRIPTION_EVENT_TYPE_MASK],
 | 
					           type_table[e->type & PA_SUBSCRIPTION_EVENT_TYPE_MASK],
 | 
				
			||||||
| 
						 | 
					@ -234,7 +234,7 @@ void pa_subscription_post(pa_core *c, pa_subscription_event_type_t t, uint32_t i
 | 
				
			||||||
                 * entry in the queue. */
 | 
					                 * entry in the queue. */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                free_event(i);
 | 
					                free_event(i);
 | 
				
			||||||
                pa_log_debug("dropped redundant event.");
 | 
					                pa_log_debug("Dropped redundant event due to remove event.");
 | 
				
			||||||
                continue;
 | 
					                continue;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -242,7 +242,7 @@ void pa_subscription_post(pa_core *c, pa_subscription_event_type_t t, uint32_t i
 | 
				
			||||||
                /* This object has changed. If a "new" or "change" event for
 | 
					                /* This object has changed. If a "new" or "change" event for
 | 
				
			||||||
                 * this object is still in the queue we can exit. */
 | 
					                 * this object is still in the queue we can exit. */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                pa_log_debug("dropped redundant event.");
 | 
					                pa_log_debug("Dropped redundant event due to change event.");
 | 
				
			||||||
                return;
 | 
					                return;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue