[pulseaudio-discuss] a question about audio synchronization between local sink and tunnel sink

Tanu Kaskinen tanuk at iki.fi
Thu Nov 1 06:06:36 PDT 2012


On Thu, 2012-11-01 at 15:00 +0200, Tanu Kaskinen wrote:
> On Mon, 2012-10-29 at 22:25 +0000, Sun, Xiaodong wrote:
> > 2. Even we can get stable initial sink latency, if new sink's latency
> > is bigger than the other sink's, we use pa_memblockq_drop() to skip
> > some samples in new sink's output memblockq in order to reduce its
> > latency. But if new sink's output memblockq is empty,
> > pa_memblockq_drop() will do nothing since there is no sample to drop
> > at all. Isn't it?
> 
> pa_memblockq_drop() will always move the read index forward (unless
> prebuffering is enabled and active, but module-combine-sink doesn't
> enable prebuffering for the memblockqs that it creates).

Sorry, I didn't check carefully enough. module-combine-sink does enable
prebuffering. I'm not sure why. Maybe the prebuffering could be disabled
(pass 0 instead of 1 as the prebuf parameter of pa_memblockq_new()).

-- 
Tanu



More information about the pulseaudio-discuss mailing list