diff --git a/Aaru.Core/Devices/Dumping/CompactDisc/CdiReady.cs b/Aaru.Core/Devices/Dumping/CompactDisc/CdiReady.cs
index 86dbcbfd7..047fffcd3 100644
--- a/Aaru.Core/Devices/Dumping/CompactDisc/CdiReady.cs
+++ b/Aaru.Core/Devices/Dumping/CompactDisc/CdiReady.cs
@@ -197,7 +197,6 @@ namespace Aaru.Core.Devices.Dumping
if(cdiReadyReadAsAudio)
{
- // TODO: FreeBSD bug
if(offsetBytes < 0)
{
if(i == 0)
diff --git a/Aaru.Core/Devices/Dumping/CompactDisc/Data.cs b/Aaru.Core/Devices/Dumping/CompactDisc/Data.cs
index 2844c9187..bc04948e3 100644
--- a/Aaru.Core/Devices/Dumping/CompactDisc/Data.cs
+++ b/Aaru.Core/Devices/Dumping/CompactDisc/Data.cs
@@ -221,7 +221,6 @@ namespace Aaru.Core.Devices.Dumping
if(_fixOffset && !inData)
{
- // TODO: FreeBSD bug
if(offsetBytes < 0)
{
if(i == 0)
diff --git a/Aaru.Core/Devices/Dumping/CompactDisc/Dump.cs b/Aaru.Core/Devices/Dumping/CompactDisc/Dump.cs
index 327e8565e..92a00d058 100644
--- a/Aaru.Core/Devices/Dumping/CompactDisc/Dump.cs
+++ b/Aaru.Core/Devices/Dumping/CompactDisc/Dump.cs
@@ -46,7 +46,6 @@ using Aaru.Database.Models;
using Aaru.Decoders.CD;
using Aaru.Devices;
using Schemas;
-using PlatformID = Aaru.CommonTypes.Interop.PlatformID;
using TrackType = Aaru.CommonTypes.Enums.TrackType;
using Version = Aaru.CommonTypes.Interop.Version;
@@ -64,63 +63,63 @@ namespace Aaru.Core.Devices.Dumping
/// Dumps a compact disc
void CompactDisc()
{
- ExtentsULong audioExtents; // Extents with audio sectors
- ulong blocks; // Total number of positive sectors
- uint blockSize; // Size of the read sector in bytes
- CdOffset cdOffset; // Read offset from database
- byte[] cmdBuf; // Data buffer
- DumpHardwareType currentTry = null; // Current dump hardware try
- double currentSpeed = 0; // Current read speed
- int? discOffset = null; // Disc write offset
- DateTime dumpStart = DateTime.UtcNow; // Time of dump start
- DateTime end; // Time of operation end
- ExtentsULong extents = null; // Extents
- bool hiddenData; // Hidden track is data
- IbgLog ibgLog; // IMGBurn log
- double imageWriteDuration = 0; // Duration of image write
- long lastSector; // Last sector number
+ ExtentsULong audioExtents; // Extents with audio sectors
+ ulong blocks; // Total number of positive sectors
+ uint blockSize; // Size of the read sector in bytes
+ CdOffset cdOffset; // Read offset from database
+ byte[] cmdBuf; // Data buffer
+ DumpHardwareType currentTry = null; // Current dump hardware try
+ double currentSpeed = 0; // Current read speed
+ int? discOffset = null; // Disc write offset
+ DateTime dumpStart = DateTime.UtcNow; // Time of dump start
+ DateTime end; // Time of operation end
+ ExtentsULong extents = null; // Extents
+ bool hiddenData; // Hidden track is data
+ IbgLog ibgLog; // IMGBurn log
+ double imageWriteDuration = 0; // Duration of image write
+ long lastSector; // Last sector number
var leadOutExtents = new ExtentsULong(); // Lead-out extents
- Dictionary leadOutStarts = new Dictionary(); // Lead-out starts
- double maxSpeed = double.MinValue; // Maximum speed
- MhddLog mhddLog; // MHDD log
- double minSpeed = double.MaxValue; // Minimum speed
- bool newTrim; // Is trim a new one?
- int offsetBytes = 0; // Read offset
- bool read6 = false; // Device supports READ(6)
- bool read10 = false; // Device supports READ(10)
- bool read12 = false; // Device supports READ(12)
- bool read16 = false; // Device supports READ(16)
- bool readcd; // Device supports READ CD
- bool ret; // Image writing return status
- const uint sectorSize = 2352; // Full sector size
- int sectorsForOffset = 0; // Sectors needed to fix offset
- bool sense = true; // Sense indicator
- int sessions; // Number of sessions in disc
- DateTime start; // Start of operation
- SubchannelLog subLog = null; // Subchannel log
- uint subSize; // Subchannel size in bytes
- TrackSubchannelType subType; // Track subchannel type
- bool supportsLongSectors = true; // Supports reading EDC and ECC
- bool supportsPqSubchannel; // Supports reading PQ subchannel
- bool supportsRwSubchannel; // Supports reading RW subchannel
- byte[] tmpBuf; // Temporary buffer
- FullTOC.CDFullTOC? toc; // Full CD TOC
- double totalDuration = 0; // Total commands duration
- Dictionary trackFlags = new Dictionary(); // Track flags
- Track[] tracks; // Tracks in disc
- int firstTrackLastSession; // Number of first track in last session
- bool hiddenTrack; // Disc has a hidden track before track 1
- MmcSubchannel supportedSubchannel; // Drive's maximum supported subchannel
- MmcSubchannel desiredSubchannel; // User requested subchannel
- bool bcdSubchannel = false; // Subchannel positioning is in BCD
- Dictionary isrcs = new Dictionary();
+ Dictionary leadOutStarts = new(); // Lead-out starts
+ double maxSpeed = double.MinValue; // Maximum speed
+ MhddLog mhddLog; // MHDD log
+ double minSpeed = double.MaxValue; // Minimum speed
+ bool newTrim; // Is trim a new one?
+ int offsetBytes = 0; // Read offset
+ bool read6 = false; // Device supports READ(6)
+ bool read10 = false; // Device supports READ(10)
+ bool read12 = false; // Device supports READ(12)
+ bool read16 = false; // Device supports READ(16)
+ bool readcd; // Device supports READ CD
+ bool ret; // Image writing return status
+ const uint sectorSize = 2352; // Full sector size
+ int sectorsForOffset = 0; // Sectors needed to fix offset
+ bool sense = true; // Sense indicator
+ int sessions; // Number of sessions in disc
+ DateTime start; // Start of operation
+ SubchannelLog subLog = null; // Subchannel log
+ uint subSize; // Subchannel size in bytes
+ TrackSubchannelType subType; // Track subchannel type
+ bool supportsLongSectors = true; // Supports reading EDC and ECC
+ bool supportsPqSubchannel; // Supports reading PQ subchannel
+ bool supportsRwSubchannel; // Supports reading RW subchannel
+ byte[] tmpBuf; // Temporary buffer
+ FullTOC.CDFullTOC? toc; // Full CD TOC
+ double totalDuration = 0; // Total commands duration
+ Dictionary trackFlags = new(); // Track flags
+ Track[] tracks; // Tracks in disc
+ int firstTrackLastSession; // Number of first track in last session
+ bool hiddenTrack; // Disc has a hidden track before track 1
+ MmcSubchannel supportedSubchannel; // Drive's maximum supported subchannel
+ MmcSubchannel desiredSubchannel; // User requested subchannel
+ bool bcdSubchannel = false; // Subchannel positioning is in BCD
+ Dictionary isrcs = new();
string mcn = null;
- HashSet subchannelExtents = new HashSet();
+ HashSet subchannelExtents = new();
bool cdiReadyReadAsAudio = false;
uint firstLba;
- Dictionary mediaTags = new Dictionary(); // Media tags
- Dictionary smallestPregapLbaPerTrack = new Dictionary();
+ Dictionary mediaTags = new(); // Media tags
+ Dictionary smallestPregapLbaPerTrack = new();
MediaType dskType = MediaType.CD;
@@ -565,7 +564,7 @@ namespace Aaru.Core.Devices.Dumping
_dumpLog.WriteLine("Disc contains a hidden track...");
UpdateStatus?.Invoke("Disc contains a hidden track...");
- List