sink: move streams to new appeared sinks if they prefer these sinks

When a new sink appears, all streams that have their preferred_sink
set to the new sink should be moved to the new sink.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
This commit is contained in:
Hui Wang 2019-01-16 12:10:38 +08:00
parent 40d92e9b1a
commit b886836630
4 changed files with 35 additions and 53 deletions

View file

@ -730,6 +730,8 @@ void pa_sink_put(pa_sink* s) {
* the default sink might change twice, causing unnecessary stream moving. */
pa_core_update_default_sink(s->core);
pa_core_move_streams_to_newly_available_preferred_sink(s->core, s);
}
/* Called from main context */