Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions se5/TypewriterEffect/TypewriterEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,11 @@ private static List<SrtBlock> GenerateForParagraph(SrtBlock p, double endDelaySe
text += tag + p.Text[i];
tag = string.Empty;

// Each step ends where the next one starts: a gap, even 1 ms, shows no text for
// that moment, so the line flickers (and a full-frame Blu-ray sup image lets the
// video show through).
var startMs = p.StartMs + (long)(index * stepMs);
var endMs = p.StartMs + (long)((index + 1) * stepMs) - 1;
var endMs = p.StartMs + (long)((index + 1) * stepMs);
if (endMs < startMs)
{
endMs = startMs;
Expand All @@ -165,7 +168,7 @@ private static List<SrtBlock> GenerateForParagraph(SrtBlock p, double endDelaySe

if (endDelayMs > 0 && result.Count > 0)
{
var startMs = p.StartMs + workDurationMs;
var startMs = result[^1].EndMs;
result.Add(new SrtBlock { StartMs = startMs, EndMs = p.EndMs, Text = p.Text });
}
else if (result.Count > 0)
Expand Down
Loading