diff options
author | Max Kellermann <max@duempel.org> | 2008-04-12 04:12:42 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-04-12 04:12:42 +0000 |
commit | e626028b41a957d969b93f2d3cb39813eebaac2b (patch) | |
tree | 8cdc984c07644ec30594e50276cf2ddf708ad976 /src/outputBuffer.h | |
parent | a5464282639e46550f3120126d0ba877dd91a44b (diff) | |
download | mpd-e626028b41a957d969b93f2d3cb39813eebaac2b.tar.gz mpd-e626028b41a957d969b93f2d3cb39813eebaac2b.tar.xz mpd-e626028b41a957d969b93f2d3cb39813eebaac2b.zip |
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
Diffstat (limited to '')
-rw-r--r-- | src/outputBuffer.h | 6 |
1 files changed, 6 insertions, 0 deletions
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, |