| 326 | } |
| 327 | |
| 328 | inline void |
| 329 | PulseOutput::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 | |
| 347 | static void |
| 348 | pulse_output_subscribe_cb([[maybe_unused]] pa_context *context, |
no test coverage detected