I was wondering how I would get the length of a channel in seconds.
I have tried the code below but the message box says: -10084943413446.2 where it should say something like: 204.something
Public Const BASS_POS_BYTE As Integer = 0
<DllImport("%PATH%\bass.dll")> _
Public Shared Function BASS_ChannelBytes2Seconds(ByVal handle As Integer, pos As Integer) As Double
End Function
<DllImport("%PATH%\bass.dll")> _
Public Shared Function BASS_ChannelGetLength(ByVal handle As Integer, ByVal mode As Integer) As Integer
End Function
...
Dim LengthB As Integer = BASSAPI.BASS_ChannelGetLength(hStream, BASSAPI.BASS_POS_BYTE)
Msgbox(BASS_ChannelBytes2Seconds(hStream, LengthB))
...
Thanks
Kris