summaryrefslogtreecommitdiff
path: root/apps/dsp.c
diff options
context:
space:
mode:
authorThom Johansen <thomj@rockbox.org>2008-04-08 21:44:07 +0000
committerThom Johansen <thomj@rockbox.org>2008-04-08 21:44:07 +0000
commit18fc7fd6548981e5e033b07470c0b65d907a0684 (patch)
tree87060036143aa6a57c7401c9f77360800b69108d /apps/dsp.c
parent2fee08aff39e1e095006448427fc8ebc529e2d62 (diff)
downloadrockbox-18fc7fd6548981e5e033b07470c0b65d907a0684.zip
rockbox-18fc7fd6548981e5e033b07470c0b65d907a0684.tar.gz
rockbox-18fc7fd6548981e5e033b07470c0b65d907a0684.tar.bz2
rockbox-18fc7fd6548981e5e033b07470c0b65d907a0684.tar.xz
Remove FRACMUL_8_LOOP macro. This only benefited Coldfire, and we have assembler routines for the gain function there now.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17040 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/dsp.c')
-rw-r--r--apps/dsp.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/apps/dsp.c b/apps/dsp.c
index faa08ed..5b90b7c 100644
--- a/apps/dsp.c
+++ b/apps/dsp.c
@@ -794,22 +794,16 @@ void dsp_set_crossfeed_cross_params(long lf_gain, long hf_gain, long cutoff)
static void dsp_apply_gain(int count, struct dsp_data *data, int32_t *buf[])
{
const int32_t gain = data->gain;
- int ch = data->num_channels - 1;
+ int ch;
- do
+ for (ch = 0; ch < data->num_channels; ch++)
{
- int32_t *s = buf[ch];
int32_t *d = buf[ch];
- int32_t samp = *s++;
- int i = 0;
+ int i;
- do
- {
- FRACMUL_8_LOOP(samp, gain, s, d);
- }
- while (++i < count);
+ for (i = 0; i < count; i++)
+ d[i] = FRACMUL_SHL(d[i], gain, 8);
}
- while (--ch >= 0);
}
#endif /* DSP_HAVE_ASM_APPLY_GAIN */