ref: 8e7ebf88a1d117be721a065f6d737cf5d55ceae1
parent: 62e5245c53b56bb4942cda142e674aef36bd39cc
author: lieff <[email protected]>
date: Thu Jan 11 12:14:22 EST 2018
add MINIMP3_MAX_SAMPLES_PER_FRAME define
--- a/minimp3.h
+++ b/minimp3.h
@@ -5,6 +5,9 @@
This software is distributed without any warranty.
See <http://creativecommons.org/publicdomain/zero/1.0/>.
*/
+
+#define MINIMP3_MAX_SAMPLES_PER_FRAME (1152*2)
+
typedef struct
{
int frame_bytes;
--- a/minimp3_test.c
+++ b/minimp3_test.c
@@ -34,7 +34,7 @@
do
{
- short pcm[2*1152], pcm2[2*1152];
+ short pcm[MINIMP3_MAX_SAMPLES_PER_FRAME], pcm2[MINIMP3_MAX_SAMPLES_PER_FRAME];
nbuf += fread(buf + nbuf, 1, sizeof(buf) - nbuf, file_mp3);
samples = mp3dec_decode_frame(&mp3d, buf, nbuf, pcm, &info);
if (samples)