aboutsummaryrefslogtreecommitdiffstats
path: root/src/decode.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-04-12 04:18:19 +0000
committerEric Wong <normalperson@yhbt.net>2008-04-12 04:18:19 +0000
commit20c4638a2eb28bd66cd4494b706f113f60a2c0e2 (patch)
tree8de8be5b19586b6cd509de8e510b95c39aac33c2 /src/decode.c
parente20b71ed63314d68407b5583e67f2617f916a9e4 (diff)
downloadmpd-20c4638a2eb28bd66cd4494b706f113f60a2c0e2.tar.gz
mpd-20c4638a2eb28bd66cd4494b706f113f60a2c0e2.tar.xz
mpd-20c4638a2eb28bd66cd4494b706f113f60a2c0e2.zip
added output_buffer_skip()
First patch without camelCase ;) output_buffer_skip() lets us eliminate advanceOutputBufferTo(), and removes yet another external OutputBuffer struct access. git-svn-id: https://svn.musicpd.org/mpd/trunk@7312 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/decode.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/decode.c b/src/decode.c
index 6e04a12e9..0dae5a1de 100644
--- a/src/decode.c
+++ b/src/decode.c
@@ -361,11 +361,6 @@ void decoderInit(void)
FATAL("Failed to spawn decoder task: %s\n", strerror(errno));
}
-static void advanceOutputBufferTo(OutputBuffer * cb, int to)
-{
- cb->begin = to;
-}
-
static void crossFade(OutputBufferChunk * a, OutputBufferChunk * b,
AudioFormat * format,
unsigned int fadePosition, unsigned int crossFadeChunks)
@@ -576,9 +571,7 @@ static void decodeParent(PlayerControl * pc, DecoderControl * dc, OutputBuffer *
/* the cross-fade is finished; skip
the section which was cross-faded
(and thus already played) */
- nextChunk = outputBufferAbsolute(cb, crossFadeChunks);
- if (nextChunk >= 0)
- advanceOutputBufferTo(cb, nextChunk);
+ output_buffer_skip(cb, crossFadeChunks);
}
doCrossFade = 0;