From 79864c6ec22370ae31d3259a17e0c93db3cdae61 Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Tue, 3 May 2022 22:54:33 -0400 Subject: add const to const * strings I don't think this will amke any difference except maybe for hosted ports Change-Id: I84f898aea92a6963901a6d889dd18b63f24c9a41 --- lib/rbcodec/dsp/tdspeed.c | 9 ++++----- lib/rbcodec/dsp/tdspeed.h | 1 + 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/rbcodec') diff --git a/lib/rbcodec/dsp/tdspeed.c b/lib/rbcodec/dsp/tdspeed.c index 21585eb78e..64cbaf5e12 100644 --- a/lib/rbcodec/dsp/tdspeed.c +++ b/lib/rbcodec/dsp/tdspeed.c @@ -41,7 +41,6 @@ #define MAX_INPUTCOUNT 512 /* Max input count so dst doesn't overflow */ #define FIXED_BUFCOUNT 3072 /* 48KHz factor 3.0 */ #define FIXED_OUTBUFCOUNT 4096 -#define NBUFFERS 4 enum tdspeed_ops { @@ -65,9 +64,9 @@ static struct tdspeed_state_s int32_t *ovl_buff[2]; /* overlap buffer (L+R) */ } tdspeed_state; -static int32_t *buffers[NBUFFERS] = { NULL, NULL, NULL, NULL }; +static int32_t *buffers[TDSPEED_NBUFFERS] = { NULL, NULL, NULL, NULL }; -static const int buffer_sizes[NBUFFERS] = +static const int buffer_sizes[TDSPEED_NBUFFERS] = { FIXED_BUFCOUNT * sizeof(int32_t), FIXED_BUFCOUNT * sizeof(int32_t), @@ -552,7 +551,7 @@ static intptr_t tdspeed_configure(struct dsp_proc_entry *this, break; case DSP_PROC_INIT: - if (!tdspeed_alloc_buffers(buffers, buffer_sizes, NBUFFERS)) + if (!tdspeed_alloc_buffers(buffers, buffer_sizes, TDSPEED_NBUFFERS)) return -1; /* fail the init */ st->this = this; @@ -564,7 +563,7 @@ static intptr_t tdspeed_configure(struct dsp_proc_entry *this, st->this = NULL; st->factor = PITCH_SPEED_100; dsp_outbuf.remcount = 0; - tdspeed_free_buffers(buffers, NBUFFERS); + tdspeed_free_buffers(buffers, TDSPEED_NBUFFERS); break; case DSP_PROC_NEW_FORMAT: diff --git a/lib/rbcodec/dsp/tdspeed.h b/lib/rbcodec/dsp/tdspeed.h index 2949c1bee9..84920ac7c2 100644 --- a/lib/rbcodec/dsp/tdspeed.h +++ b/lib/rbcodec/dsp/tdspeed.h @@ -34,6 +34,7 @@ #define STRETCH_MAX (250L * PITCH_SPEED_PRECISION) /* 250% */ #define STRETCH_MIN (35L * PITCH_SPEED_PRECISION) /* 35% */ +#define TDSPEED_NBUFFERS 4 void dsp_timestretch_enable(bool enable); void dsp_set_timestretch(int32_t percent); -- cgit v1.2.3