mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Code restyling.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user