|
-
Sep 28th, 2000, 02:51 PM
#1
Thread Starter
Junior Member
How do I get information from a MP3 file..
like the ID3 tag, the amount of KB/s and the frequency...
all that....
Thanx
Raz.
-
Sep 28th, 2000, 03:06 PM
#2
Lively Member
-
Sep 28th, 2000, 03:08 PM
#3
Addicted Member
Hi,
Take a look at http://www.planet-source-code.com
Search for MP3 or something else.
There is a big chance you get some code about this...
Have fun...
-
Sep 28th, 2000, 03:17 PM
#4
ID3 Tags
Code:
'Author: kedaman (i think)
'Origin: http://forums.vb-world.net
'Purpose: Get MP3 ID3 Tags
'Version: VB5/VB6
Sub ID3splitTAG(ID3TAG, ID3Title, ID3Artist, ID3Album, ID3Year, ID3Comment, ID3Genre)
If Left(ID3TAG, 3) = "TAG" Then
ID3Title = RTrim(Mid(ID3TAG, 4, 30))
ID3Artist = RTrim(Mid(ID3TAG, 34, 30))
ID3Album = RTrim(Mid(ID3TAG, 64, 30))
ID3Year = Val(RTrim(Mid(ID3TAG, 94, 4)))
ID3Comment = RTrim(Mid(ID3TAG, 98, 30))
ID3Genre = Val(Asc(Mid(ID3TAG, 128, 1)))
End If
End Sub
Function ID3createTAG(ID3Title, ID3Artist, ID3Album, ID3Year, ID3Comment, ID3Genre)
ID3createTAG = "TAG" & Left(ID3Title & Space(30), 30) & Left(ID3Artist & Space(30), 30) & Left(ID3Album & Space(30), 30) & Left(ID3Year & Space(4), 4) & Left(ID3Comment & Space(30), 30) & Chr(Val(ID3Genre))
End Function
Function ID3getTAG(filename As String) As String
Dim astring As String * 128
ff = FreeFile
Open filename For Binary As ff
Get ff, LOF(ff) - 127, astring
Close ff
ID3getTAG = astring
End Function
Sub ID3setTAG(filename As String, aTAG As String)
Dim astring As String * 128: astring = aTAG
ff = FreeFile
Open filename For Binary As ff
If Left(ID3getTAG(filename), 3) = "TAG" Then
Put ff, LOF(ff) - 127, astring
Else
Put ff, LOF(ff) + 1, astring
End If
Close ff
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|