From b220b8c56d3b09bfa92b7d787442ab86a9a0e75e Mon Sep 17 00:00:00 2001 From: jethead71 Date: Wed, 28 Feb 2007 17:32:31 +0000 Subject: [PATCH] SWCODEC: Patchup the short crossfade glitching reported for FLAC but seemed not limited to FLAC actually. Crossfade doesn't like being hand the larger chunks that the dsp was now able to process when not resampling. The real fix is making it not matter. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12521 a1c6a512-1295-4272-9138-f99709370657 --- apps/dsp.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/dsp.c b/apps/dsp.c index 199e24e17..ca494e553 100644 --- a/apps/dsp.c +++ b/apps/dsp.c @@ -1175,16 +1175,16 @@ int dsp_output_count(int count) { count = (int)(((unsigned long)count * NATIVE_FREQUENCY + (dsp->frequency - 1)) / dsp->frequency); - - /* Now we have the resampled sample count which must not exceed - * RESAMPLE_BUF_COUNT/2 to avoid resample buffer overflow. One - * must call dsp_input_count() to get the correct input sample - * count. - */ - if (count > RESAMPLE_BUF_COUNT/2) - count = RESAMPLE_BUF_COUNT/2; } + /* Now we have the resampled sample count which must not exceed + * RESAMPLE_BUF_COUNT/2 to avoid resample buffer overflow. One + * must call dsp_input_count() to get the correct input sample + * count. + */ + if (count > RESAMPLE_BUF_COUNT/2) + count = RESAMPLE_BUF_COUNT/2; + return count; } -- 2.11.4.GIT