-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAdioTagging.ctl
88 lines (85 loc) · 2.52 KB
/
AdioTagging.ctl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
VERSION 5.00
Begin VB.UserControl AdioTagging
ClientHeight = 3600
ClientLeft = 0
ClientTop = 0
ClientWidth = 4800
InvisibleAtRuntime= -1 'True
ScaleHeight = 3600
ScaleWidth = 4800
Begin VB.Image Image_Main
Height = 480
Left = 0
Picture = "AdioTagging.ctx":0000
Top = 0
Width = 480
End
End
Attribute VB_Name = "AdioTagging"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Option Explicit
'// Enums
Public Enum enumAdioTagVersion
[v1]
[v2]
End Enum
Public Enum enumAdioProperty
[pFileSize]
[pDurationInSeconds]
[pDurationString]
[pBitrate]
[pChannels]
[pStereo]
[pFrequency]
End Enum
Public Enum enumAdioTags
[tArtist]
[tTitle]
[tAlbum]
[tYear]
[tGenre]
[tTrackNumber]
[tComposer]
[tCopyright]
[tAlbumArtist]
End Enum
'*
'* Write MP3 meta tags to a specified MP3 file
'* @param String File: The file you want to change
'* @param String Value: The value you want to write
'* @param enumAdioTags TagType: The tag you want to change
'* @param enumAdioTagVersion AdioTags: The version of the tag you want to write (V1, V2)
'* @return Boolean: Tells if the tags has been changed
'*
Public Function WriteTag(File As String, Value As String, TagType As enumAdioTags, TagVersion As enumAdioTagVersion) As Boolean
WriteTag = modAdio.AdioWriteTag(File, Value, TagType, TagVersion)
End Function
'*
'* Get file properties of a specified file
'* @param String File: The file to get the property of
'* @param enumAdioProperty PropertyType: The property you want to get
'* @return String: The value of the property
'*
Public Function ReadProperty(File As String, PropertyType As enumAdioProperty) As String
ReadProperty = modAdio.AdioReadAudioProperty(File, PropertyType)
End Function
'*
'* Gets MP3 meta tags of a specified file
'* @param String File: The file you want to get tags of
'* @param enumAdioTags TagType: The tag you want to get
'* @param enumAdioTagVersion TagVersion: The version of the tag you want to get (V1, V2)
'* @return String: The value of the tag
'*
Public Function ReadTag(File As String, TagType As enumAdioTags, TagVersion As enumAdioTagVersion) As String
ReadTag = modAdio.AdioReadTag(File, TagType, TagVersion)
End Function
'*
'* Resize the usercontrol
'*
Private Sub UserControl_Resize()
width = Image_Main.width
height = Image_Main.height
End Sub