Change when first track pregap is read.

This commit is contained in:
2020-03-09 20:23:21 +00:00
parent 32c8d6a2d9
commit 8528f9103f

View File

@@ -599,10 +599,6 @@ namespace Aaru.Core.Devices.Dumping
} }
} }
// Try to read the first track pregap
if(_dumpFirstTrackPregap && readcd)
ReadCdFirstTrackPregap(blockSize, ref currentSpeed, mediaTags, supportedSubchannel, ref totalDuration);
// Try how many blocks are readable at once // Try how many blocks are readable at once
while(true) while(true)
{ {
@@ -658,6 +654,10 @@ namespace Aaru.Core.Devices.Dumping
StoppingErrorMessage?.Invoke($"Device error {_dev.LastError} trying to guess ideal transfer length."); StoppingErrorMessage?.Invoke($"Device error {_dev.LastError} trying to guess ideal transfer length.");
} }
// Try to read the first track pregap
if(_dumpFirstTrackPregap && readcd)
ReadCdFirstTrackPregap(blockSize, ref currentSpeed, mediaTags, supportedSubchannel, ref totalDuration);
_dumpLog.WriteLine("Reading {0} sectors at a time.", _maximumReadable); _dumpLog.WriteLine("Reading {0} sectors at a time.", _maximumReadable);
_dumpLog.WriteLine("Device reports {0} blocks ({1} bytes).", blocks, blocks * blockSize); _dumpLog.WriteLine("Device reports {0} blocks ({1} bytes).", blocks, blocks * blockSize);
_dumpLog.WriteLine("Device can read {0} blocks at a time.", _maximumReadable); _dumpLog.WriteLine("Device can read {0} blocks at a time.", _maximumReadable);
@@ -962,8 +962,7 @@ namespace Aaru.Core.Devices.Dumping
_speed > 0xFFFF) _speed > 0xFFFF)
_speed = 0xFFFF; _speed = 0xFFFF;
_dev.SetCdSpeed(out _, RotationalControl.ClvAndImpureCav, (ushort)_speed, 0, _dev.Timeout, _dev.SetCdSpeed(out _, RotationalControl.ClvAndImpureCav, (ushort)_speed, 0, _dev.Timeout, out _);
out _);
} }
// Start reading // Start reading