Hello all,
I'm trying to write a simple mp3 decoder. My program opens a file, find a synchword and read the header and size information for the frame. My question is about the main data area. If I understand correctly, it contains the main data of the frame and can also contain the main data of successive frames. In my code, I use a circular buffer to store the main data area. I'd like to know how to set a pointer to the beginning of the main data of the frame. Is the following formula correct for frame number n ?
begin(n) = end(n - 1) - main_data_begin(n) + 1
where end(n-1) is the last byte of main data for the previous frame
I've already looked at several engines source code but I couldn't understand how the main data is organized. Thanks for any explanations.