Commit 2bd2957a authored by Max Kellermann's avatar Max Kellermann Committed by Eric Wong

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
parent f7e97c9a
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment