mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -05:00
core: move source-outputs conditionally when update default_source
When the default source changes, the streams from the old default source should be moved to the new default source, unless the preferred_source string is set to the old default source and the active port of the old default source is not unavailable Signed-off-by: Hui Wang <hui.wang@canonical.com>
This commit is contained in:
parent
70bbbcdc84
commit
c254f8405c
4 changed files with 47 additions and 25 deletions
|
|
@ -435,6 +435,10 @@ void pa_core_update_default_source(pa_core *core) {
|
|||
old_default_source ? old_default_source->name : "(unset)", best ? best->name : "(unset)");
|
||||
pa_subscription_post(core, PA_SUBSCRIPTION_EVENT_SERVER | PA_SUBSCRIPTION_EVENT_CHANGE, PA_INVALID_INDEX);
|
||||
pa_hook_fire(&core->hooks[PA_CORE_HOOK_DEFAULT_SOURCE_CHANGED], core->default_source);
|
||||
|
||||
/* try to move the streams from old_default_source to the new default_source conditionally */
|
||||
if (old_default_source)
|
||||
pa_source_move_streams_to_default_source(core, old_default_source);
|
||||
}
|
||||
|
||||
void pa_core_set_exit_idle_time(pa_core *core, int time) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue