1) V2Duration Usage example

'Set a reference to the V2Duration.dll : "Project" -> "Add reference" -> browse for V2Duration.dll .
'Now setup the Import once to avoid too long declarations:

Imports V2Duration.V2Duration

Note: Put the following lines of code into a Sub!

'Declare calculation class object:

Dim V2Duration = New V2Duration.V2Duration

'Read the *.v2m file into a Bytearray:

Dim path As String = "C:\Users\Freefall\Desktop\Flowers.v2m"
Dim File() As Byte = My.Computer.FileSystem.ReadAllBytes(path)

'Use the calculation function to show the music duration time:

MsgBox("The duration is " & V2Duration.CalcV2Dur(File).ToString & "s.")

Last edited Apr 19, 2013 at 10:34 AM by Freefall, version 2

Comments

No comments yet.