mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-08 13:29:59 -05:00
memblockq: Improve debuggability by storing a name and a sample spec.
These are not used for anything at this point, but this makes it easy to add ad-hoc debug prints that show the memblockq name and to convert between bytes and usecs.
This commit is contained in:
parent
4d930f19f9
commit
666261ece8
21 changed files with 89 additions and 46 deletions
|
|
@ -40,6 +40,8 @@ typedef struct pa_memblockq pa_memblockq;
|
|||
|
||||
/* Parameters:
|
||||
|
||||
- name: name for debugging purposes
|
||||
|
||||
- idx: start value for both read and write index
|
||||
|
||||
- maxlength: maximum length of queue. If more data is pushed into
|
||||
|
|
@ -47,9 +49,9 @@ typedef struct pa_memblockq pa_memblockq;
|
|||
|
||||
- tlength: the target length of the queue. Pass 0 for the default.
|
||||
|
||||
- base: a base value for all metrics. Only multiples of this value
|
||||
are popped from the queue or should be pushed into
|
||||
it. Must not be 0.
|
||||
- ss: Sample spec describing the queue contents. Only multiples
|
||||
of the frame size as implied by the sample spec are
|
||||
popped from the queue or should be pushed into it.
|
||||
|
||||
- prebuf: If the queue runs empty wait until this many bytes are in
|
||||
queue again before passing the first byte out. If set
|
||||
|
|
@ -65,10 +67,11 @@ typedef struct pa_memblockq pa_memblockq;
|
|||
- silence: return this memchunk when reading uninitialized data
|
||||
*/
|
||||
pa_memblockq* pa_memblockq_new(
|
||||
const char *name,
|
||||
int64_t idx,
|
||||
size_t maxlength,
|
||||
size_t tlength,
|
||||
size_t base,
|
||||
const pa_sample_spec *sample_spec,
|
||||
size_t prebuf,
|
||||
size_t minreq,
|
||||
size_t maxrewind,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue