From 74328ad3308626eab65bdce5be2ed5fc9ea72295 Mon Sep 17 00:00:00 2001 From: chudov Date: Thu, 25 Mar 2010 05:04:45 +0000 Subject: [PATCH] minor fixes --- CUEControls/BNComboBox.cs | 2 +- CUERipper/frmCUERipper.Designer.cs | 7 - CUERipper/frmCUERipper.cs | 21 ++- CUERipper/frmCUERipper.resx | 14 +- CUETools.Processor/CUETools.Processor.csproj | 3 +- CUETools.Processor/Processor.cs | 7 +- .../CUETools.Ripper.SCSI.csproj | 3 + CUETools.Ripper.SCSI/Resource1.Designer.cs | 27 ++++ CUETools.Ripper.SCSI/Resource1.resx | 9 ++ CUETools.Ripper.SCSI/Resource1.ru-RU.resx | 9 ++ CUETools.Ripper.SCSI/SCSIDrive.cs | 131 ++---------------- CUETools/CUETools.csproj | 2 +- CUETools/Properties/app.manifest | 16 +++ 13 files changed, 106 insertions(+), 145 deletions(-) create mode 100644 CUETools/Properties/app.manifest diff --git a/CUEControls/BNComboBox.cs b/CUEControls/BNComboBox.cs index 0c18a26..d9f4eb8 100644 --- a/CUEControls/BNComboBox.cs +++ b/CUEControls/BNComboBox.cs @@ -285,7 +285,7 @@ namespace BBBNOVA _listBox = new ListBox(); _listBox.IntegralHeight = true; - _listBox.BorderStyle = BorderStyle.FixedSingle; + _listBox.BorderStyle = BorderStyle.None; _listBox.SelectionMode = SelectionMode.One; _listBox.DrawMode = DrawMode.OwnerDrawFixed; _listBox.Font = base.Font; diff --git a/CUERipper/frmCUERipper.Designer.cs b/CUERipper/frmCUERipper.Designer.cs index 3e823e0..7b5abc0 100644 --- a/CUERipper/frmCUERipper.Designer.cs +++ b/CUERipper/frmCUERipper.Designer.cs @@ -282,7 +282,6 @@ namespace CUERipper // bnComboBoxLosslessOrNot // this.bnComboBoxLosslessOrNot.BackColor = System.Drawing.Color.White; - this.bnComboBoxLosslessOrNot.Border = System.Windows.Forms.BorderStyle.FixedSingle; this.bnComboBoxLosslessOrNot.DataSource = this.losslessOrNotBindingSource; this.bnComboBoxLosslessOrNot.DropDownHeight = 200; this.bnComboBoxLosslessOrNot.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; @@ -312,7 +311,6 @@ namespace CUERipper // bnComboBoxEncoder // this.bnComboBoxEncoder.BackColor = System.Drawing.Color.White; - this.bnComboBoxEncoder.Border = System.Windows.Forms.BorderStyle.FixedSingle; this.bnComboBoxEncoder.DataSource = this.encodersBindingSource; this.bnComboBoxEncoder.DropDownHeight = 200; this.bnComboBoxEncoder.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; @@ -343,7 +341,6 @@ namespace CUERipper // bnComboBoxFormat // this.bnComboBoxFormat.BackColor = System.Drawing.Color.White; - this.bnComboBoxFormat.Border = System.Windows.Forms.BorderStyle.FixedSingle; this.bnComboBoxFormat.DataSource = this.formatsBindingSource; this.bnComboBoxFormat.DropDownHeight = 200; this.bnComboBoxFormat.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; @@ -375,7 +372,6 @@ namespace CUERipper // bnComboBoxImage // this.bnComboBoxImage.BackColor = System.Drawing.Color.White; - this.bnComboBoxImage.Border = System.Windows.Forms.BorderStyle.FixedSingle; this.bnComboBoxImage.DataSource = this.cUEStylesBindingSource; this.bnComboBoxImage.DropDownHeight = 200; this.bnComboBoxImage.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; @@ -520,7 +516,6 @@ namespace CUERipper // bnComboBoxRelease // this.bnComboBoxRelease.BackColor = System.Drawing.SystemColors.ControlLightLight; - this.bnComboBoxRelease.Border = System.Windows.Forms.BorderStyle.FixedSingle; this.bnComboBoxRelease.ContextMenuStrip = this.contextMenuStripRelease; this.bnComboBoxRelease.DataSource = this.releasesBindingSource; this.bnComboBoxRelease.DropDownHeight = 200; @@ -556,7 +551,6 @@ namespace CUERipper // bnComboBoxDrives // this.bnComboBoxDrives.BackColor = System.Drawing.SystemColors.ControlLightLight; - this.bnComboBoxDrives.Border = System.Windows.Forms.BorderStyle.FixedSingle; this.bnComboBoxDrives.DataSource = this.drivesBindingSource; this.bnComboBoxDrives.DropDownHeight = 200; this.bnComboBoxDrives.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; @@ -583,7 +577,6 @@ namespace CUERipper // bnComboBoxOutputFormat // this.bnComboBoxOutputFormat.BackColor = System.Drawing.SystemColors.ControlLightLight; - this.bnComboBoxOutputFormat.Border = System.Windows.Forms.BorderStyle.FixedSingle; this.bnComboBoxOutputFormat.DropDownHeight = 200; this.bnComboBoxOutputFormat.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDown; this.bnComboBoxOutputFormat.DropDownWidth = 552; diff --git a/CUERipper/frmCUERipper.cs b/CUERipper/frmCUERipper.cs index f384152..5064d43 100644 --- a/CUERipper/frmCUERipper.cs +++ b/CUERipper/frmCUERipper.cs @@ -319,7 +319,7 @@ namespace CUERipper bool submit = cueSheet.CTDB.AccResult == HttpStatusCode.NotFound || cueSheet.CTDB.AccResult == HttpStatusCode.OK; - //_cueSheet.CTDB.AccResult == HttpStatusCode.NoContent; + //_cueSheet.CTDB.AccResult == HttpStatusCode.NoContent; DBEntry confirm = null; submit &= audioSource.CorrectionQuality > 0; @@ -343,7 +343,6 @@ namespace CUERipper cueSheet.Artist, cueSheet.Title); } - //CUESheet.WriteText(_pathOut, _cueSheet.CUESheetContents(_style)); //CUESheet.WriteText(Path.ChangeExtension(_pathOut, ".log"), _cueSheet.LOGContents()); } @@ -362,9 +361,23 @@ namespace CUERipper }); } #endif + audioSource.ReadProgress -= new EventHandler(CDReadProgress); - audioSource.Close(); - audioSource.Open(audioSource.Path[0]); + try + { + audioSource.Close(); + audioSource.Open(audioSource.Path[0]); + } + catch (Exception ex) + { + this.BeginInvoke((MethodInvoker)delegate() + { + releases.Clear(); + selectedRelease = null; + bnComboBoxRelease.Text = ex.Message; + }); + } + _workThread = null; this.BeginInvoke((MethodInvoker)delegate() { diff --git a/CUERipper/frmCUERipper.resx b/CUERipper/frmCUERipper.resx index 902ec4e..93d83a0 100644 --- a/CUERipper/frmCUERipper.resx +++ b/CUERipper/frmCUERipper.resx @@ -469,7 +469,7 @@ - AAEAAAD/////AQAAAAAAAAAMAgAAAEJDVUVDb250cm9scywgVmVyc2lvbj0yLjAuNi4wLCBDdWx0dXJl + AAEAAAD/////AQAAAAAAAAAMAgAAAEJDVUVDb250cm9scywgVmVyc2lvbj0yLjAuNy4wLCBDdWx0dXJl PW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwFAQAAABBCQkJOT1ZBLkJOUmFkaXVzBAAAAAhfdG9w TGVmdAlfdG9wUmlnaHQLX2JvdHRvbUxlZnQMX2JvdHRvbVJpZ2h0AAAAAAgICAgCAAAAAgAAAAYAAAAC AAAAAgAAAAs= @@ -501,7 +501,7 @@ - AAEAAAD/////AQAAAAAAAAAMAgAAAEJDVUVDb250cm9scywgVmVyc2lvbj0yLjAuNi4wLCBDdWx0dXJl + AAEAAAD/////AQAAAAAAAAAMAgAAAEJDVUVDb250cm9scywgVmVyc2lvbj0yLjAuNy4wLCBDdWx0dXJl PW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwFAQAAABBCQkJOT1ZBLkJOUmFkaXVzBAAAAAhfdG9w TGVmdAlfdG9wUmlnaHQLX2JvdHRvbUxlZnQMX2JvdHRvbVJpZ2h0AAAAAAgICAgCAAAAAgAAAAYAAAAC AAAAAgAAAAs= @@ -560,7 +560,7 @@ - AAEAAAD/////AQAAAAAAAAAMAgAAAEJDVUVDb250cm9scywgVmVyc2lvbj0yLjAuNi4wLCBDdWx0dXJl + AAEAAAD/////AQAAAAAAAAAMAgAAAEJDVUVDb250cm9scywgVmVyc2lvbj0yLjAuNy4wLCBDdWx0dXJl PW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwFAQAAABBCQkJOT1ZBLkJOUmFkaXVzBAAAAAhfdG9w TGVmdAlfdG9wUmlnaHQLX2JvdHRvbUxlZnQMX2JvdHRvbVJpZ2h0AAAAAAgICAgCAAAAAgAAAAYAAAAC AAAAAgAAAAs= @@ -631,7 +631,7 @@ - AAEAAAD/////AQAAAAAAAAAMAgAAAEJDVUVDb250cm9scywgVmVyc2lvbj0yLjAuNi4wLCBDdWx0dXJl + AAEAAAD/////AQAAAAAAAAAMAgAAAEJDVUVDb250cm9scywgVmVyc2lvbj0yLjAuNy4wLCBDdWx0dXJl PW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwFAQAAABBCQkJOT1ZBLkJOUmFkaXVzBAAAAAhfdG9w TGVmdAlfdG9wUmlnaHQLX2JvdHRvbUxlZnQMX2JvdHRvbVJpZ2h0AAAAAAgICAgCAAAAAgAAAAYAAAAC AAAAAgAAAAs= @@ -976,7 +976,7 @@ - AAEAAAD/////AQAAAAAAAAAMAgAAAEJDVUVDb250cm9scywgVmVyc2lvbj0yLjAuNi4wLCBDdWx0dXJl + AAEAAAD/////AQAAAAAAAAAMAgAAAEJDVUVDb250cm9scywgVmVyc2lvbj0yLjAuNy4wLCBDdWx0dXJl PW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwFAQAAABBCQkJOT1ZBLkJOUmFkaXVzBAAAAAhfdG9w TGVmdAlfdG9wUmlnaHQLX2JvdHRvbUxlZnQMX2JvdHRvbVJpZ2h0AAAAAAgICAgCAAAAAgAAAAYAAAAC AAAAAgAAAAs= @@ -1011,7 +1011,7 @@ - AAEAAAD/////AQAAAAAAAAAMAgAAAEJDVUVDb250cm9scywgVmVyc2lvbj0yLjAuNi4wLCBDdWx0dXJl + AAEAAAD/////AQAAAAAAAAAMAgAAAEJDVUVDb250cm9scywgVmVyc2lvbj0yLjAuNy4wLCBDdWx0dXJl PW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwFAQAAABBCQkJOT1ZBLkJOUmFkaXVzBAAAAAhfdG9w TGVmdAlfdG9wUmlnaHQLX2JvdHRvbUxlZnQMX2JvdHRvbVJpZ2h0AAAAAAgICAgCAAAAAgAAAAYAAAAC AAAAAgAAAAs= @@ -1040,7 +1040,7 @@ - AAEAAAD/////AQAAAAAAAAAMAgAAAEJDVUVDb250cm9scywgVmVyc2lvbj0yLjAuNi4wLCBDdWx0dXJl + AAEAAAD/////AQAAAAAAAAAMAgAAAEJDVUVDb250cm9scywgVmVyc2lvbj0yLjAuNy4wLCBDdWx0dXJl PW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwFAQAAABBCQkJOT1ZBLkJOUmFkaXVzBAAAAAhfdG9w TGVmdAlfdG9wUmlnaHQLX2JvdHRvbUxlZnQMX2JvdHRvbVJpZ2h0AAAAAAgICAgCAAAAAgAAAAYAAAAC AAAAAgAAAAs= diff --git a/CUETools.Processor/CUETools.Processor.csproj b/CUETools.Processor/CUETools.Processor.csproj index 5ca1040..9eb69f9 100644 --- a/CUETools.Processor/CUETools.Processor.csproj +++ b/CUETools.Processor/CUETools.Processor.csproj @@ -47,8 +47,7 @@ pdbonly true ..\bin\Release\ - - + TRACE prompt 4 true diff --git a/CUETools.Processor/Processor.cs b/CUETools.Processor/Processor.cs index 8fe99a7..1cd33eb 100644 --- a/CUETools.Processor/Processor.cs +++ b/CUETools.Processor/Processor.cs @@ -836,7 +836,8 @@ namespace CUETools.Processor try { AssemblyName name = AssemblyName.GetAssemblyName(plugin_path); - Assembly assembly = Assembly.Load(name); + Assembly assembly = Assembly.Load(name, Assembly.GetEntryAssembly().Evidence); + System.Diagnostics.Trace.WriteLine("Loaded " + assembly.FullName); foreach (Type type in assembly.GetExportedTypes()) { try @@ -860,13 +861,13 @@ namespace CUETools.Processor } catch (Exception ex) { - System.Diagnostics.Debug.WriteLine(ex.Message); + System.Diagnostics.Trace.WriteLine(ex.Message); } } } catch (Exception ex) { - System.Diagnostics.Debug.WriteLine(ex.Message); + System.Diagnostics.Trace.WriteLine(ex.Message); } } } diff --git a/CUETools.Ripper.SCSI/CUETools.Ripper.SCSI.csproj b/CUETools.Ripper.SCSI/CUETools.Ripper.SCSI.csproj index e88b313..bf9cbf7 100644 --- a/CUETools.Ripper.SCSI/CUETools.Ripper.SCSI.csproj +++ b/CUETools.Ripper.SCSI/CUETools.Ripper.SCSI.csproj @@ -33,6 +33,9 @@ prompt 4 true + + + true diff --git a/CUETools.Ripper.SCSI/Resource1.Designer.cs b/CUETools.Ripper.SCSI/Resource1.Designer.cs index 356a8f0..47dd15c 100644 --- a/CUETools.Ripper.SCSI/Resource1.Designer.cs +++ b/CUETools.Ripper.SCSI/Resource1.Designer.cs @@ -122,5 +122,32 @@ namespace CUETools.Ripper.SCSI { return ResourceManager.GetString("ReadTOCError", resourceCulture); } } + + /// + /// Looks up a localized string similar to Detecting drive features. + /// + internal static string StatusDetectingDriveFeatures { + get { + return ResourceManager.GetString("StatusDetectingDriveFeatures", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Detecting gaps. + /// + internal static string StatusDetectingGaps { + get { + return ResourceManager.GetString("StatusDetectingGaps", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Ripping. + /// + internal static string StatusRipping { + get { + return ResourceManager.GetString("StatusRipping", resourceCulture); + } + } } } diff --git a/CUETools.Ripper.SCSI/Resource1.resx b/CUETools.Ripper.SCSI/Resource1.resx index ed54146..84caa4e 100644 --- a/CUETools.Ripper.SCSI/Resource1.resx +++ b/CUETools.Ripper.SCSI/Resource1.resx @@ -138,4 +138,13 @@ Cannot open CD + + Detecting drive features + + + Detecting gaps + + + Ripping + \ No newline at end of file diff --git a/CUETools.Ripper.SCSI/Resource1.ru-RU.resx b/CUETools.Ripper.SCSI/Resource1.ru-RU.resx index 5d7bae2..b61b0cf 100644 --- a/CUETools.Ripper.SCSI/Resource1.ru-RU.resx +++ b/CUETools.Ripper.SCSI/Resource1.ru-RU.resx @@ -138,4 +138,13 @@ Ошибка при обращении к диску + + Диагностика устройства + + + Определение зазоров + + + Извлечение аудио + \ No newline at end of file diff --git a/CUETools.Ripper.SCSI/SCSIDrive.cs b/CUETools.Ripper.SCSI/SCSIDrive.cs index 9065ccb..ced2a54 100644 --- a/CUETools.Ripper.SCSI/SCSIDrive.cs +++ b/CUETools.Ripper.SCSI/SCSIDrive.cs @@ -596,7 +596,7 @@ namespace CUETools.Ripper.SCSI { if (ReadProgress != null) { - progressArgs.Action = "Detecting gaps"; + progressArgs.Action = Resource1.StatusDetectingGaps; progressArgs.Pass = -1; progressArgs.Position = (iTrack - _toc2.FirstAudio) * 3; progressArgs.PassStart = 0; @@ -717,6 +717,9 @@ namespace CUETools.Ripper.SCSI m_max_sectors = Math.Min(NSECTORS, m_device.MaximumTransferLength / CB_AUDIO - 1); int sector = 3; int pass = 0; + + _timeout = 10; + for (int c = 0; c <= 2 && !found; c++) for (int r = 0; r <= 1 && !found; r++) for (int m = 0; m <= 1 && !found; m++) @@ -732,7 +735,7 @@ namespace CUETools.Ripper.SCSI DateTime tm = DateTime.Now; if (ReadProgress != null) { - progressArgs.Action = "Detecting drive features"; + progressArgs.Action = Resource1.StatusDetectingDriveFeatures; progressArgs.Pass = -1; progressArgs.Position = pass++; progressArgs.PassStart = 0; @@ -741,10 +744,13 @@ namespace CUETools.Ripper.SCSI progressArgs.PassTime = tm; ReadProgress(this, progressArgs); } + System.Diagnostics.Trace.WriteLine("Trying " + CurrentReadCommand); Device.CommandStatus st = FetchSectors(sector, m_max_sectors, false); TimeSpan delay = DateTime.Now - tm; _autodetectResult += string.Format("{0}: {1} ({2}ms)\n", CurrentReadCommand, (st == Device.CommandStatus.DeviceFailed ? Device.LookupSenseError(m_device.GetSenseAsc(), m_device.GetSenseAscq()) : st.ToString()), delay.TotalMilliseconds); found = st == Device.CommandStatus.Success; + + _timeout = 1; //sector += m_max_sectors; } @@ -766,6 +772,7 @@ namespace CUETools.Ripper.SCSI else _readCDCommand = ReadCDCommand.Unknown; + _timeout = 10; _currentStart = -1; _currentEnd = -1; readCommandFound = found; @@ -977,62 +984,6 @@ namespace CUETools.Ripper.SCSI throw new Exception("wierd IntPtr.Size"); } - private void PrintErrors(int pass, int sector, int Sectors2Read, byte[] realData) - { - //for (int iSector = 0; iSector < Sectors2Read; iSector++) - //{ - // int pos = sector - _currentStart + iSector; - // if (_debugMessages) - // { - // StringBuilder st = new StringBuilder(); - // for (int i = 0; i < 294; i++) - // if (C2Data[pos, i] != 0) - // { - // for (int j = i; j < i + 23; j++) - // if (j < 294) - // st.AppendFormat("{0:X2}", C2Data[_currentScan, pos, j]); - // else - // st.Append(" "); - // System.Console.WriteLine("\rC2 error @{0}[{1:000}]{2};", CDImageLayout.TimeToString((uint)(sector + iSector)), i, st.ToString()); - // return; - // } - - //for (int i = 0; i < 4 * 588; i++) - // if (_currentData[pos * 4 * 588 + i] != realData[pos * 4 * 588 + i]) - // { - // StringBuilder st = new StringBuilder(); - // for (int j = i; j < i + 25; j++) - // if (j < 4 * 588) - // st.AppendFormat("{0:X2}", realData[pos * 4 * 588 + j]); - // else - // st.Append(" "); - // System.Console.WriteLine("\r{0}[--][{1:X3}]{2};", CDImageLayout.TimeToString((uint)(sector + iSector)), i, st.ToString()); - // st.Length = 0; - // for (int result = 0; result <= pass; result++) - // { - // for (int j = i; j < i + 25; j++) - // if (j < 4 * 588) - // st.AppendFormat("{0:X2}", UserData[result, pos, j]); - // else - // st.Append(" "); - // System.Console.WriteLine("\r{0}[{3:X2}][{1:X3}]{2};", CDImageLayout.TimeToString((uint)(sector + iSector)), i, st.ToString(), result); - // st.Length = 0; - // //int c2Bit = 0x80 >> (i % 8); - // //byte value = UserData[result, pos, i]; - // //short score = (short)(1 + (((C2Data[result, pos, i >> 3] & c2Bit) == 0) ? (short) 10 : (short)0)); - // //st.AppendFormat("{0:X2}[{1:X2}]", value, score); - // } - // i += 25; - // //return; - // //while (st.Length < 46) - // // st.Append(' '); - // //System.Console.WriteLine("\rReal error @{0}[{1:000}]{2};", CDImageLayout.TimeToString((uint)(sector + iSector)), i, st.ToString()); - // } - - // } - //} - } - private unsafe void CorrectSectors(int pass, int sector, int Sectors2Read, bool markErrors) { for (int iSector = 0; iSector < Sectors2Read; iSector++) @@ -1082,60 +1033,6 @@ namespace CUETools.Ripper.SCSI int[] errtmp = new int[MSECTORS]; - //private unsafe int CorrectSectorsTest(int start, int end, int c2Score, byte[] realData, int worstScan) - //{ - // int[] valueScore = new int[256]; - // int[] scoreErrors = new int[256]; - // int realErrors = 0; - // int bestScore = 0; - // int _errorsCaught = 0; - // int _falsePositives = 0; - // for (int iSector = 0; iSector < end - start; iSector++) - // { - // for (int iPar = 0; iPar < 4 * 588; iPar++) - // { - // int dataPos = iSector * CB_AUDIO + iPar; - // int c2Pos = iSector * CB_AUDIO + 2 + 4 * 588 + iPar / 8; - // int c2Bit = 0x80 >> (iPar % 8); - - // Array.Clear(valueScore, 0, 256); - - // byte bestValue = _currentScan.Data[dataPos]; - // valueScore[bestValue] += 1 + (((_currentScan.Data[c2Pos] & c2Bit) == 0) ? c2Score : 0); - // int totalScore = valueScore[bestValue]; - // for (int result = 0; result < _scanResults.Count; result++) - // { - // if (result == worstScan) - // continue; - // byte value = _scanResults[result].Data[dataPos]; - // valueScore[value] += 1 + (((_scanResults[result].Data[c2Pos] & c2Bit) == 0) ? c2Score : 0); - // totalScore += 1 + (((_scanResults[result].Data[c2Pos] & c2Bit) == 0) ? c2Score : 0); - // if (valueScore[value] > valueScore[bestValue]) - // bestValue = value; - // } - // if (valueScore[bestValue] < (1 + c2Score + totalScore) / 2) - // _currentErrorsCount++; - // //_currentData[iSector * 4 * 588 + iPar] = bestValue; - // if (realData[iSector * 4 * 588 + iPar] != bestValue) - // { - // if (valueScore[bestValue] > bestScore) - // scoreErrors[valueScore[bestValue]]++; - // realErrors++; - // if (valueScore[bestValue] * 2 <= c2Score + totalScore) - // _errorsCaught++; - // } else - // if (valueScore[bestValue] * 2 <= c2Score + totalScore) - // _falsePositives++; - // } - // } - // //string s = ""; - // //for (int i = 0; i < 256; i++) - // // if (scoreErrors[i] > 0) - // // s += string.Format("[{0}]={1};", i, scoreErrors[i]); - // //System.Console.WriteLine("RE{0:000} EC{1} FP{2}", realErrors, _errorsCaught, _falsePositives); - // return realErrors; - //} - public unsafe void PrefetchSector(int iSector) { if (iSector >= _currentStart && iSector < _currentEnd) @@ -1195,16 +1092,13 @@ namespace CUETools.Ripper.SCSI //TimeSpan delay1 = DateTime.Now - LastFetch; //DateTime LastFetched = DateTime.Now; if (pass >= _correctionQuality) - { CorrectSectors(pass, sector, Sectors2Read, pass == max_scans - 1); - PrintErrors(pass, sector, Sectors2Read, /*realData*/null); - } //TimeSpan delay2 = DateTime.Now - LastFetched; //if (sector == _currentStart) //System.Console.WriteLine("\n{0},{1}", delay1.TotalMilliseconds, delay2.TotalMilliseconds); if (ReadProgress != null) { - progressArgs.Action = "Ripping"; + progressArgs.Action = Resource1.StatusRipping; progressArgs.Position = sector + Sectors2Read; progressArgs.Pass = pass; progressArgs.PassStart = _currentStart; @@ -1214,9 +1108,6 @@ namespace CUETools.Ripper.SCSI ReadProgress(this, progressArgs); } } - //System.Console.WriteLine(); - //if (CorrectSectorsTest(start, _currentEnd, 10, realData) == 0) - // break; if (pass >= _correctionQuality && _currentErrorsCount == 0) break; } @@ -1314,7 +1205,7 @@ namespace CUETools.Ripper.SCSI } set { - if (_toc.AudioLength <= 0) + if (_toc == null || _toc.AudioLength <= 0) throw new Exception(Resource1.NoAudio); _crcErrorsCount = 0; _errorsCount = 0; diff --git a/CUETools/CUETools.csproj b/CUETools/CUETools.csproj index c8e10fc..842d523 100644 --- a/CUETools/CUETools.csproj +++ b/CUETools/CUETools.csproj @@ -12,7 +12,7 @@ cue2.ico 611F49E043614FEDCFF1B128868CC8DC0B6656C5 CUETools_TemporaryKey.pfx - false + true true true LocalIntranet diff --git a/CUETools/Properties/app.manifest b/CUETools/Properties/app.manifest new file mode 100644 index 0000000..e15ddf8 --- /dev/null +++ b/CUETools/Properties/app.manifest @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file