diff options
Diffstat (limited to 'lib/rbcodec/dsp')
-rw-r--r-- | lib/rbcodec/dsp/tdspeed.c | 9 | ||||
-rw-r--r-- | lib/rbcodec/dsp/tdspeed.h | 1 |
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 | ||
46 | enum tdspeed_ops | 45 | enum 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 | ||
68 | static int32_t *buffers[NBUFFERS] = { NULL, NULL, NULL, NULL }; | 67 | static int32_t *buffers[TDSPEED_NBUFFERS] = { NULL, NULL, NULL, NULL }; |
69 | 68 | ||
70 | static const int buffer_sizes[NBUFFERS] = | 69 | static 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 | ||
38 | void dsp_timestretch_enable(bool enable); | 39 | void dsp_timestretch_enable(bool enable); |
39 | void dsp_set_timestretch(int32_t percent); | 40 | void dsp_set_timestretch(int32_t percent); |