[AaruFormat] Implement Tracks.get.

This commit is contained in:
2025-10-12 13:49:55 +01:00
parent 32bbf045cd
commit 85e7cefdc6
3 changed files with 147 additions and 3 deletions

View File

@@ -72,5 +72,47 @@ public sealed partial class AaruFormat
public MetadataMediaType MetadataMediaType;
}
#endregion
#region Nested type: TrackEntry
[StructLayout(LayoutKind.Sequential, Pack = 1)]
struct TrackEntry
{
/// <summary>
/// Track number (1..99 typical for CD audio/data). 0 may indicate placeholder/non-standard.
/// </summary>
public byte Sequence;
/// <summary>
/// Track type (value from \ref TrackType).
/// </summary>
public byte Type;
/// <summary>
/// Inclusive starting LBA of the track.
/// </summary>
public long Start;
/// <summary>
/// Inclusive ending LBA of the track.
/// </summary>
public long End;
/// <summary>
/// Pre-gap length in sectors preceding track start (0 if none).
/// </summary>
public long Pregap;
/// <summary>
/// Session number (1-based). 1 for single-session discs.
/// </summary>
public byte Session;
/// <summary>
/// ISRC raw 13-byte code (no null terminator). All zeros if not present.
/// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 13)]
public byte[] Isrc;
/// <summary>
/// Control / attribute bitfield (see file documentation for suggested bit mapping).
/// </summary>
public byte Flags;
}
#endregion
}