Posted: 29th Aug 2003 0:37
Someone requested code to read ID3v1 and ID3v2 tags from an MP3 file, so I decided to post it here in case anyone else cared to have it.

Usage:
+ Code Snippet
SubVersion$ = Read_ID3v2_Into_Memblock("name.mp3", 1)
if SubVersion$ <> "0"
   Title$ = Get_ID3v2_Title(1)
   Artist$ = Get_ID3v2_Artist(1)

   delete memblock 1
endif

print "Title: " + Title$
print "Artist: " + Artist$


Cheers!
Posted: 9th Sep 2003 17:31
Quite useful.

Can you enlarge the example to take the duration out of it?
Posted: 10th Sep 2003 16:55
I looked into information on how to obtain the playing time (duration) of an MP3. It'll take a little work, but I can do it. I'll jump on that when I have a little extra time. If you want more information about the MP3 file organization, frame sizes and lengths, etc... visit http://anubisnet.sourceforge.net/devel/mp3/mp3-whitepaper.pdf.
Posted: 26th Sep 2003 15:42
There is a way to get it if you know the freq and thebitrate. I forget the formula tho. Is there a binary reader in DBPro? Cause thats how you can get that information.
Posted: 29th Sep 2003 17:59
You can read data from a file in DBP in increments as low as a byte, up to DWORD. It does not, however, allow to read in a block of bytes into a TYPE, such as C's fread command. I unfortunatly haven't had time to finish off this bit of code, as I have a full time job of running a company.