Clean up dwmblocks-pulse-listener.c
This commit is contained in:
parent
502f596c87
commit
2e64eee765
@ -41,17 +41,11 @@ static void server_info_callback(pa_context *ctx, const pa_server_info *info,
|
||||
static void subscribe_callback(pa_context *ctx,
|
||||
pa_subscription_event_type_t type, uint32_t idx,
|
||||
TargetData *target) {
|
||||
unsigned int facility = type & PA_SUBSCRIPTION_EVENT_FACILITY_MASK;
|
||||
pa_operation *op = NULL;
|
||||
switch (facility) {
|
||||
case PA_SUBSCRIPTION_EVENT_SINK:
|
||||
op = pa_context_get_sink_info_by_index(ctx,
|
||||
idx,
|
||||
(pa_sink_info_cb_t) sink_info_callback,
|
||||
target);
|
||||
break;
|
||||
}
|
||||
if (op) {
|
||||
if ((type & PA_SUBSCRIPTION_EVENT_FACILITY_MASK) == PA_SUBSCRIPTION_EVENT_SINK) {
|
||||
pa_operation *op = pa_context_get_sink_info_by_index(ctx,
|
||||
idx,
|
||||
(pa_sink_info_cb_t) sink_info_callback,
|
||||
target);
|
||||
pa_operation_unref(op);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user