Make crossfade less twitchy about buffer level

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9799 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Brandon Low 2006-04-25 15:06:55 +00:00
parent 9602dd7e60
commit 1f4a63441a

View file

@ -700,10 +700,13 @@ static void flush_crossfade(char *buf, size_t length)
else if (!crossfade_fade_in_rem)
crossfade_active = false;
/* Flush samples to the buffer */
while (!prepare_insert(length))
sleep(1);
pcmbuf_flush_buffer(buf, length);
if (length)
{
/* Flush samples to the buffer */
while (!prepare_insert(length))
sleep(1);
pcmbuf_flush_buffer(buf, length);
}
}
}