From ab66955664f8987d064247dc6d585b5618745d29 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Wed, 28 Feb 2007 17:32:31 +0000 Subject: 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 199e24e..ca494e5 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; } -- cgit v1.1