]> code.delx.au - pulseaudio/blob - src/memblockq.h
0a68ddaff4453f94c3261085afbe5dbcfa1ce6ee
[pulseaudio] / src / memblockq.h
1 #ifndef foomemblockqhfoo
2 #define foomemblockqhfoo
3
4 #include <sys/types.h>
5
6 #include "memblock.h"
7
8 struct memblockq;
9
10 struct memblockq* memblockq_new(size_t maxlength, size_t base, size_t prebuf);
11 void memblockq_free(struct memblockq* bq);
12
13 void memblockq_push(struct memblockq* bq, struct memchunk *chunk, size_t delta);
14
15 int memblockq_pop(struct memblockq* bq, struct memchunk *chunk);
16 int memblockq_peek(struct memblockq* bq, struct memchunk *chunk);
17 void memblockq_drop(struct memblockq *bq, size_t length);
18
19 void memblockq_shorten(struct memblockq *bq, size_t length);
20 void memblockq_empty(struct memblockq *bq);
21
22 int memblockq_is_readable(struct memblockq *bq);
23 int memblockq_is_writable(struct memblockq *bq, size_t length);
24
25 uint32_t memblockq_get_delay(struct memblockq *bq);
26 uint32_t memblockq_get_length(struct memblockq *bq);
27
28 #endif