SubLib Subtitle Library

Subtitles.AdjustTimings Method (Int32, TimeSpan, Int32, TimeSpan)

Auto adjusts a range of subtitles given their first and last correct times.

public bool AdjustTimings(
   int startIndex,
   TimeSpan startTime,
   int endIndex,
   TimeSpan endTime
);

Parameters

startIndex
The subtitle index to start the adjustment with.
startTime
The correct start time for the first subtitle.
endIndex
The subtitle index to end the adjustment with.
endTime
The correct start time for the last subtitle.

Return Value

Whether the subtitles could be adjusted.

Remarks

The subtitles are first shifted to the first subtitle's correct time, and then proportionally adjusted using the last subtitle's correct time.

See Also

Subtitles Class | SubLib Namespace | Subtitles.AdjustTimings Overload List