Author Topic: is it possibile to check the validity of a sync handle?  (Read 216 times)

MB_SOFT

  • Posts: 459
if i have an handle returned by BASS_ChannelSetSync can i check later if that handle is still opened or has been freed/removed?

i ask this because i don't want to accidentally create another sync if the previous one is still running.

Ian @ un4seen

  • Administrator
  • Posts: 25430
There isn't currently any way to check whether a sync handle is valid, except using it in a BASS_ChannelRemoveSync call, but of course it won't be valid any more after that. Are you using ONETIME syncs? If not, the syncs shouldn't ever be freed automatically, so should stay valid until you free them (or the stream). If you are using a ONETIME sync then perhaps you could reset your sync handle variable to 0 in the SYNCPROC callback?

MB_SOFT

  • Posts: 459
ok i will reset sync handle variable to 0 in the SYNCPROC callback, thak you