mirror of
https://github.com/claunia/cuetools.net.git
synced 2025-12-16 18:14:25 +00:00
minor fixes
This commit is contained in:
@@ -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;
|
||||
|
||||
7
CUERipper/frmCUERipper.Designer.cs
generated
7
CUERipper/frmCUERipper.Designer.cs
generated
@@ -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;
|
||||
|
||||
@@ -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<ReadProgressArgs>(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()
|
||||
{
|
||||
|
||||
@@ -469,7 +469,7 @@
|
||||
</data>
|
||||
<data name="bnComboBoxLosslessOrNot.Radius" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAEJDVUVDb250cm9scywgVmVyc2lvbj0yLjAuNi4wLCBDdWx0dXJl
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAEJDVUVDb250cm9scywgVmVyc2lvbj0yLjAuNy4wLCBDdWx0dXJl
|
||||
PW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwFAQAAABBCQkJOT1ZBLkJOUmFkaXVzBAAAAAhfdG9w
|
||||
TGVmdAlfdG9wUmlnaHQLX2JvdHRvbUxlZnQMX2JvdHRvbVJpZ2h0AAAAAAgICAgCAAAAAgAAAAYAAAAC
|
||||
AAAAAgAAAAs=
|
||||
@@ -501,7 +501,7 @@
|
||||
</data>
|
||||
<data name="bnComboBoxEncoder.Radius" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAEJDVUVDb250cm9scywgVmVyc2lvbj0yLjAuNi4wLCBDdWx0dXJl
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAEJDVUVDb250cm9scywgVmVyc2lvbj0yLjAuNy4wLCBDdWx0dXJl
|
||||
PW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwFAQAAABBCQkJOT1ZBLkJOUmFkaXVzBAAAAAhfdG9w
|
||||
TGVmdAlfdG9wUmlnaHQLX2JvdHRvbUxlZnQMX2JvdHRvbVJpZ2h0AAAAAAgICAgCAAAAAgAAAAYAAAAC
|
||||
AAAAAgAAAAs=
|
||||
@@ -560,7 +560,7 @@
|
||||
</data>
|
||||
<data name="bnComboBoxFormat.Radius" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAEJDVUVDb250cm9scywgVmVyc2lvbj0yLjAuNi4wLCBDdWx0dXJl
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAEJDVUVDb250cm9scywgVmVyc2lvbj0yLjAuNy4wLCBDdWx0dXJl
|
||||
PW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwFAQAAABBCQkJOT1ZBLkJOUmFkaXVzBAAAAAhfdG9w
|
||||
TGVmdAlfdG9wUmlnaHQLX2JvdHRvbUxlZnQMX2JvdHRvbVJpZ2h0AAAAAAgICAgCAAAAAgAAAAYAAAAC
|
||||
AAAAAgAAAAs=
|
||||
@@ -631,7 +631,7 @@
|
||||
</data>
|
||||
<data name="bnComboBoxImage.Radius" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAEJDVUVDb250cm9scywgVmVyc2lvbj0yLjAuNi4wLCBDdWx0dXJl
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAEJDVUVDb250cm9scywgVmVyc2lvbj0yLjAuNy4wLCBDdWx0dXJl
|
||||
PW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwFAQAAABBCQkJOT1ZBLkJOUmFkaXVzBAAAAAhfdG9w
|
||||
TGVmdAlfdG9wUmlnaHQLX2JvdHRvbUxlZnQMX2JvdHRvbVJpZ2h0AAAAAAgICAgCAAAAAgAAAAYAAAAC
|
||||
AAAAAgAAAAs=
|
||||
@@ -976,7 +976,7 @@
|
||||
</data>
|
||||
<data name="bnComboBoxRelease.Radius" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAEJDVUVDb250cm9scywgVmVyc2lvbj0yLjAuNi4wLCBDdWx0dXJl
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAEJDVUVDb250cm9scywgVmVyc2lvbj0yLjAuNy4wLCBDdWx0dXJl
|
||||
PW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwFAQAAABBCQkJOT1ZBLkJOUmFkaXVzBAAAAAhfdG9w
|
||||
TGVmdAlfdG9wUmlnaHQLX2JvdHRvbUxlZnQMX2JvdHRvbVJpZ2h0AAAAAAgICAgCAAAAAgAAAAYAAAAC
|
||||
AAAAAgAAAAs=
|
||||
@@ -1011,7 +1011,7 @@
|
||||
</data>
|
||||
<data name="bnComboBoxDrives.Radius" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAEJDVUVDb250cm9scywgVmVyc2lvbj0yLjAuNi4wLCBDdWx0dXJl
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAEJDVUVDb250cm9scywgVmVyc2lvbj0yLjAuNy4wLCBDdWx0dXJl
|
||||
PW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwFAQAAABBCQkJOT1ZBLkJOUmFkaXVzBAAAAAhfdG9w
|
||||
TGVmdAlfdG9wUmlnaHQLX2JvdHRvbUxlZnQMX2JvdHRvbVJpZ2h0AAAAAAgICAgCAAAAAgAAAAYAAAAC
|
||||
AAAAAgAAAAs=
|
||||
@@ -1040,7 +1040,7 @@
|
||||
</data>
|
||||
<data name="bnComboBoxOutputFormat.Radius" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAEJDVUVDb250cm9scywgVmVyc2lvbj0yLjAuNi4wLCBDdWx0dXJl
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAEJDVUVDb250cm9scywgVmVyc2lvbj0yLjAuNy4wLCBDdWx0dXJl
|
||||
PW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwFAQAAABBCQkJOT1ZBLkJOUmFkaXVzBAAAAAhfdG9w
|
||||
TGVmdAlfdG9wUmlnaHQLX2JvdHRvbUxlZnQMX2JvdHRvbVJpZ2h0AAAAAAgICAgCAAAAAgAAAAYAAAAC
|
||||
AAAAAgAAAAs=
|
||||
|
||||
@@ -47,8 +47,7 @@
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\bin\Release\</OutputPath>
|
||||
<DefineConstants>
|
||||
</DefineConstants>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,6 +33,9 @@
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<CodeAnalysisRules>
|
||||
</CodeAnalysisRules>
|
||||
<RunCodeAnalysis>true</RunCodeAnalysis>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
|
||||
27
CUETools.Ripper.SCSI/Resource1.Designer.cs
generated
27
CUETools.Ripper.SCSI/Resource1.Designer.cs
generated
@@ -122,5 +122,32 @@ namespace CUETools.Ripper.SCSI {
|
||||
return ResourceManager.GetString("ReadTOCError", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Detecting drive features.
|
||||
/// </summary>
|
||||
internal static string StatusDetectingDriveFeatures {
|
||||
get {
|
||||
return ResourceManager.GetString("StatusDetectingDriveFeatures", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Detecting gaps.
|
||||
/// </summary>
|
||||
internal static string StatusDetectingGaps {
|
||||
get {
|
||||
return ResourceManager.GetString("StatusDetectingGaps", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Ripping.
|
||||
/// </summary>
|
||||
internal static string StatusRipping {
|
||||
get {
|
||||
return ResourceManager.GetString("StatusRipping", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,4 +138,13 @@
|
||||
<data name="ReadTOCError" xml:space="preserve">
|
||||
<value>Cannot open CD</value>
|
||||
</data>
|
||||
<data name="StatusDetectingDriveFeatures" xml:space="preserve">
|
||||
<value>Detecting drive features</value>
|
||||
</data>
|
||||
<data name="StatusDetectingGaps" xml:space="preserve">
|
||||
<value>Detecting gaps</value>
|
||||
</data>
|
||||
<data name="StatusRipping" xml:space="preserve">
|
||||
<value>Ripping</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -138,4 +138,13 @@
|
||||
<data name="ReadTOCError" xml:space="preserve">
|
||||
<value>Ошибка при обращении к диску</value>
|
||||
</data>
|
||||
<data name="StatusDetectingDriveFeatures" xml:space="preserve">
|
||||
<value>Диагностика устройства</value>
|
||||
</data>
|
||||
<data name="StatusDetectingGaps" xml:space="preserve">
|
||||
<value>Определение зазоров</value>
|
||||
</data>
|
||||
<data name="StatusRipping" xml:space="preserve">
|
||||
<value>Извлечение аудио</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -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,11 +744,14 @@ 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;
|
||||
}
|
||||
//if (found)
|
||||
@@ -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;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<ApplicationIcon>cue2.ico</ApplicationIcon>
|
||||
<ManifestCertificateThumbprint>611F49E043614FEDCFF1B128868CC8DC0B6656C5</ManifestCertificateThumbprint>
|
||||
<ManifestKeyFile>CUETools_TemporaryKey.pfx</ManifestKeyFile>
|
||||
<GenerateManifests>false</GenerateManifests>
|
||||
<GenerateManifests>true</GenerateManifests>
|
||||
<SignManifests>true</SignManifests>
|
||||
<IsWebBootstrapper>true</IsWebBootstrapper>
|
||||
<TargetZone>LocalIntranet</TargetZone>
|
||||
|
||||
16
CUETools/Properties/app.manifest
Normal file
16
CUETools/Properties/app.manifest
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||
<security>
|
||||
<applicationRequestMinimum>
|
||||
<defaultAssemblyRequest permissionSetReference="Custom" />
|
||||
<PermissionSet class="System.Security.PermissionSet" version="1" Unrestricted="true" ID="Custom" SameSite="site">
|
||||
<IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
|
||||
<IPermission class="System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
|
||||
<IPermission class="System.Net.SocketPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
|
||||
<IPermission class="System.Net.WebPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
|
||||
</PermissionSet>
|
||||
</applicationRequestMinimum>
|
||||
</security>
|
||||
</trustInfo>
|
||||
</asmv1:assembly>
|
||||
Reference in New Issue
Block a user