mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-10 13:29:58 -05:00
memblockq: remove pa_memblockq_missing()
The function isn't used anywhere else than memblockq-test. Also, the
function is confusing, because it defines "missing" differently than
pa_memblockq_pop_missing(). pa_memblockq_missing() calculated the
missing amount like this:
missing = tlength - length,
where "length" is the current queue length. pa_memblockq_pop_missing(),
on the other hand, calculates the missing amount like this:
missing = tlength - length - requested,
where "requested" is an internal variable that keeps track of how much
the server has requested data from the client and how much of the
requests are yet to be fulfilled by the client.
memblockq-test is broken at the moment, because it assumes that
pa_memblockq_pop_missing() calculates "missing" the same way that
pa_memblockq_missing() used to calculate it. A patch for fixing that
will follow.
This commit is contained in:
parent
11946a5be0
commit
8e9f070747
3 changed files with 2 additions and 37 deletions
|
|
@ -680,18 +680,6 @@ size_t pa_memblockq_get_length(pa_memblockq *bq) {
|
|||
return (size_t) (bq->write_index - bq->read_index);
|
||||
}
|
||||
|
||||
size_t pa_memblockq_missing(pa_memblockq *bq) {
|
||||
size_t l;
|
||||
pa_assert(bq);
|
||||
|
||||
if ((l = pa_memblockq_get_length(bq)) >= bq->tlength)
|
||||
return 0;
|
||||
|
||||
l = bq->tlength - l;
|
||||
|
||||
return l >= bq->minreq ? l : 0;
|
||||
}
|
||||
|
||||
void pa_memblockq_seek(pa_memblockq *bq, int64_t offset, pa_seek_mode_t seek, bool account) {
|
||||
int64_t old;
|
||||
pa_assert(bq);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue