From 8458fade581d457de6455b95c84eb85a7a27f97d Mon Sep 17 00:00:00 2001 From: Frank Gevaerts Date: Fri, 24 Sep 2010 22:14:10 +0000 Subject: [PATCH] Make sure the dsp code has proper resample buffers even if HAVE_PITCHSCREEN is undefined. This makes playback work again without HAVE_PITCHSCREEN git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28158 a1c6a512-1295-4272-9138-f99709370657 --- apps/dsp.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/apps/dsp.c b/apps/dsp.c index 33a54008e2..3cff1918d7 100644 --- a/apps/dsp.c +++ b/apps/dsp.c @@ -173,7 +173,9 @@ struct dsp_config int sample_bytes; int stereo_mode; int32_t tdspeed_percent; /* Speed% * PITCH_SPEED_PRECISION */ +#ifdef HAVE_PITCHSCREEN bool tdspeed_active; /* Timestretch is in use */ +#endif int frac_bits; #ifdef HAVE_SW_TONE_CONTROLS /* Filter struct for software bass/treble controls */ @@ -242,18 +244,18 @@ static bool crossfeed_enabled; #define RESAMPLE_RATIO 4 /* Enough for 11,025 Hz -> 44,100 Hz */ -#ifdef HAVE_PITCHSCREEN static int32_t small_sample_buf[SMALL_SAMPLE_BUF_COUNT] IBSS_ATTR; static int32_t small_resample_buf[SMALL_SAMPLE_BUF_COUNT * RESAMPLE_RATIO] IBSS_ATTR; +#ifdef HAVE_PITCHSCREEN static int32_t *big_sample_buf = NULL; static int32_t *big_resample_buf = NULL; static int big_sample_buf_count = -1; /* -1=unknown, 0=not available */ #endif -static int sample_buf_count; -static int32_t *sample_buf; -static int32_t *resample_buf; +static int sample_buf_count = SMALL_SAMPLE_BUF_COUNT; +static int32_t *sample_buf = small_sample_buf; +static int32_t *resample_buf = small_resample_buf; #define SAMPLE_BUF_LEFT_CHANNEL 0 #define SAMPLE_BUF_RIGHT_CHANNEL (sample_buf_count/2)