Skip to content

Commit d8be860

Browse files
llyyrkasper93
authored andcommitted
ao_pulse: fix subscribe_cb using wrong bitmask for event type
PA_SUBSCRIPTION_MASK_SINK is a pa_subscription_mask constant used when registering with pa_context_subscribe(), not a pa_subscription_event_type mask. Masking the event type with it would never match PA_SUBSCRIPTION_EVENT_NEW or PA_SUBSCRIPTION_EVENT_REMOVE, causing hotplug events to be silently dropped. Fixes: e017500
1 parent 5e84788 commit d8be860

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

audio/out/ao_pulse.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ static void subscribe_cb(pa_context *c, pa_subscription_event_type_t t,
8080
uint32_t idx, void *userdata)
8181
{
8282
struct ao *ao = userdata;
83-
int type = t & PA_SUBSCRIPTION_MASK_SINK;
83+
int type = t & PA_SUBSCRIPTION_EVENT_TYPE_MASK;
8484
int fac = t & PA_SUBSCRIPTION_EVENT_FACILITY_MASK;
8585
if ((type == PA_SUBSCRIPTION_EVENT_NEW || type == PA_SUBSCRIPTION_EVENT_REMOVE)
8686
&& fac == PA_SUBSCRIPTION_EVENT_SINK)

0 commit comments

Comments
 (0)