diff options
author | Miika Pekkarinen <miipekk@ihme.org> | 2005-06-27 21:12:09 +0000 |
---|---|---|
committer | Miika Pekkarinen <miipekk@ihme.org> | 2005-06-27 21:12:09 +0000 |
commit | 46136596433da25f3d802d72d0d1273a229c9d9f (patch) | |
tree | a5833d1676ff935de6a807d96622131813c32393 /apps/dsp.c | |
parent | c2093538a4028de57cb90bc1094cd8933f938b90 (diff) |
Initializing resampler structure correctly with zeros.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6900 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/dsp.c')
-rw-r--r-- | apps/dsp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/dsp.c b/apps/dsp.c index 963e98da2e..56ebacb24c 100644 --- a/apps/dsp.c +++ b/apps/dsp.c @@ -16,6 +16,7 @@ * KIND, either express or implied. * ****************************************************************************/ +#include <string.h> #include "kernel.h" #include "logf.h" @@ -227,7 +228,7 @@ long upsample(long *out, long *in, int num, struct resampler *s) } #define MAX_CHUNK_SIZE 1024 -static char samplebuf[MAX_CHUNK_SIZE*4]; +static char samplebuf[MAX_CHUNK_SIZE]; /* enough to cope with 11khz upsampling */ long resampled[MAX_CHUNK_SIZE * 4]; @@ -353,6 +354,7 @@ bool dsp_configure(int setting, void *value) { switch (setting) { case DSP_SET_FREQUENCY: + memset(resample, 0, sizeof(resample)); dsp_config.frequency = (int)value; resample[0].delta = resample[1].delta = (unsigned long)value*65536/NATIVE_FREQUENCY; |