mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-31 22:25:33 -04:00
combine: Stop rate adjustments if sink is supended
This commit is contained in:
parent
163a7dbe8b
commit
a3b8b6a07e
1 changed files with 8 additions and 1 deletions
|
|
@ -252,7 +252,11 @@ static void time_callback(pa_mainloop_api *a, pa_time_event *e, const struct tim
|
|||
|
||||
adjust_rates(u);
|
||||
|
||||
pa_core_rttime_restart(u->core, e, pa_rtclock_now() + u->adjust_time);
|
||||
if (pa_sink_get_state(u->sink) == PA_SINK_SUSPENDED) {
|
||||
u->core->mainloop->time_free(e);
|
||||
u->time_event = NULL;
|
||||
} else
|
||||
pa_core_rttime_restart(u->core, e, pa_rtclock_now() + u->adjust_time);
|
||||
}
|
||||
|
||||
static void process_render_null(struct userdata *u, pa_usec_t now) {
|
||||
|
|
@ -603,6 +607,9 @@ static void unsuspend(struct userdata *u) {
|
|||
PA_IDXSET_FOREACH(o, u->outputs, idx)
|
||||
output_enable(o);
|
||||
|
||||
if (!u->time_event)
|
||||
u->time_event = pa_core_rttime_new(u->core, pa_rtclock_now() + u->adjust_time, time_callback, u);
|
||||
|
||||
pa_log_info("Resumed successfully...");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue