<div dir="ltr">Hi Arun,<div><br></div><div>I'm having an issue where the drift compensation timer event isn't restarting when the sink/source state changes to RUNNING.<br><br>Some information about my set up: I'm using a usb microphone, my speakers are plugged into a usb sound card, and I'm running Arch Linux. The application that I'm using the echo cancel source/sink with is Mumble.<br>
<br>Implementing the above patch fixed it, but now that you mention the state change callbacks (to be quite honest I didn't look into those at first, I'm fairly new to pulseaudio), I'll debug it more this week to see what's going on.<br>
<br>I'm not quite sure what to say when it comes to steps to reproduce. It's a persistent problem I'm having. Start pulseaudio, load the echo cancel module, start Mumble with the echo cancel source/sink set to default. I threw a pa_log_debug into time_callback, and when I check my pulseaudio log, I only see that debug info once, when the source/sink is first created.<br>
<br>Thanks for the response,</div><div>Robert</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Aug 1, 2014 at 11:39 PM, Arun Raghavan <span dir="ltr"><<a href="mailto:arun@accosted.net" target="_blank">arun@accosted.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Robert,<br>
Thanks for the patch.<br>
<div class=""><br>
On 2 August 2014 05:43, Robert Kolchmeyer <<a href="mailto:robert.kolchmeyer@gmail.com">robert.kolchmeyer@gmail.com</a>> wrote:<br>
> The drift compensation timer event now restarts even if the source/sink<br>
> becomes inactive. This allows the drift compensation to work correctly<br>
> when the source/sink becomes active again.<br>
> ---<br>
>  src/modules/echo-cancel/module-echo-cancel.c | 4 +++-<br>
>  1 file changed, 3 insertions(+), 1 deletion(-)<br>
><br>
> diff --git a/src/modules/echo-cancel/module-echo-cancel.c b/src/modules/echo-cancel/module-echo-cancel.c<br>
> index 9df2899..bba6a2e 100644<br>
> --- a/src/modules/echo-cancel/module-echo-cancel.c<br>
> +++ b/src/modules/echo-cancel/module-echo-cancel.c<br>
> @@ -346,8 +346,10 @@ static void time_callback(pa_mainloop_api *a, pa_time_event *e, const struct tim<br>
>      pa_assert(u->time_event == e);<br>
>      pa_assert_ctl_context();<br>
><br>
> -    if (!IS_ACTIVE(u))<br>
> +    if (!IS_ACTIVE(u)){<br>
> +        pa_core_rttime_restart(u->core, u->time_event, pa_rtclock_now() + u->adjust_time);<br>
>          return;<br>
> +    }<br>
<br>
</div>The timer is already restarted when the sink or source state changes<br>
to RUNNING (see the state change callbacks a little later on), so this<br>
patch should effectively be a no-op.<br>
<br>
Could you describe the problem you're seeing and possibly steps to reproduce it?<br>
<br>
Cheers,<br>
Arun<br>
_______________________________________________<br>
pulseaudio-discuss mailing list<br>
<a href="mailto:pulseaudio-discuss@lists.freedesktop.org">pulseaudio-discuss@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss" target="_blank">http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss</a><br>
</blockquote></div><br></div>