mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-11 13:30:02 -05:00
simple: Change latency estimation to account for already-read data in pa_simple_get_latency().
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=81075
This commit is contained in:
parent
e7d7b29c17
commit
b0cd94233a
1 changed files with 1 additions and 1 deletions
|
|
@ -466,7 +466,7 @@ pa_usec_t pa_simple_get_latency(pa_simple *p, int *rerror) {
|
||||||
pa_usec_t extra = 0;
|
pa_usec_t extra = 0;
|
||||||
|
|
||||||
if (p->direction == PA_STREAM_RECORD)
|
if (p->direction == PA_STREAM_RECORD)
|
||||||
extra = pa_bytes_to_usec(p->read_length, pa_stream_get_sample_spec(p->stream));
|
extra = -pa_bytes_to_usec(p->read_index, pa_stream_get_sample_spec(p->stream));
|
||||||
|
|
||||||
if (negative) {
|
if (negative) {
|
||||||
if (extra > t)
|
if (extra > t)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue