summaryrefslogtreecommitdiff
path: root/lib/rbcodec/dsp
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2022-05-03 22:54:33 -0400
committerWilliam Wilgus <me.theuser@yahoo.com>2022-05-03 23:00:58 -0400
commit79864c6ec22370ae31d3259a17e0c93db3cdae61 (patch)
tree6de3a54700d84db34eab150740006dd74d359cd2 /lib/rbcodec/dsp
parent4dd3c2b33ec3d181f54cc1bcf5b596401a8cfcbb (diff)
downloadrockbox-79864c6ec22370ae31d3259a17e0c93db3cdae61.tar.gz
rockbox-79864c6ec22370ae31d3259a17e0c93db3cdae61.zip
add const to const * strings
I don't think this will amke any difference except maybe for hosted ports Change-Id: I84f898aea92a6963901a6d889dd18b63f24c9a41
Diffstat (limited to 'lib/rbcodec/dsp')
-rw-r--r--lib/rbcodec/dsp/tdspeed.c9
-rw-r--r--lib/rbcodec/dsp/tdspeed.h1
2 files changed, 5 insertions, 5 deletions
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 @@
41#define MAX_INPUTCOUNT 512 /* Max input count so dst doesn't overflow */ 41#define MAX_INPUTCOUNT 512 /* Max input count so dst doesn't overflow */
42#define FIXED_BUFCOUNT 3072 /* 48KHz factor 3.0 */ 42#define FIXED_BUFCOUNT 3072 /* 48KHz factor 3.0 */
43#define FIXED_OUTBUFCOUNT 4096 43#define FIXED_OUTBUFCOUNT 4096
44#define NBUFFERS 4
45 44
46enum tdspeed_ops 45enum tdspeed_ops
47{ 46{
@@ -65,9 +64,9 @@ static struct tdspeed_state_s
65 int32_t *ovl_buff[2]; /* overlap buffer (L+R) */ 64 int32_t *ovl_buff[2]; /* overlap buffer (L+R) */
66} tdspeed_state; 65} tdspeed_state;
67 66
68static int32_t *buffers[NBUFFERS] = { NULL, NULL, NULL, NULL }; 67static int32_t *buffers[TDSPEED_NBUFFERS] = { NULL, NULL, NULL, NULL };
69 68
70static const int buffer_sizes[NBUFFERS] = 69static const int buffer_sizes[TDSPEED_NBUFFERS] =
71{ 70{
72 FIXED_BUFCOUNT * sizeof(int32_t), 71 FIXED_BUFCOUNT * sizeof(int32_t),
73 FIXED_BUFCOUNT * sizeof(int32_t), 72 FIXED_BUFCOUNT * sizeof(int32_t),
@@ -552,7 +551,7 @@ static intptr_t tdspeed_configure(struct dsp_proc_entry *this,
552 break; 551 break;
553 552
554 case DSP_PROC_INIT: 553 case DSP_PROC_INIT:
555 if (!tdspeed_alloc_buffers(buffers, buffer_sizes, NBUFFERS)) 554 if (!tdspeed_alloc_buffers(buffers, buffer_sizes, TDSPEED_NBUFFERS))
556 return -1; /* fail the init */ 555 return -1; /* fail the init */
557 556
558 st->this = this; 557 st->this = this;
@@ -564,7 +563,7 @@ static intptr_t tdspeed_configure(struct dsp_proc_entry *this,
564 st->this = NULL; 563 st->this = NULL;
565 st->factor = PITCH_SPEED_100; 564 st->factor = PITCH_SPEED_100;
566 dsp_outbuf.remcount = 0; 565 dsp_outbuf.remcount = 0;
567 tdspeed_free_buffers(buffers, NBUFFERS); 566 tdspeed_free_buffers(buffers, TDSPEED_NBUFFERS);
568 break; 567 break;
569 568
570 case DSP_PROC_NEW_FORMAT: 569 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 @@
34 34
35#define STRETCH_MAX (250L * PITCH_SPEED_PRECISION) /* 250% */ 35#define STRETCH_MAX (250L * PITCH_SPEED_PRECISION) /* 250% */
36#define STRETCH_MIN (35L * PITCH_SPEED_PRECISION) /* 35% */ 36#define STRETCH_MIN (35L * PITCH_SPEED_PRECISION) /* 35% */
37#define TDSPEED_NBUFFERS 4
37 38
38void dsp_timestretch_enable(bool enable); 39void dsp_timestretch_enable(bool enable);
39void dsp_set_timestretch(int32_t percent); 40void dsp_set_timestretch(int32_t percent);