[pulseaudio-discuss] [PATCH v1 1/2] loopback: Cork sink-input if source is suspended

Tanu Kaskinen tanuk at iki.fi
Wed Sep 19 10:56:12 PDT 2012


On Thu, 2012-09-13 at 14:49 +0200, Mikel Astiz wrote:
> @@ -902,6 +914,9 @@ int pa__init(pa_module *m) {
>      pa_sink_input_put(u->sink_input);
>      pa_source_output_put(u->source_output);
>  
> +    if (pa_source_get_state(u->source_output->source) == PA_SOURCE_SUSPENDED)
> +	    pa_sink_input_cork(u->sink_input, TRUE);

I think the sink input should be created in corked state instead of
corking it right after it has been started. Probably not a big
difference in practice, but it would be a bit cleaner... Currently
there's no good way to do it, though. I think a new flag needs to be
added: PA_SINK_INPUT_START_CORKED_ON_SUSPEND.

Also, it would be nice to stop the rate adjustment timer when there's no
audio flowing. If you don't want to write that patch, I can do it too.

-- 
Tanu



More information about the pulseaudio-discuss mailing list