aboutsummaryrefslogtreecommitdiffstats
path: root/src/decode.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-04-12 04:18:28 +0000
committerEric Wong <normalperson@yhbt.net>2008-04-12 04:18:28 +0000
commit0c46dd68318ea20cb65adae433c3f8793ce73435 (patch)
tree58c231cb4c04e8545538f7d07f3ed0206ef8f06b /src/decode.c
parent20c4638a2eb28bd66cd4494b706f113f60a2c0e2 (diff)
downloadmpd-0c46dd68318ea20cb65adae433c3f8793ce73435.tar.gz
mpd-0c46dd68318ea20cb65adae433c3f8793ce73435.tar.xz
mpd-0c46dd68318ea20cb65adae433c3f8793ce73435.zip
don't use short chunk numbers
Don't be mean with integer sizes. Although we will probably never have more than 32k buffered chunks, we should use 32 bit integers for addressing them. We do not save very much (some of the saved space is eaten by alignment anyway), but we save at least one assembler instruction for converting short to int. This change requires some more explicit casts, because gcc was less picky when comparing short with a full int. git-svn-id: https://svn.musicpd.org/mpd/trunk@7313 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/decode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/decode.c b/src/decode.c
index 0dae5a1de..77488483a 100644
--- a/src/decode.c
+++ b/src/decode.c
@@ -518,7 +518,7 @@ static void decodeParent(PlayerControl * pc, DecoderControl * dc, OutputBuffer *
if (do_pause)
player_sleep();
- else if (!outputBufferEmpty(cb) && cb->begin != next) {
+ else if (!outputBufferEmpty(cb) && (int)cb->begin != next) {
OutputBufferChunk *beginChunk =
outputBufferGetChunk(cb, cb->begin);
unsigned int fadePosition;
@@ -564,7 +564,7 @@ static void decodeParent(PlayerControl * pc, DecoderControl * dc, OutputBuffer *
break;
outputBufferShift(cb);
player_wakeup_decoder_nb();
- } else if (!outputBufferEmpty(cb) && cb->begin == next) {
+ } else if (!outputBufferEmpty(cb) && (int)cb->begin == next) {
/* at the beginning of a new song */
if (doCrossFade == 1 && nextChunk >= 0) {