From ee9d30bd5618d01d7b2d108005a590611a1dbf0b Mon Sep 17 00:00:00 2001 From: Robert McRackan Date: Mon, 9 May 2022 07:56:16 -0400 Subject: [PATCH] Michael's "frame" fix from email --- AaxDecrypter/Cue.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/AaxDecrypter/Cue.cs b/AaxDecrypter/Cue.cs index 44c6fc7c..624895ce 100644 --- a/AaxDecrypter/Cue.cs +++ b/AaxDecrypter/Cue.cs @@ -14,14 +14,17 @@ namespace AaxDecrypter stringBuilder.AppendLine(GetFileLine(filePath, "MP3")); + var startOffset = chapters.StartOffset; + var trackCount = 0; foreach (var c in chapters.Chapters) { + var startTime = c.StartOffset - startOffset; trackCount++; stringBuilder.AppendLine($"TRACK {trackCount} AUDIO"); stringBuilder.AppendLine($" TITLE \"{c.Title}\""); - stringBuilder.AppendLine($" INDEX 01 {(int)c.StartOffset.TotalMinutes}:{c.StartOffset:ss\\:ff}"); + stringBuilder.AppendLine($" INDEX 01 {(int)startTime.TotalMinutes}:{startTime:ss}:{(int)(startTime.Milliseconds / 1000d * 75)}"); } return stringBuilder.ToString();