projects
/
profile
/
ivi
/
pulseaudio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b28c6e9
)
limit the prebuf value by tlength
author
Lennart Poettering
<lennart@poettering.net>
Tue, 17 Jun 2008 20:07:51 +0000
(20:07 +0000)
committer
Lennart Poettering
<lennart@poettering.net>
Tue, 17 Jun 2008 20:07:51 +0000
(20:07 +0000)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2547
fefdeb5f
-60dc-0310-8127-
8f9354f1896f
src/pulsecore/memblockq.c
patch
|
blob
|
history
diff --git
a/src/pulsecore/memblockq.c
b/src/pulsecore/memblockq.c
index
e058765
..
9156fc0
100644
(file)
--- a/
src/pulsecore/memblockq.c
+++ b/
src/pulsecore/memblockq.c
@@
-786,6
+786,9
@@
void pa_memblockq_set_tlength(pa_memblockq *bq, size_t tlength) {
if (bq->tlength > bq->maxlength)
bq->tlength = bq->maxlength;
+ if (bq->prebuf > bq->tlength)
+ pa_memblockq_set_prebuf(bq, bq->tlength);
+
if (bq->minreq > bq->tlength)
pa_memblockq_set_minreq(bq, bq->tlength);
@@
-803,8
+806,8
@@
void pa_memblockq_set_prebuf(pa_memblockq *bq, size_t prebuf) {
if (prebuf > 0 && bq->prebuf < bq->base)
bq->prebuf = bq->base;
- if (bq->prebuf > bq->
max
length)
- bq->prebuf = bq->
max
length;
+ if (bq->prebuf > bq->
t
length)
+ bq->prebuf = bq->
t
length;
if (bq->prebuf <= 0 || pa_memblockq_get_length(bq) >= bq->prebuf)
bq->in_prebuf = FALSE;