summaryrefslogtreecommitdiffstats
path: root/src/tests/memblockq-test.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2008-04-20 20:16:55 +0000
committerLennart Poettering <lennart@poettering.net>2008-04-20 20:16:55 +0000
commit62e7bc17c41c5542779a3c395a9d47d2bd306de2 (patch)
tree4445167f4164a8af45438519fee8202c14a35892 /src/tests/memblockq-test.c
parent7556ef5bfc37c99064d95857626bcf9f20423c70 (diff)
Big pile of dependant changes:
* Change pa_memblockq to carry silence memchunk instead of memblock and adapt all users * Add new call pa_sink_input_get_silence() to get the suitable silence block for a sink input * Implement monitoring sources properly by adding a delay queue to even out rewinds * Remove pa_{sink|source}_ping() becaused unnecessary these days and not used * Fix naming of various rewind related functions. Downstream is now _request_rewind(), upstream is _process_rewind() * Fix volume adjustments for a single stream in pa_sink_render() * Properly handle prebuf-style buffer underruns in pa_sink_input * Don't allow rewinding to more than the last underrun * Rework default buffering metrics selection for native protocol * New functions pa_memblockq_prebuf_active(), pa_memblockq_silence() * add option "mixer_reset=" to module-alsa-sink * Other cleanups git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2283 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/tests/memblockq-test.c')
-rw-r--r--src/tests/memblockq-test.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/tests/memblockq-test.c b/src/tests/memblockq-test.c
index 402c8579..3fa8d79f 100644
--- a/src/tests/memblockq-test.c
+++ b/src/tests/memblockq-test.c
@@ -61,16 +61,18 @@ int main(int argc, char *argv[]) {
pa_mempool *p;
pa_memblockq *bq;
pa_memchunk chunk1, chunk2, chunk3, chunk4;
- pa_memblock *silence;
+ pa_memchunk silence;
pa_log_set_maximal_level(PA_LOG_DEBUG);
p = pa_mempool_new(0);
- silence = pa_memblock_new_fixed(p, (char*) "__", 2, 1);
- assert(silence);
+ silence.memblock = pa_memblock_new_fixed(p, (char*) "__", 2, 1);
+ assert(silence.memblock);
+ silence.index = 0;
+ silence.length = pa_memblock_get_length(silence.memblock);
- bq = pa_memblockq_new(0, 40, 10, 2, 4, 4, 40, silence);
+ bq = pa_memblockq_new(0, 40, 10, 2, 4, 4, 40, &silence);
assert(bq);
chunk1.memblock = pa_memblock_new_fixed(p, (char*) "11", 2, 1);
@@ -152,7 +154,7 @@ int main(int argc, char *argv[]) {
dump(bq);
pa_memblockq_free(bq);
- pa_memblock_unref(silence);
+ pa_memblock_unref(silence.memblock);
pa_memblock_unref(chunk1.memblock);
pa_memblock_unref(chunk2.memblock);
pa_memblock_unref(chunk3.memblock);