byte to string ( for ID3 tag reader)

fguihen

Well-known member
Joined
Nov 10, 2003
Messages
248
Location
Eire
im trying to create a simple ID3 reading class. i use a file stream to get the last 128 bytes of an mp3, and store them in a byte array. i know i have to get the first of theese 128 bytes, and see if they say "T,A,G" , which indicates there is an id3 tag to be read. im just wondering , what do i cast the bytes as, char or string, to show me if the letters TAG are there?
 
Try This:

Code:
Dim Num as integer
Dim ByteStr as string

For  Num = 1 to 128
ByteStr = ByteStr & Chr(ByteArray(Num))Where ByteArray is The Array of bytes of yours. Hmmm.
Next

If UCase(Mid$(ByteStr,1,3)) = "TAG" then
code here for dealing with the ID3...
End If

This code hasnt been tested, and may need some editing on your part, but it should do the trick :D .
 
Back
Top