From e626028b41a957d969b93f2d3cb39813eebaac2b Mon Sep 17 00:00:00 2001
From: Max Kellermann <max@duempel.org>
Date: Sat, 12 Apr 2008 04:12:42 +0000
Subject: moved check to outputBufferAbsolute()

decoderParent() uses a lot of OutputBuffer internals to see whether
cross-fading should be started.  Move these checks to outputBuffer.c,
which also simplifies decoderParent().

git-svn-id: https://svn.musicpd.org/mpd/trunk@7262 09075e82-0dd4-0310-85a5-a0d7c8717e4f
---
 src/outputBuffer.h | 6 ++++++
 1 file changed, 6 insertions(+)

(limited to 'src/outputBuffer.h')

diff --git a/src/outputBuffer.h b/src/outputBuffer.h
index 08124dffa..06ec60d19 100644
--- a/src/outputBuffer.h
+++ b/src/outputBuffer.h
@@ -58,6 +58,12 @@ void flushOutputBuffer(OutputBuffer * cb);
 /** determine the number of decoded chunks */
 unsigned availableOutputBuffer(const OutputBuffer * cb);
 
+/**
+ * Get the absolute index of the nth used chunk after the first one.
+ * Returns -1 if there is no such chunk.
+ */
+int outputBufferAbsolute(const OutputBuffer * cb, unsigned relative);
+
 /* we send inStream for buffering the inputStream while waiting to
    send the next chunk */
 int sendDataToOutputBuffer(OutputBuffer * cb,
-- 
cgit v1.2.3