/// <summary> /// Sets a value indicating whether the specified channel is looping. /// </summary> /// <param name="handle">The handle of the channel to modify.</param> /// <param name="looping">A value indicating whether the channel is looping.</param> public static void SetIsLooping(UInt32 handle, Boolean looping) { var flags = looping ? BASSNative.ChannelFlags(handle, BASSNative.BASS_SAMPLE_LOOP, BASSNative.BASS_SAMPLE_LOOP) : BASSNative.ChannelFlags(handle, 0, BASSNative.BASS_SAMPLE_LOOP); if (!BASSUtil.IsValidValue(flags)) { throw new BASSException(); } }
/// <summary> /// Gets a value indicating whether the specified channel is looping. /// </summary> /// <param name="handle">The handle of the channel to evaluate.</param> /// <returns>true if the channel is looping; otherwise, false.</returns> public static Boolean GetIsLooping(UInt32 handle) { var flags = BASSNative.ChannelFlags(handle, 0, 0); if (!BASSUtil.IsValidValue(flags)) { throw new BASSException(); } return((flags & BASSNative.BASS_SAMPLE_LOOP) == BASSNative.BASS_SAMPLE_LOOP); }