Hi Ian,
That what I was thinkng (testing without split) -> Same result
Tested with a minimal project, without mixer -> Same result
Added a button that calls Bass_ASIo_Stop and I notice one repeat of last audio part (around few 200 ms I think).
The code of project (1 button "btStop", 1 button "btExit", 1 dropdown list (Combo) "cmbASIOChanOut", 1 label "lblfeedback"):
Option Explicit
Dim AudioStream As Long
Dim ASIODevOut As Integer
Dim ASIOChanOutCount As Integer
Dim ASIOChanOut As Integer
Private Sub btExit_Click()
Unload Me
End Sub
Private Sub btStop_Click()
Call BASS_ASIO_Stop
End Sub
Public Sub cmbASIOChanOut_Click()
Dim i As Integer
Call BASS_ASIO_Stop 'stop ASIO processing
Call BASS_ASIO_ChannelEnable(0, ASIOChanOut, 0, 0) 'disable old inputs
ASIOChanOut = cmbASIOChanOut.ListIndex
Debug.Print ASIOChanOut
Call BASS_ASIO_ChannelEnableBASS(0, ASIOChanOut, AudioStream, BASSTRUE) 'enable new inputs
Call BASS_ASIO_Start(0, 0) 'resume ASIO processing
End Sub
Private Sub Form_Load()
' change and set the current path, to prevent from VB not finding BASS.DLL
ChDrive App.Path
ChDir App.Path
Call BASS_Init(0, 44100, 0, 0, 0)
ASIODevOut = 2
ASIOChanOut = 4
Call BASS_ASIO_Init(ASIODevOut, 0)
ListChanOutASIO
AudioStream = BASS_StreamCreateFile(BASSFALSE, StrPtr("track.mp3"), 0, 0, BASS_STREAM_DECODE)
lblfeedback.Caption = AudioStream
Dim i As BASS_CHANNELINFO
Call BASS_ASIO_ChannelEnableBASS(0, ASIOChanOut, AudioStream, BASSTRUE)
Call BASS_ASIO_SetRate(i.freq) 'try to set the device rate to avoid resampling
'start it using default buffer size
If (BASS_ASIO_Start(0, 0) = 0) Then
Call BASS_ASIO_Free
Call BASS_Free
MsgBox "Can't initialize device " & ASIODevOut
End If
End Sub
Public Sub ListChanOutASIO()
Dim info As BASS_ASIO_INFO
Call BASS_ASIO_GetInfo(info)
ASIOChanOutCount = info.outputs
Dim o As Integer
cmbASIOChanOut.Clear
For o = 1 To ASIOChanOutCount - 1
cmbASIOChanOut.AddItem o & "+" & o + 1
Next o
cmbASIOChanOut.ListIndex = ASIOChanOut
End Sub
Private Sub Form_Unload(Cancel As Integer)
Call BASS_ASIO_Free
Call BASS_Free
End Sub