Yes.
Imports System.IO
Imports Un4seen.Bass
Imports Un4seen.Bass.Misc
Imports Un4seen.Bass.AddOn.Wma
Imports Un4seen.Bass.AddOn.Tags
Imports Un4seen.Bass.AddOn.Enc
Module BassMod
Structure BASS_DX8_REVERB ' DSFXWavesReverb
Dim fInGain As Single ' [-96.0,0.0] default: 0.0 dB
Dim fReverbMix As Single ' [-96.0,0.0] default: 0.0 db
Dim fReverbTime As Single ' [0.001,3000.0] default: 1000.0 ms
Dim fHighFreqRTRatio As Single ' [0.001,0.999] default: 0.001
End Structure
Structure BASS_DX8_FLANGER ' DSFXFlanger
Dim fWetDryMix As Single
Dim fDepth As Single
Dim fFeedback As Single
Dim fFrequency As Single
Dim lWaveform As Integer ' 0=triangle, 1=sine
Dim fDelay As Single
Dim lPhase As Integer ' BASS_FX_PHASE_xxx
End Structure
Structure BASS_DX8_ECHO ' DSFXEcho
Dim fWetDryMix As Single
Dim fFeedback As Single
Dim fLeftDelay As Single
Dim fRightDelay As Single
Dim lPanDelay As Integer
End Structure
Structure BASS_DX8_PARAMEQ
Dim fCenter As Single
Dim fBandwidth As Single
Dim fGain As Single
End Structure
'Sound
Public FLeftPos As Integer
Public AMaster As Single
Public StreamPos As Double
Public StreamLength As Double
Public StreamInfo As BASS_CHANNELINFO
Public IniECHO As Integer
Public IniECHO_OnOff As Boolean = False
Public IniFLANGER As Integer
Public IniFLANGER_OnOff As Boolean = False
Public IniREVERB As Integer
Public IniREVERB_OnOff As Boolean = False
Public IniEQ1 As Integer = 0
Public IniEQ2 As Integer = 0
Public IniEQ3 As Integer = 0
Public IniEQ4 As Integer = 0
Public IniEQ5 As Integer = 0
Public IniEQ6 As Integer = 0
Public IniEQ7 As Integer = 0
Public IniEQ8 As Integer = 0
Public IniEQ9 As Integer = 0
Public IniEQ10 As Integer = 0
Public xEQU As BASS_DX8_PARAMEQ
Public xECHO As BASS_DX8_ECHO
Public xFLANGER As BASS_DX8_FLANGER
Public xREVERB As BASS_DX8_REVERB
Public FX(13) As Int32
Public flags As Integer
'************************
'* Initialization flags *
'************************
Public Const BASS_DEVICE_8BITS As Short = 1 'use 8 bit resolution, else 16 bit
Public Const BASS_DEVICE_MONO As Short = 2 'use mono, else stereo
Public Const BASS_DEVICE_3D As Short = 4 'enable 3D functionality
' If the BASS_DEVICE_3D flag is not specified when initilizing BASS,
' then the 3D flags (BASS_SAMPLE_3D and BASS_MUSIC_3D) are ignored when
' loading/creating a sample/stream/music.
Public Const BASS_DEVICE_LATENCY As Short = 256 'calculate device latency (BASS_INFO struct)
Public Const BASS_DEVICE_SPEAKERS As Short = 2048 'force enabling of speaker assignment
Public Function MakeLong(ByRef LoWord As Integer, ByRef HiWord As Integer) As Integer
'Replacement for the c++ Function MAKELONG
MakeLong = (LoWord And &HFFFF) Or (HiWord * &H10000)
End Function
Declare Function BASS_SetVolume Lib "bass.dll" (ByVal volume As Integer) As Integer
Declare Function BASS_GetVolume Lib "bass.dll" () As Double
Declare Function BASS_ChannelGetPosition Lib "bass.dll" (ByVal handle As Integer, ByVal Mode As BASSMode) As Long
Declare Function BASS_ChannelBytes2Seconds Lib "bass.dll" (ByVal handle As Integer, ByVal pos As Long) As Double
'Declare Function BASS_ChannelGetLength Lib "bass.dll" (ByVal handle As Integer, ByVal Mode As BASSMode) As Long
Declare Function BASS_ChannelGetLength Lib "bass.dll" (ByVal handle As Integer, ByVal Mode As BASSMode) As Int64
'Declare Function BASS_Init Lib "bass.dll" (ByVal device As Integer, ByVal freq As UInteger, ByVal flags As UInteger, ByVal win As IntPtr, ByVal clsid As UInteger) As Boolean
'Declare Function BASS_Free Lib "bass.dll" () As Boolean
'Declare Function BASS_ChannelStop Lib "bass.dll" (ByVal handle As IntPtr) As Boolean
'Declare Function BASS_ChannelGetLength Lib "bass.dll" (ByVal handle As IntPtr, ByVal mode As Integer) As Integer
'Declare Function BASS_StreamFree Lib "bass.dll" (ByVal handle As IntPtr) As Boolean
'Declare Function BASS_ChannelGetPosition Lib "bass.dll" (ByVal handle As IntPtr, ByVal mode As Integer) As Integer
'Declare Function BASS_ChannelPlay Lib "bass.dll" (ByVal handle As IntPtr, ByVal restart As Boolean) As Boolean
'Declare Function BASS_SetVolume Lib "bass.dll" (ByVal volume As Single) As Boolean
'Declare Function BASS_StreamCreateFile Lib "bass.dll" Alias "BASS_StreamCreateFile" (ByVal mem As Boolean, ByVal file As String, ByVal offset As UInteger, ByVal offsethigh As UInteger, ByVal length As UInteger, ByVal lengthhigh As UInteger, ByVal flags As UInteger) As IntPtr
'Declare Function BASS_SampleLoad Lib "bass.dll" Alias "BASS_SampleLoad" (ByVal mem As Boolean, ByVal file As String, ByVal offset As UInteger, ByVal offsethigh As UInteger, ByVal length As UInteger, ByVal max As UInteger, ByVal flags As UInteger) As IntPtr
'Declare Function BASS_SampleFree Lib "bass.dll" (ByVal handle As IntPtr) As Boolean
'Declare Function BASS_SampleGetChannel Lib "bass.dll" (ByVal handle As IntPtr, ByVal onlynew As Boolean) As IntPtr
'Declare Function BASS_SampleStop Lib "bass.dll" (ByVal handle As IntPtr) As Boolean
End Module
And
STREAM = Bass.BASS_StreamCreateFile(TRACKDIR & TRACKNAME, 0, 0, BASSFlag.BASS_STREAM_AUTOFREE)
Dim SongTime As Long
SongTime = BASS_ChannelBytes2Seconds(STREAM, Bass.BASS_ChannelGetLength(STREAM, BASSMode.BASS_POS_BYTES))