Skip to content

Commit

Permalink
Merge pull request #14 from hypperd/fix-pipewire
Browse files Browse the repository at this point in the history
Fixes for pipewire 0.3.77
  • Loading branch information
ErikReider authored Aug 9, 2023
2 parents 1e8817e + 45733fe commit c850bc4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ int main(int argc, char *argv[]) {
}

pa_subscription_mask_t all_mask =
(pa_subscription_mask_t)(PA_SUBSCRIPTION_MASK_SINK |
PA_SUBSCRIPTION_MASK_SOURCE);
(pa_subscription_mask_t)(PA_SUBSCRIPTION_MASK_SINK_INPUT |
PA_SUBSCRIPTION_MASK_SOURCE_OUTPUT);
if (!printSink && !printSource && !printBoth && !printBothWayBar) {
return Pulse().init(SUBSCRIPTION_TYPE_IDLE, all_mask, EVENT_TYPE_IDLE);
} else if (printBoth) {
Expand All @@ -57,11 +57,11 @@ int main(int argc, char *argv[]) {
return Pulse().init(SUBSCRIPTION_TYPE_DRY_BOTH_WAYBAR, all_mask,
EVENT_TYPE_DRY_BOTH);
} else if (printSink) {
return Pulse().init(SUBSCRIPTION_TYPE_DRY_SINK, PA_SUBSCRIPTION_MASK_SINK,
return Pulse().init(SUBSCRIPTION_TYPE_DRY_SINK, PA_SUBSCRIPTION_MASK_SINK_INPUT,
EVENT_TYPE_DRY_SINK);
} else if (printSource) {
return Pulse().init(SUBSCRIPTION_TYPE_DRY_SOURCE,
PA_SUBSCRIPTION_MASK_SOURCE, EVENT_TYPE_DRY_SOURCE);
PA_SUBSCRIPTION_MASK_SOURCE_OUTPUT, EVENT_TYPE_DRY_SOURCE);
}
return 0;
}
4 changes: 2 additions & 2 deletions src/pulse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ void Pulse::subscribe_callback(pa_context *, pa_subscription_event_type_t type,
Data *data = (Data *)userdata;
EventType eventType;
switch (type & PA_SUBSCRIPTION_EVENT_FACILITY_MASK) {
case PA_SUBSCRIPTION_EVENT_SINK:
case PA_SUBSCRIPTION_EVENT_SINK_INPUT:
eventType = EVENT_TYPE_DRY_SINK;
break;
case PA_SUBSCRIPTION_EVENT_SOURCE:
case PA_SUBSCRIPTION_EVENT_SOURCE_OUTPUT:
eventType = EVENT_TYPE_DRY_SOURCE;
break;
default:
Expand Down

0 comments on commit c850bc4

Please sign in to comment.