Add more possible values for track mode and index handling in CloneCD disc images.

This commit is contained in:
2021-07-11 19:51:50 +01:00
parent 5ae5c069a2
commit 1d512bd8e5

View File

@@ -604,8 +604,10 @@ namespace Aaru.DiscImages
if(trackModes.TryGetValue((byte)tmpTrack.TrackSequence, out int trackMode))
tmpTrack.TrackType = trackMode switch
{
0 => TrackType.Audio,
1 => TrackType.CdMode1,
2 => TrackType.CdMode2Formless
2 => TrackType.CdMode2Formless,
_ => TrackType.Data
};
if(trackIndexes.TryGetValue((byte)tmpTrack.TrackSequence, out Dictionary<byte, int> indexes))
@@ -616,7 +618,7 @@ namespace Aaru.DiscImages
continue;
// Untested as of 20210711
tmpTrack.Indexes[trackIndex.Key] = tmpTrack.Indexes[1] + trackIndex.Value;
tmpTrack.Indexes[trackIndex.Key] = trackIndex.Value;
}
}