/// <summary> /// Performs custom looping when a loop range is specified. /// </summary> private void SyncLoop(UInt32 handle, UInt32 channel, UInt32 data, IntPtr user) { if (!BASSNative.ChannelSetPosition(channel, (UInt32)user, 0)) { throw new BASSException(); } }
/// <summary> /// Sets the position of the specified channel. /// </summary> /// <param name="handle">The handle of the channel to modify.</param> /// <param name="position">The position in seconds to which to set the channel.</param> public static void SetPositionInSeconds(UInt32 handle, Double position) { var positionInBytes = BASSNative.ChannelSeconds2Bytes(handle, position); if (!BASSUtil.IsValidValue(positionInBytes)) { throw new BASSException(); } if (!BASSNative.ChannelSetPosition(handle, positionInBytes, 0)) { throw new BASSException(); } }