mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-06 13:29:56 -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
|
|
@ -76,6 +76,11 @@ int main(int argc, char *argv[]) {
|
|||
pa_memblockq *bq;
|
||||
pa_memchunk chunk1, chunk2, chunk3, chunk4;
|
||||
pa_memchunk silence;
|
||||
pa_sample_spec ss = {
|
||||
.format = PA_SAMPLE_S16LE,
|
||||
.rate = 48000,
|
||||
.channels = 1
|
||||
};
|
||||
|
||||
pa_log_set_level(PA_LOG_DEBUG);
|
||||
|
||||
|
|
@ -86,7 +91,7 @@ int main(int argc, char *argv[]) {
|
|||
silence.index = 0;
|
||||
silence.length = pa_memblock_get_length(silence.memblock);
|
||||
|
||||
bq = pa_memblockq_new(0, 200, 10, 2, 4, 4, 40, &silence);
|
||||
bq = pa_memblockq_new("test memblockq", 0, 200, 10, &ss, 4, 4, 40, &silence);
|
||||
assert(bq);
|
||||
|
||||
chunk1.memblock = pa_memblock_new_fixed(p, (char*) "11", 2, 1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue