diff --git a/Aaru.CommonTypes b/Aaru.CommonTypes
index 069a2e39c..60947168a 160000
--- a/Aaru.CommonTypes
+++ b/Aaru.CommonTypes
@@ -1 +1 @@
-Subproject commit 069a2e39cc118e420237022873f8d376b33b2a90
+Subproject commit 60947168aa7b284b976536f22cd84cb2afc98bbe
diff --git a/Aaru.Core/Aaru.Core.csproj b/Aaru.Core/Aaru.Core.csproj
index dd1605114..13482b375 100644
--- a/Aaru.Core/Aaru.Core.csproj
+++ b/Aaru.Core/Aaru.Core.csproj
@@ -118,7 +118,6 @@
-
@@ -209,7 +208,7 @@
-
+
diff --git a/Aaru.Core/Delegates.cs b/Aaru.Core/Delegates.cs
deleted file mode 100644
index a200e150b..000000000
--- a/Aaru.Core/Delegates.cs
+++ /dev/null
@@ -1,88 +0,0 @@
-// /***************************************************************************
-// Aaru Data Preservation Suite
-// ----------------------------------------------------------------------------
-//
-// Filename : Delegates.cs
-// Author(s) : Natalia Portillo
-//
-// Component : Core algorithms.
-//
-// --[ Description ] ----------------------------------------------------------
-//
-// Delegates to communicate with user interface.
-//
-// --[ License ] --------------------------------------------------------------
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as
-// published by the Free Software Foundation, either version 3 of the
-// License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-//
-// ----------------------------------------------------------------------------
-// Copyright © 2011-2020 Natalia Portillo
-// ****************************************************************************/
-
-namespace Aaru.Core
-{
- /// Initializes a progress indicator (e.g. makes a progress bar visible)
- public delegate void InitProgressHandler();
-
- /// Updates a progress indicator with text
- public delegate void UpdateProgressHandler(string text, long current, long maximum);
-
- /// Pulses a progress indicator with indeterminate boundaries
- public delegate void PulseProgressHandler(string text);
-
- /// Uninitializes a progress indicator (e.g. adds a newline to the console)
- public delegate void EndProgressHandler();
-
- /// Initializes a secondary progress indicator (e.g. makes a progress bar visible)
- public delegate void InitProgressHandler2();
-
- /// Updates a secondary progress indicator with text
- public delegate void UpdateProgressHandler2(string text, long current, long maximum);
-
- /// Pulses a secondary progress indicator with indeterminate boundaries
- public delegate void PulseProgressHandler2(string text);
-
- /// Uninitializes a secondary progress indicator (e.g. adds a newline to the console)
- public delegate void EndProgressHandler2();
-
- /// Initializes two progress indicators (e.g. makes a progress bar visible)
- public delegate void InitTwoProgressHandler();
-
- /// Updates two progress indicators with text
- public delegate void UpdateTwoProgressHandler(string text, long current, long maximum, string text2, long current2,
- long maximum2);
-
- /// Pulses a progress indicator with indeterminate boundaries
- public delegate void PulseTwoProgressHandler(string text, string text2);
-
- /// Uninitializes a progress indicator (e.g. adds a newline to the console)
- public delegate void EndTwoProgressHandler();
-
- /// Updates a status indicator
- public delegate void UpdateStatusHandler(string text);
-
- /// Shows an error message
- public delegate void ErrorMessageHandler(string text);
-
- public delegate void InitBlockMapHandler(ulong blocks, ulong blockSize, ulong blocksToRead, ushort currentProfile);
-
- /// Updates lists of time taken on scanning from the specified sector
- /// Time in milliseconds
- public delegate void ScanTimeHandler(ulong sector, double duration);
-
- /// Specified a number of blocks could not be read on scan
- public delegate void ScanUnreadableHandler(ulong sector);
-
- public delegate void ScanSpeedHandler(ulong sector, double currentSpeed);
-}
\ No newline at end of file
diff --git a/Aaru.Core/Devices/Dumping/CompactDisc/Pregap.cs b/Aaru.Core/Devices/Dumping/CompactDisc/Pregap.cs
index b1bac629a..f11627d4f 100644
--- a/Aaru.Core/Devices/Dumping/CompactDisc/Pregap.cs
+++ b/Aaru.Core/Devices/Dumping/CompactDisc/Pregap.cs
@@ -35,6 +35,7 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using Aaru.Checksums;
+using Aaru.CommonTypes;
using Aaru.CommonTypes.Enums;
using Aaru.CommonTypes.Structs;
using Aaru.Console;
@@ -220,7 +221,8 @@ namespace Aaru.Core.Devices.Dumping
if(dumping && dev.Manufacturer.ToLowerInvariant().StartsWith("plextor"))
{
- AaruConsole.DebugWriteLine("Pregap calculator", "Skipping track {0} due to Plextor firmware bug", track.TrackSequence);
+ AaruConsole.DebugWriteLine("Pregap calculator", "Skipping track {0} due to Plextor firmware bug",
+ track.TrackSequence);
continue;
}
diff --git a/Aaru.Core/Devices/Dumping/CompactDisc/Subchannel.cs b/Aaru.Core/Devices/Dumping/CompactDisc/Subchannel.cs
index d0302bd33..5b6e0b6a4 100644
--- a/Aaru.Core/Devices/Dumping/CompactDisc/Subchannel.cs
+++ b/Aaru.Core/Devices/Dumping/CompactDisc/Subchannel.cs
@@ -30,6 +30,7 @@
// Copyright © 2011-2020 Natalia Portillo
// ****************************************************************************/
+using Aaru.CommonTypes;
using Aaru.Core.Logging;
using Aaru.Devices;
diff --git a/Aaru.Core/Devices/Dumping/CompactDisc/Tracks.cs b/Aaru.Core/Devices/Dumping/CompactDisc/Tracks.cs
index 1fa0c06ce..d5c96c205 100644
--- a/Aaru.Core/Devices/Dumping/CompactDisc/Tracks.cs
+++ b/Aaru.Core/Devices/Dumping/CompactDisc/Tracks.cs
@@ -33,6 +33,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
+using Aaru.CommonTypes;
using Aaru.CommonTypes.Enums;
using Aaru.CommonTypes.Structs;
using Aaru.Core.Logging;
@@ -112,8 +113,8 @@ namespace Aaru.Core.Devices.Dumping
(TocControl)(trk.CONTROL & 0x0D) == TocControl.DataTrackIncremental
? TrackType.Data : TrackType.Audio,
TrackStartSector =
- (ulong)(((trk.PHOUR * 3600 * 75) + (trk.PMIN * 60 * 75) + (trk.PSEC * 75) +
- trk.PFRAME) - 150),
+ (ulong)((trk.PHOUR * 3600 * 75) + (trk.PMIN * 60 * 75) + (trk.PSEC * 75) + trk.PFRAME -
+ 150),
TrackBytesPerSector = (int)sectorSize,
TrackRawBytesPerSector = (int)sectorSize
});
@@ -158,7 +159,7 @@ namespace Aaru.Core.Devices.Dumping
phour = trk.PHOUR;
}
- lastSector = ((phour * 3600 * 75) + (pmin * 60 * 75) + (psec * 75) + pframe) - 150;
+ lastSector = (phour * 3600 * 75) + (pmin * 60 * 75) + (psec * 75) + pframe - 150;
leadOutStarts?.Add(trk.SessionNumber, lastSector + 1);
}
else if(trk.POINT == 0xA0 &&
diff --git a/Aaru.Core/Devices/Dumping/Dump.cs b/Aaru.Core/Devices/Dumping/Dump.cs
index c92e8a6f8..9fc248bc1 100644
--- a/Aaru.Core/Devices/Dumping/Dump.cs
+++ b/Aaru.Core/Devices/Dumping/Dump.cs
@@ -36,6 +36,7 @@ using System.IO;
using System.Linq;
using System.Text;
using System.Xml.Serialization;
+using Aaru.CommonTypes;
using Aaru.CommonTypes.Enums;
using Aaru.CommonTypes.Interfaces;
using Aaru.CommonTypes.Metadata;
@@ -80,6 +81,7 @@ namespace Aaru.Core.Devices.Dumping
readonly bool _stopOnError;
readonly DumpSubchannel _subchannel;
readonly bool _trim;
+ readonly bool _useBufferedReads;
bool _aborted;
AaruContext _ctx; // Main database context
Database.Models.Device _dbDev; // Device database entry
@@ -93,7 +95,6 @@ namespace Aaru.Core.Devices.Dumping
int _speed;
int _speedMultiplier;
bool _supportsPlextorD8;
- readonly bool _useBufferedReads;
/// Initializes dumpers
/// Should resume?
diff --git a/Aaru.Core/Devices/Scanning/MediaScan.cs b/Aaru.Core/Devices/Scanning/MediaScan.cs
index 91ebb47f9..0273c0e12 100644
--- a/Aaru.Core/Devices/Scanning/MediaScan.cs
+++ b/Aaru.Core/Devices/Scanning/MediaScan.cs
@@ -31,6 +31,7 @@
// ****************************************************************************/
using System;
+using Aaru.CommonTypes;
using Aaru.CommonTypes.Enums;
using Aaru.Devices;
@@ -43,8 +44,8 @@ namespace Aaru.Core.Devices.Scanning
readonly string _ibgLogPath;
readonly string _mhddLogPath;
readonly bool _seekTest;
- bool _aborted;
readonly bool _useBufferedReads;
+ bool _aborted;
/// Path to a MHDD log file
/// Path to a IMGBurn log file
diff --git a/Aaru.Core/Entropy.cs b/Aaru.Core/Entropy.cs
index e9f41a6d3..e4ad390ca 100644
--- a/Aaru.Core/Entropy.cs
+++ b/Aaru.Core/Entropy.cs
@@ -34,6 +34,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
using Aaru.Checksums;
+using Aaru.CommonTypes;
using Aaru.CommonTypes.Interfaces;
using Aaru.CommonTypes.Structs;
using Aaru.Console;
diff --git a/Aaru.Core/Media/CompactDisc.cs b/Aaru.Core/Media/CompactDisc.cs
index bcda37e6e..5d2ff8434 100644
--- a/Aaru.Core/Media/CompactDisc.cs
+++ b/Aaru.Core/Media/CompactDisc.cs
@@ -30,6 +30,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
using Aaru.Checksums;
+using Aaru.CommonTypes;
using Aaru.CommonTypes.Enums;
using Aaru.CommonTypes.Interfaces;
using Aaru.CommonTypes.Structs;
@@ -255,13 +256,13 @@ namespace Aaru.Core.Media
!rwOk)
continue;
- aframe = (byte)(((q[9] / 16) * 10) + (q[9] & 0x0F));
+ aframe = (byte)((q[9] / 16 * 10) + (q[9] & 0x0F));
if((q[0] & 0x3) == 1)
{
- amin = (byte)(((q[7] / 16) * 10) + (q[7] & 0x0F));
- asec = (byte)(((q[8] / 16) * 10) + (q[8] & 0x0F));
- aPos = ((amin * 60 * 75) + (asec * 75) + aframe) - 150;
+ amin = (byte)((q[7] / 16 * 10) + (q[7] & 0x0F));
+ asec = (byte)((q[8] / 16 * 10) + (q[8] & 0x0F));
+ aPos = (amin * 60 * 75) + (asec * 75) + aframe - 150;
}
else
{
@@ -270,7 +271,7 @@ namespace Aaru.Core.Media
expectedSectorAddress -= (ulong)(smin * 60 * 75);
ssec = (byte)(expectedSectorAddress / 75);
- aPos = ((smin * 60 * 75) + (ssec * 75) + aframe) - 150;
+ aPos = (smin * 60 * 75) + (ssec * 75) + aframe - 150;
// Next second
if(aPos < prePos)
@@ -389,7 +390,7 @@ namespace Aaru.Core.Media
case 1 when !crcOk: continue;
case 1:
{
- byte trackNo = (byte)(((q[1] / 16) * 10) + (q[1] & 0x0F));
+ byte trackNo = (byte)((q[1] / 16 * 10) + (q[1] & 0x0F));
for(int i = 0; i < tracks.Length; i++)
{
@@ -400,9 +401,9 @@ namespace Aaru.Core.Media
if(q[2] == 0 &&
trackNo > 1)
{
- byte pmin = (byte)(((q[3] / 16) * 10) + (q[3] & 0x0F));
- byte psec = (byte)(((q[4] / 16) * 10) + (q[4] & 0x0F));
- byte pframe = (byte)(((q[5] / 16) * 10) + (q[5] & 0x0F));
+ byte pmin = (byte)((q[3] / 16 * 10) + (q[3] & 0x0F));
+ byte psec = (byte)((q[4] / 16 * 10) + (q[4] & 0x0F));
+ byte pframe = (byte)((q[5] / 16 * 10) + (q[5] & 0x0F));
int qPos = (pmin * 60 * 75) + (psec * 75) + pframe;
// When we are dumping we calculate the pregap in reverse from index 1 back.
@@ -454,10 +455,10 @@ namespace Aaru.Core.Media
if(q[2] == 0)
continue;
- byte amin = (byte)(((q[7] / 16) * 10) + (q[7] & 0x0F));
- byte asec = (byte)(((q[8] / 16) * 10) + (q[8] & 0x0F));
- byte aframe = (byte)(((q[9] / 16) * 10) + (q[9] & 0x0F));
- int aPos = ((amin * 60 * 75) + (asec * 75) + aframe) - 150;
+ byte amin = (byte)((q[7] / 16 * 10) + (q[7] & 0x0F));
+ byte asec = (byte)((q[8] / 16 * 10) + (q[8] & 0x0F));
+ byte aframe = (byte)((q[9] / 16 * 10) + (q[9] & 0x0F));
+ int aPos = (amin * 60 * 75) + (asec * 75) + aframe - 150;
if(tracks[i].Indexes.ContainsKey(q[2]) &&
aPos >= tracks[i].Indexes[q[2]])
@@ -863,8 +864,8 @@ namespace Aaru.Core.Media
byte[] preQ = new byte[12];
byte[] nextQ = new byte[12];
- Array.Copy(deSub, (subPos + 12) - 96, preQ, 0, 12);
- Array.Copy(deSub, subPos + 12 + 96, nextQ, 0, 12);
+ Array.Copy(deSub, subPos + 12 - 96, preQ, 0, 12);
+ Array.Copy(deSub, subPos + 12 + 96, nextQ, 0, 12);
bool status;
CRC16CCITTContext.Data(preQ, 10, out byte[] preCrc);
@@ -1026,14 +1027,14 @@ namespace Aaru.Core.Media
}
}
- amin = (byte)(((q[7] / 16) * 10) + (q[7] & 0x0F));
- asec = (byte)(((q[8] / 16) * 10) + (q[8] & 0x0F));
- aframe = (byte)(((q[9] / 16) * 10) + (q[9] & 0x0F));
- aPos = ((amin * 60 * 75) + (asec * 75) + aframe) - 150;
+ amin = (byte)((q[7] / 16 * 10) + (q[7] & 0x0F));
+ asec = (byte)((q[8] / 16 * 10) + (q[8] & 0x0F));
+ aframe = (byte)((q[9] / 16 * 10) + (q[9] & 0x0F));
+ aPos = (amin * 60 * 75) + (asec * 75) + aframe - 150;
- pmin = (byte)(((q[3] / 16) * 10) + (q[3] & 0x0F));
- psec = (byte)(((q[4] / 16) * 10) + (q[4] & 0x0F));
- pframe = (byte)(((q[5] / 16) * 10) + (q[5] & 0x0F));
+ pmin = (byte)((q[3] / 16 * 10) + (q[3] & 0x0F));
+ psec = (byte)((q[4] / 16 * 10) + (q[4] & 0x0F));
+ pframe = (byte)((q[5] / 16 * 10) + (q[5] & 0x0F));
pPos = (pmin * 60 * 75) + (psec * 75) + pframe;
// TODO: pregap
@@ -1043,9 +1044,9 @@ namespace Aaru.Core.Media
// Previous was not pregap either
if(preQ[2] > 0 && preCrcOk)
{
- rmin = (byte)(((preQ[3] / 16) * 10) + (preQ[3] & 0x0F));
- rsec = (byte)(((preQ[4] / 16) * 10) + (preQ[4] & 0x0F));
- rframe = (byte)(((preQ[5] / 16) * 10) + (preQ[5] & 0x0F));
+ rmin = (byte)((preQ[3] / 16 * 10) + (preQ[3] & 0x0F));
+ rsec = (byte)((preQ[4] / 16 * 10) + (preQ[4] & 0x0F));
+ rframe = (byte)((preQ[5] / 16 * 10) + (preQ[5] & 0x0F));
rPos = (rmin * 60 * 75) + (rsec * 75) + rframe;
dPos = pPos - rPos;
@@ -1100,9 +1101,9 @@ namespace Aaru.Core.Media
nextCrcOk &&
!fixedRelPos)
{
- rmin = (byte)(((nextQ[3] / 16) * 10) + (nextQ[3] & 0x0F));
- rsec = (byte)(((nextQ[4] / 16) * 10) + (nextQ[4] & 0x0F));
- rframe = (byte)(((nextQ[5] / 16) * 10) + (nextQ[5] & 0x0F));
+ rmin = (byte)((nextQ[3] / 16 * 10) + (nextQ[3] & 0x0F));
+ rsec = (byte)((nextQ[4] / 16 * 10) + (nextQ[4] & 0x0F));
+ rframe = (byte)((nextQ[5] / 16 * 10) + (nextQ[5] & 0x0F));
rPos = (rmin * 60 * 75) + (rsec * 75) + rframe;
dPos = rPos - pPos;
@@ -1160,10 +1161,10 @@ namespace Aaru.Core.Media
// Previous Q's CRC is correct
if(preCrcOk)
{
- rmin = (byte)(((preQ[7] / 16) * 10) + (preQ[7] & 0x0F));
- rsec = (byte)(((preQ[8] / 16) * 10) + (preQ[8] & 0x0F));
- rframe = (byte)(((preQ[9] / 16) * 10) + (preQ[9] & 0x0F));
- rPos = ((rmin * 60 * 75) + (rsec * 75) + rframe) - 150;
+ rmin = (byte)((preQ[7] / 16 * 10) + (preQ[7] & 0x0F));
+ rsec = (byte)((preQ[8] / 16 * 10) + (preQ[8] & 0x0F));
+ rframe = (byte)((preQ[9] / 16 * 10) + (preQ[9] & 0x0F));
+ rPos = (rmin * 60 * 75) + (rsec * 75) + rframe - 150;
dPos = aPos - rPos;
@@ -1217,10 +1218,10 @@ namespace Aaru.Core.Media
nextCrcOk &&
!fixedAbsPos)
{
- rmin = (byte)(((nextQ[7] / 16) * 10) + (nextQ[7] & 0x0F));
- rsec = (byte)(((nextQ[8] / 16) * 10) + (nextQ[8] & 0x0F));
- rframe = (byte)(((nextQ[9] / 16) * 10) + (nextQ[9] & 0x0F));
- rPos = ((rmin * 60 * 75) + (rsec * 75) + rframe) - 150;
+ rmin = (byte)((nextQ[7] / 16 * 10) + (nextQ[7] & 0x0F));
+ rsec = (byte)((nextQ[8] / 16 * 10) + (nextQ[8] & 0x0F));
+ rframe = (byte)((nextQ[9] / 16 * 10) + (nextQ[9] & 0x0F));
+ rPos = (rmin * 60 * 75) + (rsec * 75) + rframe - 150;
dPos = rPos - pPos;
@@ -1283,18 +1284,18 @@ namespace Aaru.Core.Media
// Previous Q's CRC is correct
if(preCrcOk)
{
- rmin = (byte)(((preQ[7] / 16) * 10) + (preQ[7] & 0x0F));
- rsec = (byte)(((preQ[8] / 16) * 10) + (preQ[8] & 0x0F));
- rframe = (byte)(((preQ[9] / 16) * 10) + (preQ[9] & 0x0F));
- rPos = ((rmin * 60 * 75) + (rsec * 75) + rframe) - 150;
+ rmin = (byte)((preQ[7] / 16 * 10) + (preQ[7] & 0x0F));
+ rsec = (byte)((preQ[8] / 16 * 10) + (preQ[8] & 0x0F));
+ rframe = (byte)((preQ[9] / 16 * 10) + (preQ[9] & 0x0F));
+ rPos = (rmin * 60 * 75) + (rsec * 75) + rframe - 150;
dPos = aPos - rPos;
bool absOk = dPos == 1;
- rmin = (byte)(((preQ[3] / 16) * 10) + (preQ[3] & 0x0F));
- rsec = (byte)(((preQ[4] / 16) * 10) + (preQ[4] & 0x0F));
- rframe = (byte)(((preQ[5] / 16) * 10) + (preQ[5] & 0x0F));
+ rmin = (byte)((preQ[3] / 16 * 10) + (preQ[3] & 0x0F));
+ rsec = (byte)((preQ[4] / 16 * 10) + (preQ[4] & 0x0F));
+ rframe = (byte)((preQ[5] / 16 * 10) + (preQ[5] & 0x0F));
rPos = (rmin * 60 * 75) + (rsec * 75) + rframe;
dPos = pPos - rPos;
@@ -1321,18 +1322,18 @@ namespace Aaru.Core.Media
// Next Q's CRC is correct
if(nextCrcOk)
{
- rmin = (byte)(((nextQ[7] / 16) * 10) + (nextQ[7] & 0x0F));
- rsec = (byte)(((nextQ[8] / 16) * 10) + (nextQ[8] & 0x0F));
- rframe = (byte)(((nextQ[9] / 16) * 10) + (nextQ[9] & 0x0F));
- rPos = ((rmin * 60 * 75) + (rsec * 75) + rframe) - 150;
+ rmin = (byte)((nextQ[7] / 16 * 10) + (nextQ[7] & 0x0F));
+ rsec = (byte)((nextQ[8] / 16 * 10) + (nextQ[8] & 0x0F));
+ rframe = (byte)((nextQ[9] / 16 * 10) + (nextQ[9] & 0x0F));
+ rPos = (rmin * 60 * 75) + (rsec * 75) + rframe - 150;
dPos = rPos - aPos;
bool absOk = dPos == 1;
- rmin = (byte)(((nextQ[3] / 16) * 10) + (nextQ[3] & 0x0F));
- rsec = (byte)(((nextQ[4] / 16) * 10) + (nextQ[4] & 0x0F));
- rframe = (byte)(((nextQ[5] / 16) * 10) + (nextQ[5] & 0x0F));
+ rmin = (byte)((nextQ[3] / 16 * 10) + (nextQ[3] & 0x0F));
+ rsec = (byte)((nextQ[4] / 16 * 10) + (nextQ[4] & 0x0F));
+ rframe = (byte)((nextQ[5] / 16 * 10) + (nextQ[5] & 0x0F));
rPos = (rmin * 60 * 75) + (rsec * 75) + rframe;
dPos = rPos - pPos;
@@ -1366,8 +1367,8 @@ namespace Aaru.Core.Media
// Previous Q's CRC is correct
if(preCrcOk)
{
- rframe = (byte)(((preQ[9] / 16) * 10) + (preQ[9] & 0x0F));
- aframe = (byte)(((q[9] / 16) * 10) + (q[9] & 0x0F));
+ rframe = (byte)((preQ[9] / 16 * 10) + (preQ[9] & 0x0F));
+ aframe = (byte)((q[9] / 16 * 10) + (q[9] & 0x0F));
if(aframe - rframe != 1)
{
@@ -1394,8 +1395,8 @@ namespace Aaru.Core.Media
// Next Q's CRC is correct
else if(nextCrcOk)
{
- rframe = (byte)(((nextQ[9] / 16) * 10) + (nextQ[9] & 0x0F));
- aframe = (byte)(((q[9] / 16) * 10) + (q[9] & 0x0F));
+ rframe = (byte)((nextQ[9] / 16 * 10) + (nextQ[9] & 0x0F));
+ aframe = (byte)((q[9] / 16 * 10) + (q[9] & 0x0F));
if(aframe - rframe != 1)
{
@@ -1459,8 +1460,8 @@ namespace Aaru.Core.Media
// Previous Q's CRC is correct
if(preCrcOk)
{
- rframe = (byte)(((preQ[9] / 16) * 10) + (preQ[9] & 0x0F));
- aframe = (byte)(((q[9] / 16) * 10) + (q[9] & 0x0F));
+ rframe = (byte)((preQ[9] / 16 * 10) + (preQ[9] & 0x0F));
+ aframe = (byte)((q[9] / 16 * 10) + (q[9] & 0x0F));
if(aframe - rframe != 1)
{
@@ -1487,8 +1488,8 @@ namespace Aaru.Core.Media
// Next Q's CRC is correct
else if(nextCrcOk)
{
- rframe = (byte)(((nextQ[9] / 16) * 10) + (nextQ[9] & 0x0F));
- aframe = (byte)(((q[9] / 16) * 10) + (q[9] & 0x0F));
+ rframe = (byte)((nextQ[9] / 16 * 10) + (nextQ[9] & 0x0F));
+ aframe = (byte)((q[9] / 16 * 10) + (q[9] & 0x0F));
if(aframe - rframe != 1)
{
diff --git a/Aaru.Core/Sidecar/Events.cs b/Aaru.Core/Sidecar/Events.cs
index 353437f94..acbd8015e 100644
--- a/Aaru.Core/Sidecar/Events.cs
+++ b/Aaru.Core/Sidecar/Events.cs
@@ -30,6 +30,8 @@
// Copyright © 2011-2020 Natalia Portillo
// ****************************************************************************/
+using Aaru.CommonTypes;
+
namespace Aaru.Core
{
public sealed partial class Sidecar