Thanks, david for the Tips, Though I need some help regarding using the Lib,
Suppose that I have an array containing a minimal MP3 file, (so I can use internal flash for storage) something like this
const unsigned char _mp3Data[10000] ={ 0xFF, 0xFB, 0xE2, 0x04, 0x00, 0x01, 0x12, 0xE3 ,etc...};
MP3FrameInfo mp3FrameInfo;
static HMP3Decoder hMP3Decoder;
short pcm[1152*2];
int bytesLeft = 1940;//1940 is the Maximum MP3 frame size
unsigned char* ptr = &_mp3Data;
hMP3Decoder = MP3InitDecoder();
MP3Decode(hMP3Decoder, &ptr, &bytesLeft, pcm, 0);
ptr+=(1940 - bytesLeft);
bytesLeft = 1940;
MP3Decode(hMP3Decoder, &ptr, &bytesLeft, pcm, 0);
The decoder do it right for the first frame, But I think the Decoder does not do it right for the second frame, what’s am I missing!?