Delegate SyncProcedure
User defined synchronizer callback function (see ChannelSetSync(Int32, SyncFlags, Int64, SyncProcedure, IntPtr) for details).
Namespace: System.Dynamic.ExpandoObject
Assembly: ManagedBass.dll
Syntax
public delegate void SyncProcedure(int Handle, int Channel, int Data, IntPtr User);
Parameters
Int32
Handle
The sync Handle that has occured (as returned by ChannelSetSync(Int32, SyncFlags, Int64, SyncProcedure, IntPtr)). |
Int32
Channel
The channel that the sync occured on. |
Int32
Data
Additional data associated with the sync's occurance. |
IntPtr
User
The User instance data given when ChannelSetSync(Int32, SyncFlags, Int64, SyncProcedure, IntPtr) was called. |
Remarks
BASS creates a single thread dedicated to executing sync callback functions, so a callback function should be quick as other syncs cannot be processed until it has finished. Attribute slides (ChannelSlideAttribute(Int32, ChannelAttribute, Single, Int32)) are also performed by the sync thread, so are also affected if a sync callback takes a long time.
"Mixtime" syncs Mixtime are not executed in the sync thread, but immediately in whichever thread triggers them. In most cases that will be an update thread, and so the same restrictions that apply to stream callbacks (StreamProcedure) also apply here.
ChannelSetPosition(Int32, Int64, PositionFlags) can be used in a mixtime sync to implement custom looping, eg. set a Position sync at the loop end position and seek to the loop start position in the callback.