Add track-readahead

This commit is contained in:
Matt Nadareski
2021-10-09 09:34:37 -07:00
parent 8e606f368d
commit e7e05d7137

View File

@@ -324,6 +324,11 @@ namespace RedBookPlayer.Models.Discs
// Select the first index that has a sector offset greater than or equal to 0
CurrentSector = (ulong)(track?.Indexes.OrderBy(kvp => kvp.Key).First(kvp => kvp.Value >= 0).Value ?? 0);
// Load and debug output
uint sectorCount = (uint)(track.TrackEndSector - track.TrackStartSector);
byte[] trackData = ReadSectors(sectorCount);
Console.WriteLine($"DEBUG: Track {trackNumber} - {sectorCount} sectors / {trackData.Length} bytes");
}
/// <inheritdoc/>