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
{{ message }}
Repository navigation
mp3 tags displayed not properly (only 1st char) #226
First I´d like to thank Ed for his fantastic work 1000 times !!!
When playing mp3-files from SD only the first letter of Artist and Title were displayed.
During evaluation it turned out that the ID3tags "TALB" and "TPE1" contained 0x00 each 2nd char (16bit-format?) in my mp3-files.
I added a short pice of code in function "handle_ID3" to remove those 0x00 from the metalinebuffer, that works fine for my problem:
...
sttg -= mp3file.read ( (uint8_t*)metalinebf, stg ) ; // Read tag contents
//remove all chr(0) from metalinebf
int k = 0 ;
for (i = 0; i < stg; i++) {
metalinebf[k] = metalinebf[i];
if (metalinebf[i] != 0) {
k++ ;
}
}
metalinebf[k] = 0 ; // Add delimiter
//tenc = metalinebf[0] ; // First byte is encoding type
//if ( tenc == '\0' ) // Debug all tags with encoding 0
//{
dbgprint ( "ID3 %s = %s", ID3tag.tagid, metalinebf + 1 ) ;
...
Maybe this information is helpful for others, or may lead to an improved code.
Reading http://id3.org/id3v2.3.0 shows that decoding is a real drudgery.
Would be nice if somebody would take up the challenge to display the cover art from ID3-tags also :-) (Tag "APIC" - attached picture)
First I´d like to thank Ed for his fantastic work 1000 times !!!
When playing mp3-files from SD only the first letter of Artist and Title were displayed.
During evaluation it turned out that the ID3tags "TALB" and "TPE1" contained 0x00 each 2nd char (16bit-format?) in my mp3-files.
I added a short pice of code in function "handle_ID3" to remove those 0x00 from the metalinebuffer, that works fine for my problem:
...
sttg -= mp3file.read ( (uint8_t*)metalinebf, stg ) ; // Read tag contents
//remove all chr(0) from metalinebf
int k = 0 ;
for (i = 0; i < stg; i++) {
metalinebf[k] = metalinebf[i];
if (metalinebf[i] != 0) {
k++ ;
}
}
metalinebf[k] = 0 ; // Add delimiter
//tenc = metalinebf[0] ; // First byte is encoding type
//if ( tenc == '\0' ) // Debug all tags with encoding 0
//{
dbgprint ( "ID3 %s = %s", ID3tag.tagid, metalinebf + 1 ) ;
...
Maybe this information is helpful for others, or may lead to an improved code.
Reading http://id3.org/id3v2.3.0 shows that decoding is a real drudgery.
Would be nice if somebody would take up the challenge to display the cover art from ID3-tags also :-) (Tag "APIC" - attached picture)
Activity
Danfocus commentedon Feb 24, 2019
Basic UTF-16 support in pull request #231