PDA

View Full Version : ID3 'Genre' Tag Problem..


b_baggins
8th April 2002, 05:44
Hi There,

Im writing a 'front end' for Winamp in VB which displays album covers and a few other things (source availble upon request).

Anyway today i started using a reference called the ID3Com 1.0 type library which enables me to do stuff like:

-------------------------------------
Dim id3tag As New ID3ComTag

id3tag.Link (file.path) '----- Read id3 tag

msgbox id3t.Genre 'display mp3 file genre

--------------------------

Anway the above code works but it returns a number (which ive since found out relates to a genre table (ie- 0 is blues, 1 is classic rock etc.., which i can work out OK) but the problem is that it nearly always returns a value of 255 which is not in the table.
If i go in to Winamp and get the file info on the same file, it seems to be able to read the Genre tags OK, but my app (using the ID3comtag) cannot.

Im thinking this may be a version problem or something, but if anyone can shed some light or perhaps recommend another way of doing this im all ears.

Why i can get this info from Winamps API i dont know....

Thanks!
BB

flame_bilbo@hotmail.com
bilbo@bilbosworld.com






:weird:

DarKRaveR
19th April 2002, 03:06
Might be some sort of type matching problem in this lib u use or something. Assuming you got a 1 Byte value 255 equals -1 which is often a return value for an error ...

Maybe someone just screwed a signed with an unsigned type ... (just a possibility)...

Maybe have a closer look at that lib you use, I assume there's some Problem there ...

Other thing might be: Check which genre winamp reports, look up which value it got ... check the tag with some hex editor and what you that lib reports, see if you can find some sort of regular similarity or something.

So long ...