Hey if you need to read out the ID3 for a mp3 to get the name, album, year ...
You can use this:
FUNCTION GetID3: file$, BYREF title$, BYREF artist$, BYREF album$, BYREF year$, BYREF comment$, BYREF genre$
DIM bytearray%[128]
LOCAL check_tag$
OK = OPENFILE(0, file$, TRUE)
IF OK
FILESEEK 0, -128, -1
FOR i = 0 TO 127
READBYTE 0, bytearray[i]
NEXT
CLOSEFILE 0
ENDIF
// Read TAG
FOR i = 0 TO 2
check_tag$ = check_tag$ + CHR$(bytearray[i])
NEXT
IF check_tag$ = "TAG"
// Read title
FOR i = 3 TO 32
title$ = title$ + CHR$(bytearray[i])
NEXT
// Read artist
FOR i = 33 TO 62
artist$ = artist$ + CHR$(bytearray[i])
NEXT
// Read album
FOR i = 63 TO 92
album$ = album$ + CHR$(bytearray[i])
NEXT
// Read year
FOR i = 93 TO 96
year$ = year$ + CHR$(bytearray[i])
NEXT
// Read comment
FOR i = 97 TO 126
comment$ = comment$ + CHR$(bytearray[i])
NEXT
// Read genre
genre$ = CHR$(bytearray[127])
ENDIF
ENDFUNCTION
Veeeery usefull. Should be moved to "snippets", no?
OK :D