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

Method OnStreamStateChanged

src/output/plugins/PulseOutputPlugin.cxx:532–560  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

530}
531
532inline void
533PulseOutput::OnStreamStateChanged(pa_stream *_stream,
534 pa_stream_state_t new_state)
535{
536 assert(_stream == stream || stream == nullptr);
537 assert(mainloop != nullptr);
538 assert(context != nullptr);
539
540 switch (new_state) {
541 case PA_STREAM_READY:
542 if (mixer != nullptr)
543 pulse_mixer_on_change(*mixer, context, _stream);
544
545 Signal();
546 break;
547
548 case PA_STREAM_FAILED:
549 case PA_STREAM_TERMINATED:
550 if (mixer != nullptr)
551 pulse_mixer_on_disconnect(*mixer);
552
553 Signal();
554 break;
555
556 case PA_STREAM_UNCONNECTED:
557 case PA_STREAM_CREATING:
558 break;
559 }
560}
561
562static void
563pulse_output_stream_state_cb(pa_stream *stream, void *userdata)

Callers 1

Calls 2

pulse_mixer_on_changeFunction · 0.85

Tested by

no test coverage detected