我先开个头,我转一下那位仁兄告诉我的关于MP3文件的相关信息:
特别声明 作者:oldnebula
Dim bbb As Byte
Dim kkk As Double
Dim iii As Integer
Dim sss As String
Dim aa(200) As Variant
Dim sss1 As String
Dim sss2 As String
Dim sss3 As String
Dim sss4 As String
Dim sss5 As String
kkk = FileLen(MP3路径) ‘获取该MP3的字节数
Close #3
Open MP3路径 For Binary As #3
For iii = 1 To 128
Get #3, kkk - 128 + iii, bbb ’取最后128个字节
If iii = 127 Then
aa(iii) = bbb
Else
aa(iii) = Hex(bbb) ‘将获取字节转化成十六进制并存入数组
End If
Next iii
Close #3
For iii = 4 To 33 Step 2
If aa(iii) <> &H0& Then ’如果该字节为0则丢弃
sss1 = sss1 & Chr("&h" & aa(iii) & aa(iii + 1)) ‘将两个字节合并,转化成汉字
End If
Next iii ’4-33字节是标题
For iii = 34 To 63 Step 2
If aa(iii) <> &H0& Then
sss = sss & Chr("&h" & aa(iii) & aa(iii + 1))
End If
Next iii ‘34-63字节是艺术家
For iii = 64 To 93 Step 2
If aa(iii) <> &H0& Then
sss2 = sss2 & Chr("&h" & aa(iii) & aa(iii + 1))
End If
Next iii '64-93字节是唱片标题
For iii = 94 To 97
If aa(iii) <> &H0& Then
sss3 = sss3 & Chr("&h" & aa(iii))
End If
Next iii’94-97字节是发行年份,取单字节
For iii = 98 To 123
If aa(iii) <> &H0& Then
sss4 = sss4 & Chr("&h" & aa(iii)),备注一般是英文,取单字节
End If
Next iii ’98-123字节是备注
另外127字节是编号以十进制为准。另外尚有几个字节不明所以,欢迎讨论。
[此贴子已经被作者于2007-4-17 12:05:07编辑过]