mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
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
This commit is contained in:
parent
09ef94ed8b
commit
2c4480979f
1 changed files with 2 additions and 8 deletions
|
@ -59,18 +59,12 @@ static struct buflib_callbacks ops =
|
||||||
/* Allocate timestretch buffers */
|
/* Allocate timestretch buffers */
|
||||||
bool tdspeed_alloc_buffers(int32_t **buffers, const int *buf_s, int nbuf)
|
bool tdspeed_alloc_buffers(int32_t **buffers, const int *buf_s, int nbuf)
|
||||||
{
|
{
|
||||||
static const char *buffer_names[4] = {
|
/* #Buffer index - 0 ovl L, 1 ovl R, 2 out L, 3 out R */
|
||||||
"tdspeed ovl L",
|
|
||||||
"tdspeed ovl R",
|
|
||||||
"tdspeed out L",
|
|
||||||
"tdspeed out R"
|
|
||||||
};
|
|
||||||
|
|
||||||
for (int i = 0; i < nbuf; i++)
|
for (int i = 0; i < nbuf; i++)
|
||||||
{
|
{
|
||||||
if (handles[i] <= 0)
|
if (handles[i] <= 0)
|
||||||
{
|
{
|
||||||
handles[i] = core_alloc_ex(buffer_names[i], buf_s[i], &ops);
|
handles[i] = core_alloc_ex("tdspeed", buf_s[i], &ops);
|
||||||
|
|
||||||
if (handles[i] <= 0)
|
if (handles[i] <= 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue