aboutsummaryrefslogtreecommitdiffstats
path: root/src/outputBuffer.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-04-12 04:11:41 +0000
committerEric Wong <normalperson@yhbt.net>2008-04-12 04:11:41 +0000
commita7b19012d309ae0c32562a18e416ac2f961eea95 (patch)
treecd76850ea77047e7626d3669df0362a7052b27f2 /src/outputBuffer.h
parent0defe87da7a030da1914e44d1d2ad4d837cd89be (diff)
downloadmpd-a7b19012d309ae0c32562a18e416ac2f961eea95.tar.gz
mpd-a7b19012d309ae0c32562a18e416ac2f961eea95.tar.xz
mpd-a7b19012d309ae0c32562a18e416ac2f961eea95.zip
add method availableOutputBuffer()
The method availableOutputBuffer() calculates how many chunks are in use. This simplifies code which needs this information, and it can run without knowing OutputBuffer internals. The function knows how to calculate this when begin>end; this might have been a bug in decodeParent(), which does not. git-svn-id: https://svn.musicpd.org/mpd/trunk@7250 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/outputBuffer.h')
-rw-r--r--src/outputBuffer.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/outputBuffer.h b/src/outputBuffer.h
index 4d480e08a..08124dffa 100644
--- a/src/outputBuffer.h
+++ b/src/outputBuffer.h
@@ -55,6 +55,9 @@ void clearOutputBuffer(OutputBuffer * cb);
void flushOutputBuffer(OutputBuffer * cb);
+/** determine the number of decoded chunks */
+unsigned availableOutputBuffer(const OutputBuffer * cb);
+
/* we send inStream for buffering the inputStream while waiting to
send the next chunk */
int sendDataToOutputBuffer(OutputBuffer * cb,