[pulseaudio-discuss] [PATCH v2] tunnel-sink-new: Limit the maximum latency to 200 ms

Alexander E. Patrakov patrakov at gmail.com
Tue Oct 7 12:16:46 PDT 2014


07.10.2014 19:55, Tanu Kaskinen wrote:
> The default maximum latency is 10 seconds, which is not good,
> especially since the tunnel sink doesn't support rewinding. Due to the
> lack of rewinding, e.g. volume changes take a long time with large
> latencies.

ACK in principle, but this limit for the maximum non-rewindable latency 
should come from a single source and should not be defined anew for each 
non-rewindable sink. And maybe it needs to be configurable from daemon.conf.

IMHO the patch can be applied now in its current form, and the changes 
suggested above can go into a separate commit.

> ---
> Changes in v2: removed the Change-Id from the commit message.
>
>
>   src/modules/module-tunnel-sink-new.c | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/src/modules/module-tunnel-sink-new.c b/src/modules/module-tunnel-sink-new.c
> index c74a7c1..2a91be9 100644
> --- a/src/modules/module-tunnel-sink-new.c
> +++ b/src/modules/module-tunnel-sink-new.c
> @@ -60,6 +60,7 @@ PA_MODULE_USAGE(
>           "cookie=<cookie file path>"
>           );
>   
> +#define MAX_LATENCY_USEC (200 * PA_USEC_PER_MSEC)
>   #define TUNNEL_THREAD_FAILED_MAINLOOP 1
>   
>   static void stream_state_cb(pa_stream *stream, void *userdata);
> @@ -525,6 +526,7 @@ int pa__init(pa_module *m) {
>       u->sink->userdata = u;
>       u->sink->parent.process_msg = sink_process_msg_cb;
>       u->sink->update_requested_latency = sink_update_requested_latency_cb;
> +    pa_sink_set_latency_range(u->sink, 0, MAX_LATENCY_USEC);
>   
>       /* set thread message queue */
>       pa_sink_set_asyncmsgq(u->sink, u->thread_mq->inq);



More information about the pulseaudio-discuss mailing list