diff options
author | William Wilgus <wilgus.william@gmail.com> | 2022-05-04 10:25:29 -0400 |
---|---|---|
committer | William Wilgus <wilgus.william@gmail.com> | 2022-05-05 00:31:07 -0400 |
commit | 2c4480979f1b0374414b4e49957f1772bd103b79 (patch) | |
tree | 48e762475e771768ae5abf11827a7fab6bb1c80a /apps | |
parent | 09ef94ed8bd6a7aa0876797a2fa5fd64978aa539 (diff) | |
download | rockbox-2c4480979f1b0374414b4e49957f1772bd103b79.tar.gz rockbox-2c4480979f1b0374414b4e49957f1772bd103b79.zip |
tdspeed.c remove buffer name strings
get rid of the magic buffer size and the whole name buffer
naming the buffers individually doesn't serve any real purpose
instead add a static string for all td buffers
Change-Id: I962a966456453e1b84bab6fec6f4df7cb075ef4e
Diffstat (limited to 'apps')
-rw-r--r-- | apps/rbcodec_helpers.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/apps/rbcodec_helpers.c b/apps/rbcodec_helpers.c index b412bb3aa4..78e068ded7 100644 --- a/apps/rbcodec_helpers.c +++ b/apps/rbcodec_helpers.c | |||
@@ -59,18 +59,12 @@ static struct buflib_callbacks ops = | |||
59 | /* Allocate timestretch buffers */ | 59 | /* Allocate timestretch buffers */ |
60 | bool tdspeed_alloc_buffers(int32_t **buffers, const int *buf_s, int nbuf) | 60 | bool tdspeed_alloc_buffers(int32_t **buffers, const int *buf_s, int nbuf) |
61 | { | 61 | { |
62 | static const char *buffer_names[4] = { | 62 | /* #Buffer index - 0 ovl L, 1 ovl R, 2 out L, 3 out R */ |
63 | "tdspeed ovl L", | ||
64 | "tdspeed ovl R", | ||
65 | "tdspeed out L", | ||
66 | "tdspeed out R" | ||
67 | }; | ||
68 | |||
69 | for (int i = 0; i < nbuf; i++) | 63 | for (int i = 0; i < nbuf; i++) |
70 | { | 64 | { |
71 | if (handles[i] <= 0) | 65 | if (handles[i] <= 0) |
72 | { | 66 | { |
73 | handles[i] = core_alloc_ex(buffer_names[i], buf_s[i], &ops); | 67 | handles[i] = core_alloc_ex("tdspeed", buf_s[i], &ops); |
74 | 68 | ||
75 | if (handles[i] <= 0) | 69 | if (handles[i] <= 0) |
76 | return false; | 70 | return false; |