aboutsummaryrefslogtreecommitdiffstats
path: root/src/outputBuffer.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-04-12 04:13:11 +0000
committerEric Wong <normalperson@yhbt.net>2008-04-12 04:13:11 +0000
commit7a6c31ae069bb86e201d09525ef00ec265ca00f3 (patch)
treea8e648788f1034fc282f96ad654121d72a19cc31 /src/outputBuffer.c
parent71b24e095002267e6369eeae21c5139037fb0e93 (diff)
downloadmpd-7a6c31ae069bb86e201d09525ef00ec265ca00f3.tar.gz
mpd-7a6c31ae069bb86e201d09525ef00ec265ca00f3.tar.xz
mpd-7a6c31ae069bb86e201d09525ef00ec265ca00f3.zip
added outputBufferChunkData()
Hiding OutputBuffer internals, again. We get an extra assertion in return. git-svn-id: https://svn.musicpd.org/mpd/trunk@7267 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/outputBuffer.c')
-rw-r--r--src/outputBuffer.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/outputBuffer.c b/src/outputBuffer.c
index aadd5e379..157e36374 100644
--- a/src/outputBuffer.c
+++ b/src/outputBuffer.c
@@ -92,6 +92,13 @@ int outputBufferAbsolute(const OutputBuffer * cb, unsigned relative)
return (int)i;
}
+char * outputBufferChunkData(const OutputBuffer * cb, unsigned i)
+{
+ assert(i < buffered_chunks);
+
+ return cb->chunks + i * CHUNK_SIZE;
+}
+
/**
* Return the tail chunk has room for additional data. If there is no
* room in the queue, this function blocks until the player thread has