diff options
| author | Miika Pekkarinen <miipekk@ihme.org> | 2005-07-16 06:26:29 +0000 |
|---|---|---|
| committer | Miika Pekkarinen <miipekk@ihme.org> | 2005-07-16 06:26:29 +0000 |
| commit | cda55bbd6f301315193adad04fa020d99c2f087d (patch) | |
| tree | d2b6833f5a1d99103dccfd2bc7bb42d0f4769c79 /apps/dsp.c | |
| parent | 2ef8a8722d0719abcb4309d6e09af5f9c3b50e2f (diff) | |
| download | rockbox-cda55bbd6f301315193adad04fa020d99c2f087d.zip rockbox-cda55bbd6f301315193adad04fa020d99c2f087d.tar.gz rockbox-cda55bbd6f301315193adad04fa020d99c2f087d.tar.bz2 rockbox-cda55bbd6f301315193adad04fa020d99c2f087d.tar.xz | |
Correctly read the next track metadata information. Don't crash if
frequency is ever set to 0.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7171 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/dsp.c')
| -rw-r--r-- | apps/dsp.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -241,9 +241,9 @@ int process(short *dest, long *src, int samplecount) /* Resample as necessary */ if (dsp_config.frequency > NATIVE_FREQUENCY) - length = upsample(resampled, src, samplecount, &resample[channel]); - else if (dsp_config.frequency < NATIVE_FREQUENCY) length = downsample(resampled, src, samplecount, &resample[channel]); + else if (dsp_config.frequency < NATIVE_FREQUENCY) + length = upsample(resampled, src, samplecount, &resample[channel]); else p = src; @@ -358,6 +358,11 @@ bool dsp_configure(int setting, void *value) { switch (setting) { case DSP_SET_FREQUENCY: + debugf("set frequency: %d\n", (int)value); + if ((int)value == 0) { + dsp_config.frequency = NATIVE_FREQUENCY; + break ; + } memset(resample, 0, sizeof(resample)); dsp_config.frequency = (int)value; resample[0].delta = resample[1].delta = |