Author Topic: Bass Threaded Mixer and Starting several Mixer Channel streams at once  (Read 398 times)

rustymbk1079

  • Posts: 11
Playing large number of file stream channels through a mixer. Migrating to using the new Threaded mixer option from my old method of mixers in separate threads. Large number of channels added to a mixer in Pause state. I want to be able to start them all at once and guarantee them being in sync. Is there a correct way to do this with a mixer set to use multiple threads?

Thank you in advance.

Ian @ un4seen

  • Administrator
  • Posts: 25734
You can use BASS_ChannelLock to lock the mixer before un-pausing all of the sources to ensure that they resume together in the mixer output. For example:

Code: [Select]
BASS_ChannelLock(mixer, true); // lock mixer
BASS_Mixer_ChannelFlags(source1, 0, BASS_MIXER_CHAN_PAUSE); // unpause a source
BASS_Mixer_ChannelFlags(source2, 0, BASS_MIXER_CHAN_PAUSE); // unpause another source
BASS_ChannelLock(mixer, false); // unlock mixer

rustymbk1079

  • Posts: 11
Thank you Ian.
So only possible if the mixer not being used for other files?

Ian @ un4seen

  • Administrator
  • Posts: 25734
It will be fine for the mixer to have other sources too. This just ensures that the specified sources resume together. Any other sources are unaffected.

rustymbk1079

  • Posts: 11
Thank you Ian. Very helpful as always. Appreciated.