mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-08 13:29:59 -05:00
source-output: change bool save_source to char *preferred_source
The finial objective is to store the preferred source name in the source-output struct, and use module-stream-restore to save and restore it. This patch just replaces the save_source with preferred_source, and tries to keep the original logic. Signed-off-by: Hui Wang <hui.wang@canonical.com>
This commit is contained in:
parent
734a00c849
commit
5eec504d68
6 changed files with 54 additions and 29 deletions
|
|
@ -184,7 +184,7 @@ static pa_hook_result_t source_put_hook_callback(pa_core *c, pa_source *source,
|
|||
}
|
||||
|
||||
PA_IDXSET_FOREACH(o, old_default_source->outputs, idx) {
|
||||
if (o->save_source || !PA_SOURCE_OUTPUT_IS_LINKED(o->state))
|
||||
if (pa_safe_streq(o->source->name, o->preferred_source) || !PA_SOURCE_OUTPUT_IS_LINKED(o->state))
|
||||
continue;
|
||||
|
||||
if (pa_source_output_move_to(o, source, false) < 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue