mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-12-22 08:56:52 -05:00
core: split of FAIL_ON_SUSPEND into KILL_ON_SUSPEND and NO_CREATE_ON_SUSPEND
This commit is contained in:
parent
e53d2fc6b5
commit
e4db56bf07
8 changed files with 18 additions and 15 deletions
|
|
@ -336,15 +336,14 @@ static int source_set_state(pa_source *s, pa_source_state_t state) {
|
|||
|
||||
/* We're suspending or resuming, tell everyone about it */
|
||||
|
||||
for (o = PA_SOURCE_OUTPUT(pa_idxset_first(s->outputs, &idx)); o; o = PA_SOURCE_OUTPUT(pa_idxset_next(s->outputs, &idx)))
|
||||
PA_IDXSET_FOREACH(o, s->outputs, idx)
|
||||
if (s->state == PA_SOURCE_SUSPENDED &&
|
||||
(o->flags & PA_SOURCE_OUTPUT_FAIL_ON_SUSPEND))
|
||||
(o->flags & PA_SOURCE_OUTPUT_KILL_ON_SUSPEND))
|
||||
pa_source_output_kill(o);
|
||||
else if (o->suspend)
|
||||
o->suspend(o, state == PA_SOURCE_SUSPENDED);
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue