X
Xenon02
Guest
Hello !
I've acquired the DFPlayer for my STM32 Nucleo, and I've been wondering how it works a little bit (not that detailed), and I've read a bit how the mp3 file structure looked like, and I wondered how does the DFPlayer or any MP3 devices knows where the file starts and where the file ends ? If for example the file was mixed with other files that are not MP3 then DFPlayer has to know which files are which and where to start reading.
First of all I've tried to find this information and I found out that usually people are searching for the sync bytes that are usually the same and repeats in every frame so if it's in first frame and in the second frame etc it is then considered as mp3 file. So maybe the DFPlayer searches for the first sync byte or something like that, but how does he know how many frames have been sent in total ? If there is no EOF in mp3 file structure.
Second thing why I'm asking this is because when I want to change the music while the actual music is in the middle of playing he has to know how long is the music and skips the rest of the frames to go to next music and it's first frame. I wondered what is the algorythm of finding the mp3 file from all the data that is stored in the microSD card and from that he know how long is one music. I really wonder how it works.
I've acquired the DFPlayer for my STM32 Nucleo, and I've been wondering how it works a little bit (not that detailed), and I've read a bit how the mp3 file structure looked like, and I wondered how does the DFPlayer or any MP3 devices knows where the file starts and where the file ends ? If for example the file was mixed with other files that are not MP3 then DFPlayer has to know which files are which and where to start reading.
First of all I've tried to find this information and I found out that usually people are searching for the sync bytes that are usually the same and repeats in every frame so if it's in first frame and in the second frame etc it is then considered as mp3 file. So maybe the DFPlayer searches for the first sync byte or something like that, but how does he know how many frames have been sent in total ? If there is no EOF in mp3 file structure.
Second thing why I'm asking this is because when I want to change the music while the actual music is in the middle of playing he has to know how long is the music and skips the rest of the frames to go to next music and it's first frame. I wondered what is the algorythm of finding the mp3 file from all the data that is stored in the microSD card and from that he know how long is one music. I really wonder how it works.