Hi guys... i really haven't got any code to provide. Can tab reading be done via funtions? like mci? or do i need to read the file?
Thanks
Use ReadFile or Mapping file
for ID3v1
Offset Lenght Information
0 3 ,,TAG" label ID3v1-Blocks
3 30 Songtitel
33 30 Artist
63 30 Album
93 4 Year
97 30 Comments
127 1 Genre
Is a simply way
for ID3v1.1, ID3v2, ID3v2.2, v2.3 and v2.4 must you look for this structur all can you find by google
or Donkey have writte a good example can you find in the forum backup
thanks ragdog... i had seen a c sample and kinda felt it was the first 127 bytes. Thanks.
I've written an MP3 player with IDv1 tag reader in C++ like 2 years ago. If you are OK with that old and simple tag version, I can find it from my archive and provide you c++ code. I would have converted them to MASM for you if I had enough ASM skills :( It is quite simple actually. Just reading last 128 bytes(not sure but something like that), and the structure is like 30 char for artist 30 char for album etc.. Maybe it's the same tag version that you found in C language.
Btw, IDv1 may be outdated a bit since it limits the user in terms of length. However, reading other tags seemed harder to me :P
Hi
I have search on the old board and have found a example
http://www.masmforum.com/board/index.php?topic=10107.msg74019#msg74019
Format specs are inter alia here (http://en.wikipedia.org/wiki/ID3#Layout). Below a quick & dirty attempt. ID3v1 is found at the end of file, ID3v2 at the beginning - this is code for ID3v1.
Sample output:
songtitle 01 - (Da Le) Yaleo
artist Santana
album Supernatural
year 1999
Id3comment
track Track 1
include \masm32\MasmBasic\MasmBasic.inc ; download (http://masm32.com/board/index.php?topic=94.0)
ID3v1 STRUCT
header db 3 dup(?)
songtitle db 30 dup(?)
artist db 30 dup(?)
album db 30 dup(?)
year db 4 dup(?)
Id3comment db 28 dup(?)
zerobyte db ?
track db ?
genre db ?
ID3v1 ENDS
Init
Let esi=New$(128) ; create a 128 byte string
Open "I", #1, CL$() ; open commandline-specified file for reading
sub Lof(#1), 128 ; get offset lof-128
Seek #1, eax ; move file pointer
Input #1, esi, 128 ; fill the string
Close
xor ecx, ecx
.Repeat
.if byte ptr [esi+ecx]<=32
mov byte ptr [esi+ecx], " " ; convert to plain text
.endif
inc ecx
.Until ecx>=ID3v1.track ; but not the track byte
Dim TagDesc$( 8 )
Let TagDesc$(0)="songtitle "
Let TagDesc$(1)="artist "
Let TagDesc$(2)="album "
Let TagDesc$(3)="year "
Let TagDesc$(4)="Id3comment"
Let TagDesc$(5)="track "
Let TagDesc$(6)="genre "
Dim Tag$( 8 )
Let Tag$(0)=Mid$(esi, 1+ID3v1.songtitle, 30)
Let Tag$(1)=Mid$(esi, 1+ID3v1.artist, 30)
Let Tag$(2)=Mid$(esi, 1+ID3v1.album, 30)
Let Tag$(3)=Mid$(esi, 1+ID3v1.year, 4)
Let Tag$(4)=Mid$(esi, 1+ID3v1.Id3comment, 28)
movzx ecx, byte ptr [esi.ID3v1.track]
Let Tag$(5)=Str$("Track %i", ecx)
For_ ebx=0 To 5
PrintLine TagDesc$(ebx), Tb$, Tag$(ebx)
Next
Inkey "ok"
Exit
end start
Edit: The ID3v2 header can be found here (http://www.id3.org/id3v2.3.0#head-697d09c50ed7fa96fb66c6b0a9d93585e2652b0b). Attention the size field is big endian, you need a bswap eax or similar to get it working.