mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-12-22 08:56:52 -05:00
make suspend state of monitor source follow the suspend state of the sink it belongs to
This commit is contained in:
parent
bffa8be8cd
commit
ecbc320a4c
3 changed files with 23 additions and 0 deletions
|
|
@ -433,6 +433,24 @@ int pa_source_suspend(pa_source *s, pa_bool_t suspend) {
|
|||
return source_set_state(s, pa_source_used_by(s) ? PA_SOURCE_RUNNING : PA_SOURCE_IDLE);
|
||||
}
|
||||
|
||||
/* Called from main context */
|
||||
int pa_source_sync_suspend(pa_source *s) {
|
||||
pa_sink_state_t state;
|
||||
|
||||
pa_source_assert_ref(s);
|
||||
pa_assert(PA_SOURCE_IS_LINKED(s->state));
|
||||
pa_assert(s->monitor_of);
|
||||
|
||||
state = pa_sink_get_state(s->monitor_of);
|
||||
|
||||
if (state == PA_SINK_SUSPENDED)
|
||||
return source_set_state(s, PA_SOURCE_SUSPENDED);
|
||||
|
||||
pa_assert(PA_SINK_IS_OPENED(state));
|
||||
|
||||
return source_set_state(s, pa_source_used_by(s) ? PA_SOURCE_RUNNING : PA_SOURCE_IDLE);
|
||||
}
|
||||
|
||||
/* Called from main context */
|
||||
pa_queue *pa_source_move_all_start(pa_source *s) {
|
||||
pa_queue *q;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue