From: Lennart Poettering Date: Thu, 15 May 2008 17:57:52 +0000 (+0000) Subject: add pa_memblockq_get_nblocks() X-Git-Tag: submit/2.0-panda/20130828.192557~2837^2^2~21 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=103ceaa94488516b0ce0f7b2d428348469db43ce;p=profile%2Fivi%2Fpulseaudio-panda.git add pa_memblockq_get_nblocks() git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2423 fefdeb5f-60dc-0310-8127-8f9354f1896f --- diff --git a/src/pulsecore/memblockq.c b/src/pulsecore/memblockq.c index 13eb110..c047e56 100644 --- a/src/pulsecore/memblockq.c +++ b/src/pulsecore/memblockq.c @@ -902,3 +902,9 @@ void pa_memblockq_silence(pa_memblockq *bq) { pa_assert(bq->n_blocks == 0); } + +unsigned pa_memblockq_get_nblocks(pa_memblockq *bq) { + pa_assert(bq); + + return bq->n_blocks; +} diff --git a/src/pulsecore/memblockq.h b/src/pulsecore/memblockq.h index a6065de..7c38757 100644 --- a/src/pulsecore/memblockq.h +++ b/src/pulsecore/memblockq.h @@ -167,4 +167,6 @@ void pa_memblockq_silence(pa_memblockq *bq); /* Check whether we currently are in prebuf state */ pa_bool_t pa_memblockq_prebuf_active(pa_memblockq *bq); +unsigned pa_memblockq_get_nblocks(pa_memblockq *bq); + #endif