Code restyling.

This commit is contained in:
2020-02-29 18:03:33 +00:00
parent 9abc956373
commit a43b4132ee
40 changed files with 2701 additions and 2473 deletions

View File

@@ -61,22 +61,22 @@ namespace Aaru.Decoders.CD
if(decoded.DataLength + 2 != CDSessionInfoResponse.Length)
{
AaruConsole.DebugWriteLine("CD Session Info decoder",
"Expected CDSessionInfo size ({0} bytes) is not received size ({1} bytes), not decoding",
decoded.DataLength + 2, CDSessionInfoResponse.Length);
"Expected CDSessionInfo size ({0} bytes) is not received size ({1} bytes), not decoding",
decoded.DataLength + 2, CDSessionInfoResponse.Length);
return null;
}
for(int i = 0; i < (decoded.DataLength - 2) / 8; i++)
{
decoded.TrackDescriptors[i].Reserved1 = CDSessionInfoResponse[0 + i * 8 + 4];
decoded.TrackDescriptors[i].ADR = (byte)((CDSessionInfoResponse[1 + i * 8 + 4] & 0xF0) >> 4);
decoded.TrackDescriptors[i].CONTROL = (byte)(CDSessionInfoResponse[1 + i * 8 + 4] & 0x0F);
decoded.TrackDescriptors[i].TrackNumber = CDSessionInfoResponse[2 + i * 8 + 4];
decoded.TrackDescriptors[i].Reserved2 = CDSessionInfoResponse[3 + i * 8 + 4];
decoded.TrackDescriptors[i].Reserved1 = CDSessionInfoResponse[0 + (i * 8) + 4];
decoded.TrackDescriptors[i].ADR = (byte)((CDSessionInfoResponse[1 + (i * 8) + 4] & 0xF0) >> 4);
decoded.TrackDescriptors[i].CONTROL = (byte)(CDSessionInfoResponse[1 + (i * 8) + 4] & 0x0F);
decoded.TrackDescriptors[i].TrackNumber = CDSessionInfoResponse[2 + (i * 8) + 4];
decoded.TrackDescriptors[i].Reserved2 = CDSessionInfoResponse[3 + (i * 8) + 4];
decoded.TrackDescriptors[i].TrackStartAddress =
BigEndianBitConverter.ToUInt32(CDSessionInfoResponse, 4 + i * 8 + 4);
BigEndianBitConverter.ToUInt32(CDSessionInfoResponse, 4 + (i * 8) + 4);
}
return decoded;