summaryrefslogtreecommitdiffstats
path: root/apps
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 /apps
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
Diffstat (limited to 'apps')
-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
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)