Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
Add client invalid index check to source_output_info_callback as well.
  • Loading branch information
LeSqueed committed Jun 25, 2023
1 parent ce2e9a8 commit 21d8cce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pulse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ int Pulse::init(SubscriptionType subscriptionType,
void Pulse::sink_input_info_callback(pa_context *, const pa_sink_input_info *i,
int, void *userdata) {
Data *data = (Data *)userdata;
if (i && !i->corked && i->client != 0) data->activeSink = true;
if (i && !i->corked && i->client != PA_INVALID_INDEX) data->activeSink = true;
pa_threaded_mainloop_signal(data->mainloop, 0);
}

void Pulse::source_output_info_callback(pa_context *,
const pa_source_output_info *i, int,
void *userdata) {
Data *data = (Data *)userdata;
if (i && !i->corked) data->activeSource = true;
if (i && !i->corked && i->client != PA_INVALID_INDEX) data->activeSource = true;
pa_threaded_mainloop_signal(data->mainloop, 0);
}

Expand Down

0 comments on commit 21d8cce

Please sign in to comment.