diff options
| author | Brandon Low <lostlogic@rockbox.org> | 2006-04-25 15:06:55 +0000 |
|---|---|---|
| committer | Brandon Low <lostlogic@rockbox.org> | 2006-04-25 15:06:55 +0000 |
| commit | 1f4a63441ab91c8535f1f37b0a892680a5c0f2d4 (patch) | |
| tree | c051d297c01667a7901f558d6dfa0c3762b06e4d /apps | |
| parent | 9602dd7e60e43bd327701a4e0231c60b797dfbd8 (diff) | |
| download | rockbox-1f4a63441ab91c8535f1f37b0a892680a5c0f2d4.zip rockbox-1f4a63441ab91c8535f1f37b0a892680a5c0f2d4.tar.gz rockbox-1f4a63441ab91c8535f1f37b0a892680a5c0f2d4.tar.bz2 rockbox-1f4a63441ab91c8535f1f37b0a892680a5c0f2d4.tar.xz | |
Make crossfade less twitchy about buffer level
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9799 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
| -rw-r--r-- | apps/pcmbuf.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/apps/pcmbuf.c b/apps/pcmbuf.c index ec3965c..ead104d 100644 --- a/apps/pcmbuf.c +++ b/apps/pcmbuf.c @@ -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); + } } } |