MCPcopy Create free account
hub / github.com/MusicPlayerDaemon/MPD / OnServerLayoutChanged

Method OnServerLayoutChanged

src/output/plugins/PulseOutputPlugin.cxx:328–345  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

326}
327
328inline void
329PulseOutput::OnServerLayoutChanged(pa_subscription_event_type_t t,
330 uint32_t idx)
331{
332 auto facility =
333 pa_subscription_event_type_t(t & PA_SUBSCRIPTION_EVENT_FACILITY_MASK);
334 auto type =
335 pa_subscription_event_type_t(t & PA_SUBSCRIPTION_EVENT_TYPE_MASK);
336
337 if (mixer != nullptr &&
338 facility == PA_SUBSCRIPTION_EVENT_SINK_INPUT &&
339 stream != nullptr &&
340 pa_stream_get_state(stream) == PA_STREAM_READY &&
341 idx == pa_stream_get_index(stream) &&
342 (type == PA_SUBSCRIPTION_EVENT_NEW ||
343 type == PA_SUBSCRIPTION_EVENT_CHANGE))
344 pulse_mixer_on_change(*mixer, context, stream);
345}
346
347static void
348pulse_output_subscribe_cb([[maybe_unused]] pa_context *context,

Callers 1

Calls 1

pulse_mixer_on_changeFunction · 0.85

Tested by

no test coverage detected