Author Topic: StreamAddChannel also starts the channel?  (Read 157 times)

smooodilo

  • Guest
StreamAddChannel also starts the channel?
« on: 26 Jun '24 - 14:58 »
Hi,
I just found out that adding a channel to the mixer also starts it. Is this correct? I don't see it in the docs. Does this mean I do not have to call ChannelPlay?

Ian @ un4seen

  • Administrator
  • Posts: 26028
Re: StreamAddChannel also starts the channel?
« Reply #1 on: 26 Jun '24 - 17:32 »
Yes, that's correct. If you would like to add a source without mixing it yet, you can use the BASS_MIXER_CHAN_PAUSE flag in the BASS_Mixer_StreamAddChannel call. And then remove the flag with BASS_Mixer_ChannelFlags to start mixing it.

BASS_ChannelPlay only applies to normal BASS playback channels, ie. when the BASS_STREAM_DECODE flag isn't set. So it doesn't apply to mixer sources (it'll fail with BASS_ERROR_DECODE).