So I expected 2 of the 3 inputs to be in sync, as they were setup exactly the same, but even they went out of sync, and this is in the same application. I've tried setting up a physical input along side them too, each input taking the same record stream, and even they went out of sync. So I'm not sure right now that this is specifically a stream Url issue.
I'm just absolutely stumped at the moment. Something is really odd. Breaking it down in code this is what we have in the class, which we then instance, set up the same, we have the main No Sound mixer:
Bass.BASS_Init(0, 44100, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero)
_NodeID = BassMix.BASS_Mixer_StreamCreate(44100, 2, BASSFlag.BASS_DEFAULT Or BASSFlag.BASS_MIXER_NONSTOP)
Bass.BASS_ChannelSetAttribute(_NodeID, BASSAttribute.BASS_ATTRIB_BUFFER, 0F)
We have the mixer which will take a number of different sources like recording / input channels, streams etc:
_Mixer = BassMix.BASS_Mixer_StreamCreate(44100, 2, BASSFlag.BASS_STREAM_DECODE Or BASSFlag.BASS_MIXER_NONSTOP)
Bass.BASS_ChannelSetAttribute(_Mixer, BASSAttribute.BASS_ATTRIB_BUFFER, 0F)
_VUMeter = New DSP_PeakLevelMeter(_Mixer, 1) With {.CalcRMS = True,.UpdateTime = 0.08}
Note: The _VUMeter is the DSP we use to monitor the audio. It's from here you can visually see when each input has gone out, since the No Sound mixer doesn't provide any sound.
We have to split this _Mixer so we can plug it into the _NodeId mixer. This is done like this:
Dim i As Integer = BassMix.BASS_Split_StreamCreate(_Mixer, BASSFlag.BASS_STREAM_DECODE, Nothing)
Ret = BassMix.BASS_Mixer_StreamAddChannel(_NodeID, i, BASSFlag.BASS_DEFAULT)
Then to take a PCM stream which is at 44100 16bits we do this:
_VirtualCableId = Bass.BASS_StreamCreateURL(_VirtualCableUrl, 0, BASSFlag.BASS_STREAM_DECODE, Nothing, IntPtr.Zero)
BassMix.BASS_Mixer_StreamAddChannel(_Mixer, _VirtualCableId, BASSFlag.BASS_DEFAULT)
or if we want a recording channel we do this:
_RecordMonitorStream = Bass.BASS_RecordStart(44100, 2, BASSFlag.BASS_RECORD_PAUSE, Nothing, IntPtr.Zero)
BassMix.BASS_Mixer_StreamAddChannel(_Mixer, _RecordMonitorStream, BASSFlag.BASS_DEFAULT)
Bass.BASS_ChannelPlay(_RecordMonitorStream, False)
As you can see, noting too clever, nothing fancy. Can you see anything here that we're doing wrong. It seems like it should be pretty cut and dried.