summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank Gevaerts <frank@gevaerts.be>2010-09-24 22:14:10 +0000
committerFrank Gevaerts <frank@gevaerts.be>2010-09-24 22:14:10 +0000
commit8458fade581d457de6455b95c84eb85a7a27f97d (patch)
treea848bb0d0fba2e1c5f463a1e6b773ce1f54046e7
parent11e792b3cf889b6d96efd99f1404d09b6b8b7b3b (diff)
downloadrockbox-8458fade581d457de6455b95c84eb85a7a27f97d.tar.gz
rockbox-8458fade581d457de6455b95c84eb85a7a27f97d.zip
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
-rw-r--r--apps/dsp.c10
1 files 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
173 int sample_bytes; 173 int sample_bytes;
174 int stereo_mode; 174 int stereo_mode;
175 int32_t tdspeed_percent; /* Speed% * PITCH_SPEED_PRECISION */ 175 int32_t tdspeed_percent; /* Speed% * PITCH_SPEED_PRECISION */
176#ifdef HAVE_PITCHSCREEN
176 bool tdspeed_active; /* Timestretch is in use */ 177 bool tdspeed_active; /* Timestretch is in use */
178#endif
177 int frac_bits; 179 int frac_bits;
178#ifdef HAVE_SW_TONE_CONTROLS 180#ifdef HAVE_SW_TONE_CONTROLS
179 /* Filter struct for software bass/treble controls */ 181 /* Filter struct for software bass/treble controls */
@@ -242,18 +244,18 @@ static bool crossfeed_enabled;
242 244
243#define RESAMPLE_RATIO 4 /* Enough for 11,025 Hz -> 44,100 Hz */ 245#define RESAMPLE_RATIO 4 /* Enough for 11,025 Hz -> 44,100 Hz */
244 246
245#ifdef HAVE_PITCHSCREEN
246static int32_t small_sample_buf[SMALL_SAMPLE_BUF_COUNT] IBSS_ATTR; 247static int32_t small_sample_buf[SMALL_SAMPLE_BUF_COUNT] IBSS_ATTR;
247static int32_t small_resample_buf[SMALL_SAMPLE_BUF_COUNT * RESAMPLE_RATIO] IBSS_ATTR; 248static int32_t small_resample_buf[SMALL_SAMPLE_BUF_COUNT * RESAMPLE_RATIO] IBSS_ATTR;
248 249
250#ifdef HAVE_PITCHSCREEN
249static int32_t *big_sample_buf = NULL; 251static int32_t *big_sample_buf = NULL;
250static int32_t *big_resample_buf = NULL; 252static int32_t *big_resample_buf = NULL;
251static int big_sample_buf_count = -1; /* -1=unknown, 0=not available */ 253static int big_sample_buf_count = -1; /* -1=unknown, 0=not available */
252#endif 254#endif
253 255
254static int sample_buf_count; 256static int sample_buf_count = SMALL_SAMPLE_BUF_COUNT;
255static int32_t *sample_buf; 257static int32_t *sample_buf = small_sample_buf;
256static int32_t *resample_buf; 258static int32_t *resample_buf = small_resample_buf;
257 259
258#define SAMPLE_BUF_LEFT_CHANNEL 0 260#define SAMPLE_BUF_LEFT_CHANNEL 0
259#define SAMPLE_BUF_RIGHT_CHANNEL (sample_buf_count/2) 261#define SAMPLE_BUF_RIGHT_CHANNEL (sample_buf_count/2)