yet more unsigned integers

calculateCrossFadeChunks() still returns int, although the caller uses
it as an unsigned value.  Since the function body checks for negative
values, it is safe to cast to unsigned.

crossFade() takes signed parameters, although it callers pass unsigned
integers.  Change declaration to unsigned.

git-svn-id: https://svn.musicpd.org/mpd/trunk@7291 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
Max Kellermann 2008-04-12 04:15:35 +00:00 committed by Eric Wong
parent f7e97c9a89
commit 2bd2957a7a

View File

@ -76,8 +76,8 @@ static void quitDecode(PlayerControl * pc, DecoderControl * dc)
wakeup_main_task();
}
static int calculateCrossFadeChunks(PlayerControl * pc, AudioFormat * af,
float totalTime)
static unsigned calculateCrossFadeChunks(PlayerControl * pc, AudioFormat * af,
float totalTime)
{
long chunks;
@ -95,7 +95,7 @@ static int calculateCrossFadeChunks(PlayerControl * pc, AudioFormat * af,
if (chunks < 0)
chunks = 0;
return (int)chunks;
return (unsigned)chunks;
}
static int waitOnDecode(PlayerControl * pc, DecoderControl * dc,
@ -365,7 +365,7 @@ static void advanceOutputBufferTo(OutputBuffer * cb, int to)
static void crossFade(OutputBufferChunk * a, OutputBufferChunk * b,
AudioFormat * format,
int fadePosition, int crossFadeChunks)
unsigned int fadePosition, unsigned int crossFadeChunks)
{
pcm_mix(a->data,
b->data,