Use dynamic buffer size for mp3 again
Additionally removed the old MP3 code, saving a massive 1KB from the binary! Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
This commit is contained in:
@@ -38,8 +38,6 @@ int playFile(const char* file)
|
||||
case FILE_TYPE_MP3:
|
||||
setMp3(&decoder);
|
||||
break;
|
||||
//playMp3(file);
|
||||
//return 0;
|
||||
|
||||
default:
|
||||
printf("Unsupported File type.\n");
|
||||
@@ -52,10 +50,6 @@ int playFile(const char* file)
|
||||
goto out;
|
||||
}
|
||||
|
||||
printf("Here: %d\n", __LINE__);
|
||||
buffer1 = linearAlloc(decoder.buffSize * sizeof(int16_t));
|
||||
buffer2 = linearAlloc(decoder.buffSize * sizeof(int16_t));
|
||||
|
||||
printf("Here: %d\n", __LINE__);
|
||||
if((ret = (*decoder.init)(file)) != 0)
|
||||
{
|
||||
@@ -64,6 +58,10 @@ int playFile(const char* file)
|
||||
}
|
||||
|
||||
printf("Here: %d\n", __LINE__);
|
||||
buffer1 = linearAlloc(decoder.buffSize * sizeof(int16_t));
|
||||
buffer2 = linearAlloc(decoder.buffSize * sizeof(int16_t));
|
||||
|
||||
printf("Here: %d\n", __LINE__);
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("\nRate: %lu\tChan: %d\n", (*decoder.rate)(), (*decoder.channels)());
|
||||
|
||||
Reference in New Issue
Block a user