summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/memblockq.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2007-07-25 14:46:40 +0000
committerLennart Poettering <lennart@poettering.net>2007-07-25 14:46:40 +0000
commit068f5d5eef1cab3615f9899e0e458d59e54e95a2 (patch)
treeb8ad9fd7fac81028220bf3cb561f7f8a85d2e994 /src/pulsecore/memblockq.h
parent9cc20b46b7f8eba94f52a563e7781aff90274bef (diff)
drop chunk argument from various drop() functions, since it doesn't make any sense if we want to guarantee always monotonously increasing read pointers; a couple of other fixes
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1529 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/pulsecore/memblockq.h')
-rw-r--r--src/pulsecore/memblockq.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/pulsecore/memblockq.h b/src/pulsecore/memblockq.h
index e8243568..5eb23aac 100644
--- a/src/pulsecore/memblockq.h
+++ b/src/pulsecore/memblockq.h
@@ -83,13 +83,16 @@ int pa_memblockq_push(pa_memblockq* bq, const pa_memchunk *chunk);
* you know what you do. */
int pa_memblockq_push_align(pa_memblockq* bq, const pa_memchunk *chunk);
-/* Return a copy of the next memory chunk in the queue. It is not removed from the queue */
+/* Return a copy of the next memory chunk in the queue. It is not
+ * removed from the queue. There are two reasons this function might
+ * fail: 1. prebuffering is active, 2. queue is empty and no silence
+ * memblock was passed at initialization. If the queue is not empty,
+ * but we're currently at a hole in the queue and no silence memblock
+ * was passed we return the length of the hole in chunk->length. */
int pa_memblockq_peek(pa_memblockq* bq, pa_memchunk *chunk);
-/* Drop the specified bytes from the queue, but only if the first
- * chunk in the queue matches the one passed here. If NULL is passed,
- * this check isn't done. */
-void pa_memblockq_drop(pa_memblockq *bq, const pa_memchunk *chunk, size_t length);
+/* Drop the specified bytes from the queue. */
+void pa_memblockq_drop(pa_memblockq *bq, size_t length);
/* Test if the pa_memblockq is currently readable, that is, more data than base */
int pa_memblockq_is_readable(pa_memblockq *bq);