Prebuffering only one mixer stream possible?

Started by smoodiloo,

smoodiloo

Hi Ian,

I have a matrix mixer and i added 2 normal streams for playing mp3's without delays.
Occasionally I also add a radio stream with

STREAM_RADIO = Bass.BASS_StreamCreateURL(url, 0, BASSFlag.BASS_STREAM_DECODE Or BASSFlag.BASS_SAMPLE_FLOAT Or BASSFlag.BASS_STREAM_STATUS, Nothing, IntPtr.Zero)

BassMix.BASS_Mixer_StreamAddChannel(STREAM_MATRIX, STREAM_RADIO, BASSFlag.BASS_MIXER_MATRIX Or BASSFlag.BASS_MIXER_BUFFER) ' add the source to the mix with matrix-mixing enabled


I would like this radio stream only to have a much bigger buffer (as i sometimes get disconnects). Is this possible? Or is buffer size always global?

Ian @ un4seen

For an internet stream, the most important buffer will be the download buffer, which is controlled by the BASS_CONFIG_NET_BUFFER option. But I don't think that would affect disconnects (it's more about preventing stalls). Disconnects would most likely be caused by an internet connection problem, or the server closing the connection due to being idle. Are you ever pausing the stream/mixer? Doing so could result in the server closing the connection. You can capture the network traffic with Wireshark to confirm what's happening.

If you want to auto-reconnect, you can set a BASS_SYNC_DOWNLOAD sync to be informed when the connection is closed and then call BASS_StreamCreateURL again to reconnect. And then add the new stream to the mixer and free the old one.