[pulseaudio-discuss] [PATCH] echo-cancel: drift compensation timer event now restarts correctly.
Arun Raghavan
arun at accosted.net
Fri Aug 1 20:39:42 PDT 2014
Hi Robert,
Thanks for the patch.
On 2 August 2014 05:43, Robert Kolchmeyer <robert.kolchmeyer at gmail.com> wrote:
> The drift compensation timer event now restarts even if the source/sink
> becomes inactive. This allows the drift compensation to work correctly
> when the source/sink becomes active again.
> ---
> src/modules/echo-cancel/module-echo-cancel.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/modules/echo-cancel/module-echo-cancel.c b/src/modules/echo-cancel/module-echo-cancel.c
> index 9df2899..bba6a2e 100644
> --- a/src/modules/echo-cancel/module-echo-cancel.c
> +++ b/src/modules/echo-cancel/module-echo-cancel.c
> @@ -346,8 +346,10 @@ static void time_callback(pa_mainloop_api *a, pa_time_event *e, const struct tim
> pa_assert(u->time_event == e);
> pa_assert_ctl_context();
>
> - if (!IS_ACTIVE(u))
> + if (!IS_ACTIVE(u)){
> + pa_core_rttime_restart(u->core, u->time_event, pa_rtclock_now() + u->adjust_time);
> return;
> + }
The timer is already restarted when the sink or source state changes
to RUNNING (see the state change callbacks a little later on), so this
patch should effectively be a no-op.
Could you describe the problem you're seeing and possibly steps to reproduce it?
Cheers,
Arun
More information about the pulseaudio-discuss
mailing list