Author Topic: Stop url stream source channel in mix  (Read 247 times)


  • Posts: 259
Stop url stream source channel in mix
« on: 31 May '24 - 13:45 »
Hi everybody :-)

How do I stop a url stream, instead of pausing it like this:

Code: [Select]
Dim success As BASSFlag = BassMix.BASS_Mixer_ChannelFlags(MainModule.streamfx(WhichDeck - 1), BASSFlag.BASS_MIXER_CHAN_PAUSE, BASSFlag.BASS_MIXER_CHAN_PAUSE)
streamfx is being put into a mixer channel.

And how do I start it again?

Or actually another question to this issue:

How does it behave, when I pause a url stream like above for let's say an hour. Will it just keep wirting the stream data to the buffer in an endless way? I would like to avoid that and rather stop the stream.

Ian @ un4seen

  • Administrator
  • Posts: 25884
Re: Stop url stream source channel in mix
« Reply #1 on: 31 May '24 - 16:37 »
No more data can be downloaded while the internet stream's download buffer is full, so if you pause it for a long time, the connection will probably timeout and close in the meantime due to lack of activity. If it's a file (rather than a live source) then BASS will try to reconnect and continue when you resume it, but otherwise you'll need to recreate the stream, eg. call BASS_StreamCreateURL again.

BASS_Mixer_ChannelRemove is basically the mixer equivalent of BASS_ChannelStop. Freeing the stream (eg. BASS_StreamFree) will also remove it from the mixer.