summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/dsp.c4
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 @@
16 * KIND, either express or implied. 16 * KIND, either express or implied.
17 * 17 *
18 ****************************************************************************/ 18 ****************************************************************************/
19#include <string.h>
19#include "kernel.h" 20#include "kernel.h"
20#include "logf.h" 21#include "logf.h"
21 22
@@ -227,7 +228,7 @@ long upsample(long *out, long *in, int num, struct resampler *s)
227} 228}
228 229
229#define MAX_CHUNK_SIZE 1024 230#define MAX_CHUNK_SIZE 1024
230static char samplebuf[MAX_CHUNK_SIZE*4]; 231static char samplebuf[MAX_CHUNK_SIZE];
231/* enough to cope with 11khz upsampling */ 232/* enough to cope with 11khz upsampling */
232long resampled[MAX_CHUNK_SIZE * 4]; 233long resampled[MAX_CHUNK_SIZE * 4];
233 234
@@ -353,6 +354,7 @@ bool dsp_configure(int setting, void *value)
353{ 354{
354 switch (setting) { 355 switch (setting) {
355 case DSP_SET_FREQUENCY: 356 case DSP_SET_FREQUENCY:
357 memset(resample, 0, sizeof(resample));
356 dsp_config.frequency = (int)value; 358 dsp_config.frequency = (int)value;
357 resample[0].delta = resample[1].delta = 359 resample[0].delta = resample[1].delta =
358 (unsigned long)value*65536/NATIVE_FREQUENCY; 360 (unsigned long)value*65536/NATIVE_FREQUENCY;