[pulseaudio-discuss] sink-input's membockq's read-index rewound to a huge negative causing silence delay, almost 2~3 seconds

xing wang wangxingchao2011 at gmail.com
Thu Jun 9 02:42:39 PDT 2011


hi all,

i've a finding about silence delay, the background is looking like
this post : "[pulseaudio-discuss] [PATCH] core: Drop empty gaps in the
memblockq when playing data from it."
(http://www.mail-archive.com/pulseaudio-discuss@mail.0pointer.de/msg09579.html)

with tsched=1 and using default 2s buffer size,,while alsa-driver
provides a even bigger buffer(5s),after the first rewind of "latency
change" before starting playback, the buffer had been shrinked to a
smaller value according to app's request, this trigger sink-input's
rewinding , read-index become a negative value,,nearly -buffer_size.

in pa_sink_input_cb() , pa_memblockq_peek() will return silence before
the readindex reach 0 from the negative value. that caused obvious
delay.

i had one idea to disable alsa-sink's first rewind request of "latency
change" , to avoid  sink-input's read-index moved back, but seems
still delay...so a bit confused.

Thanks
--xingchao


More information about the pulseaudio-discuss mailing list