Trying to get this to work. I have set up a matrix mixer with bassmix. I have 4 stereo output channels (so effectively this is 8 asio channels). I cant get these mapped to the asio outputs. The code I have so far is:
Private Sub InitializeAsio()
' Get soundcard information
Dim SoundcardInfo As New BASS_INFO
BASS_GetInfo(SoundcardInfo)
' Load BASS plugins
Dim plugins() As String = {
"bass_aac.dll", "basswma.dll", "bass_fx.dll",
"bass_ac3.dll", "bassmix.dll", "bassasio.dll"
}
For Each plugin As String In plugins
BASS_PluginLoad(plugin)
Next
' Configure network settings
BASS_SetConfig(BASSConfig.BASS_CONFIG_NET_TIMEOUT, 5000)
BASS_SetConfig(BASSConfig.BASS_CONFIG_NET_READTIMEOUT, 10000)
BASS_SetConfig(BASSConfig.BASS_CONFIG_NET_BUFFER, CInt(MyAppSettings.Item("Mixer.Buffer")))
BASS_SetConfig(BASSConfig.BASS_CONFIG_NET_PLAYLIST, 1)
' Initialize BASS
If Not Bass.BASS_Init(0, 44100, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero) Then
MessageBox.Show("BASS could not be initialized (no sound): " & Bass.BASS_ErrorGetCode().ToString())
Return
End If
' Initialize ASIO
If Not BassAsio.BASS_ASIO_Init(0, BASSASIOInit.BASS_ASIO_THREAD) Then
MessageBox.Show("ASIO could not be initialized. Error code: " & BassAsio.BASS_ASIO_ErrorGetCode().ToString())
Return
End If
' Set ASIO sample rate
BassAsio.BASS_ASIO_SetRate(44100)
' Create matrix mixer
STREAM_MATRIX = BassMix.BASS_Mixer_StreamCreate(44100, 4,
BASSFlag.BASS_MIXER_NONSTOP Or
BASSFlag.BASS_SAMPLE_FLOAT Or
BASSFlag.BASS_STREAM_DECODE)
' Enable ASIO channel
If Not BassAsio.BASS_ASIO_ChannelEnableBASS(False, 0, STREAM_MATRIX, True) Then
MessageBox.Show("ASIO output channel could not be enabled. Error code: " & BassAsio.BASS_ASIO_ErrorGetCode().ToString())
Return
End If
' Start ASIO
If Not BassAsio.BASS_ASIO_Start(0) Then
MessageBox.Show("ASIO could not be started. Error code: " & BassAsio.BASS_ASIO_ErrorGetCode().ToString())
Return
End If
End Sub
Basically what I understand from the docs is that if I plug the matrix mixer to the asio, it automatically uses as much channels as the matrix has. But the matrix has 4 stereo outputs, which should convert to 8 channels on the asio device if I am correct?
And there is one other thing I can't understand: To connect the matrix to asio it has to be set as decoding channel. But if I do this, functions like BASS_Mixer_ChannelIsActive and BASS_Mixer_ChannelPlay are not available/working anymore. So how do I control the input streams?