summaryrefslogtreecommitdiff
path: root/apps/dsp.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2007-02-28 17:32:31 +0000
committerMichael Sevakis <jethead71@rockbox.org>2007-02-28 17:32:31 +0000
commitab66955664f8987d064247dc6d585b5618745d29 (patch)
tree18f1b5a0f60b4ae4a207885673a4099a43dbe1b0 /apps/dsp.c
parent50b5ee4781a44234b4ea5dccf3be6ae5ec9fd324 (diff)
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
Diffstat (limited to 'apps/dsp.c')
-rw-r--r--apps/dsp.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/apps/dsp.c b/apps/dsp.c
index 199e24e170..ca494e553f 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;
}