Author Topic: Knowing when a channel added to a mixer is completed: best practice  (Read 393 times)


  • Posts: 311
Hello  ;D

I was wondering which is the best practice for being notified when a decoding channel added to a playing mixer (BASS_Mixer_StreamCreate and BASS_Mixer_StreamAddChannel functions) has completed its playback (not at mixtime but when the end of the file is heard)? I've tried using the BASS_SYNC_END sync through the BASS_ChannelSetSync function and initially it was quite good and reliable for decoding streams created through the BASS_StreamCreateFile function and loading from a disk file: then I tried the same with memory based files, again created through the BASS_StreamCreateFile function having the "mem" parameter set to TRUE and in this case the sync seems to come quite in advance of about 2 - 3 seconds.  ??? ???

Thanks in advance  ;D ;D


Ian @ un4seen

  • Administrator
  • Posts: 21600
Instead of BASS_ChannelSetSync, please try using BASS_Mixer_ChannelSetSync to set the BASS_SYNC_END sync. So long as you don't use the BASS_SYNC_MIXTIME flag, the sync should then be called when the end is heard. See the BASS_Mixer_ChannelSetSync documentation for details.