You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Working on my mp3 player, I experience some problems with file playing : when I start playing a mp3 file, I've got a variable length noise before the song starts. The duration of this noise matches the time it takes for the AudioFileSourceID3 object to parse the tags in a given file. (On startup my player will check all exisiting files against its database, to extract tags from every audio files)
The noise seems to simply be whatever data was previously in the output buffer. On first play I've got silence, on the followings I've got something matching the level of the song that was previously played.
It is a problem because some files contains large ID3 tags, with embed jpeg for album covers.
So, I understand that the AudioGeneratorMP3 and AudioFileSourceID3 objects are made to work hand in hand, but would it be possible to have an option to skip ID3 tags when reading mp3 ? Maybe by testing for tag existence at the beginning of the file, in the begin() method of AudioGeneratorMP3, and skipping as many bytes as given by the file tag header ?
I could give it a try, but I don't know what would be the best way or place to do it.
In AudioGeneratorMP3.begin(), between the buffers allocation and the first calls to the underlying MAD lib ?
Or in AudioFileSourceID3.read(), forcing the parsing to be skipped once the header size is known, then handling to the caller ?
Any advice is welcome !
The text was updated successfully, but these errors were encountered:
troisiemetype
changed the title
Noise / random buffer at the beginning of mp3 files.
Noise / random buffer reading at the beginning of mp3 files.
Dec 15, 2020
Hello.
Working on my mp3 player, I experience some problems with file playing : when I start playing a mp3 file, I've got a variable length noise before the song starts. The duration of this noise matches the time it takes for the AudioFileSourceID3 object to parse the tags in a given file. (On startup my player will check all exisiting files against its database, to extract tags from every audio files)
The noise seems to simply be whatever data was previously in the output buffer. On first play I've got silence, on the followings I've got something matching the level of the song that was previously played.
It is a problem because some files contains large ID3 tags, with embed jpeg for album covers.
So, I understand that the AudioGeneratorMP3 and AudioFileSourceID3 objects are made to work hand in hand, but would it be possible to have an option to skip ID3 tags when reading mp3 ? Maybe by testing for tag existence at the beginning of the file, in the begin() method of AudioGeneratorMP3, and skipping as many bytes as given by the file tag header ?
I could give it a try, but I don't know what would be the best way or place to do it.
In AudioGeneratorMP3.begin(), between the buffers allocation and the first calls to the underlying MAD lib ?
Or in AudioFileSourceID3.read(), forcing the parsing to be skipped once the header size is known, then handling to the caller ?
Any advice is welcome !
The text was updated successfully, but these errors were encountered: