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
|
|
@ -56,7 +56,7 @@ typedef struct pa_memblockq pa_memblockq;
|
|||
if no data is in the queue and will never fail. Pass
|
||||
(size_t) -1 for the default.
|
||||
|
||||
- minreq: pa_memblockq_missing() will only return values greater
|
||||
- minreq: pa_memblockq_pop_missing() will only return values greater
|
||||
than this value. Pass 0 for the default.
|
||||
|
||||
- maxrewind: how many bytes of history to keep in the queue
|
||||
|
|
@ -112,9 +112,6 @@ bool pa_memblockq_is_readable(pa_memblockq *bq);
|
|||
/* Return the length of the queue in bytes */
|
||||
size_t pa_memblockq_get_length(pa_memblockq *bq);
|
||||
|
||||
/* Return how many bytes are missing in queue to the specified fill amount */
|
||||
size_t pa_memblockq_missing(pa_memblockq *bq);
|
||||
|
||||
/* Return the number of bytes that are missing since the last call to
|
||||
* this function, reset the internal counter to 0. */
|
||||
size_t pa_memblockq_pop_missing(pa_memblockq *bq);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue