protocol-native: Fix source latency calculation in ADJUST_LATENCY mode
authorArun Raghavan <git@arunraghavan.net>
Mon, 13 Apr 2015 09:23:45 +0000 (14:53 +0530)
committerArun Raghavan <git@arunraghavan.net>
Tue, 12 May 2015 12:49:05 +0000 (19:49 +0700)
commite490a900e236917caf9158bb30546f48075a2bca
tree0fa8ce7c42b2d72df88befac0467bfd45485b4b3
parent7922851152170c1d875d7a59fbdf35043516c156
protocol-native: Fix source latency calculation in ADJUST_LATENCY mode

This fixes buffer attr calculation so that we set the source latency to
the requested latency. This makes sense because the intermediate
delay_memblockq is just a mechanism to send data to the client. It
should not actually add to the total latency over what the source
already provides.

With this, the meaning of fragsize and maxlength become more
meaningful/accurate with regards to ADJUST_LATENCY mode -- fragsize
becomes the latency the source is configured for (which is then
approximately the total latency until the buffer reaches the client).
Maxlength, as before, continues to be the maximum amount of data we
might hold for the client before overrunning.
src/pulsecore/protocol-native.c