mirror of
https://github.com/claunia/cuetools.net.git
synced 2025-12-16 10:04:24 +00:00
1.9.4... too many small changes to comment
This commit is contained in:
@@ -87,22 +87,12 @@
|
||||
<Compile Include="frmCUERipper.Designer.cs">
|
||||
<DependentUpon>frmCUERipper.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="frmRelease.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="frmRelease.Designer.cs">
|
||||
<DependentUpon>frmRelease.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="frmCUERipper.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>frmCUERipper.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="frmRelease.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>frmRelease.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
@@ -111,6 +101,7 @@
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<None Include="app.config" />
|
||||
<None Include="Properties\DataSources\MusicBrainz.Release.datasource" />
|
||||
@@ -154,6 +145,15 @@
|
||||
<Name>MusicBrainz</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="musicbrainz.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="cddb.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="freedb.gif" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
||||
@@ -8,9 +8,9 @@ using System.Runtime.InteropServices;
|
||||
[assembly: AssemblyTitle("CUERipper")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Microsoft")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("CUERipper")]
|
||||
[assembly: AssemblyCopyright("Copyright © Microsoft 2008")]
|
||||
[assembly: AssemblyCopyright("Copyright (c) 2008-2009 Greg Chudov")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: AssemblyVersion("1.9.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.9.0.0")]
|
||||
|
||||
133
CUERipper/Properties/Resources.Designer.cs
generated
133
CUERipper/Properties/Resources.Designer.cs
generated
@@ -8,64 +8,77 @@
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace CUERipper.Properties
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources
|
||||
{
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((resourceMan == null))
|
||||
{
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CUERipper.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture
|
||||
{
|
||||
get
|
||||
{
|
||||
return resourceCulture;
|
||||
}
|
||||
set
|
||||
{
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
namespace CUERipper.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CUERipper.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
internal static System.Drawing.Bitmap cddb {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("cddb", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
internal static System.Drawing.Bitmap freedb {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("freedb", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
internal static System.Drawing.Bitmap musicbrainz {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("musicbrainz", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
@@ -60,6 +60,7 @@
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
@@ -68,9 +69,10 @@
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
@@ -85,9 +87,10 @@
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
@@ -114,4 +117,14 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="musicbrainz" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\musicbrainz.ico;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="cddb" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\cddb.ico;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="freedb" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\freedb.gif;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
||||
26
CUERipper/frmCUERipper.Designer.cs
generated
26
CUERipper/frmCUERipper.Designer.cs
generated
@@ -47,12 +47,13 @@ namespace CUERipper
|
||||
this.buttonAbort = new System.Windows.Forms.Button();
|
||||
this.buttonPause = new System.Windows.Forms.Button();
|
||||
this.comboRelease = new System.Windows.Forms.ComboBox();
|
||||
this.releaseBindingSource = new System.Windows.Forms.BindingSource(this.components);
|
||||
this.contextMenuStripRelease = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.releaseBindingSource = new System.Windows.Forms.BindingSource(this.components);
|
||||
this.statusStrip1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.releaseBindingSource)).BeginInit();
|
||||
this.contextMenuStripRelease.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.releaseBindingSource)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// comboDrives
|
||||
@@ -84,6 +85,7 @@ namespace CUERipper
|
||||
// toolStripProgressBar1
|
||||
//
|
||||
this.toolStripProgressBar1.AutoToolTip = true;
|
||||
this.toolStripProgressBar1.MarqueeAnimationSpeed = 500;
|
||||
this.toolStripProgressBar1.Name = "toolStripProgressBar1";
|
||||
resources.ApplyResources(this.toolStripProgressBar1, "toolStripProgressBar1");
|
||||
this.toolStripProgressBar1.Style = System.Windows.Forms.ProgressBarStyle.Continuous;
|
||||
@@ -187,17 +189,16 @@ namespace CUERipper
|
||||
// comboRelease
|
||||
//
|
||||
resources.ApplyResources(this.comboRelease, "comboRelease");
|
||||
this.comboRelease.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.comboRelease.ContextMenuStrip = this.contextMenuStripRelease;
|
||||
this.comboRelease.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
|
||||
this.comboRelease.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.comboRelease.FormattingEnabled = true;
|
||||
this.comboRelease.Name = "comboRelease";
|
||||
this.comboRelease.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.comboRelease_DrawItem);
|
||||
this.comboRelease.SelectedIndexChanged += new System.EventHandler(this.comboRelease_SelectedIndexChanged);
|
||||
this.comboRelease.Format += new System.Windows.Forms.ListControlConvertEventHandler(this.comboRelease_Format);
|
||||
//
|
||||
// releaseBindingSource
|
||||
//
|
||||
this.releaseBindingSource.DataSource = typeof(MusicBrainz.Release);
|
||||
//
|
||||
// contextMenuStripRelease
|
||||
//
|
||||
this.contextMenuStripRelease.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
@@ -211,6 +212,16 @@ namespace CUERipper
|
||||
resources.ApplyResources(this.editToolStripMenuItem, "editToolStripMenuItem");
|
||||
this.editToolStripMenuItem.Click += new System.EventHandler(this.editToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripMenuItem1
|
||||
//
|
||||
this.toolStripMenuItem1.Image = global::CUERipper.Properties.Resources.cddb;
|
||||
this.toolStripMenuItem1.Name = "toolStripMenuItem1";
|
||||
resources.ApplyResources(this.toolStripMenuItem1, "toolStripMenuItem1");
|
||||
//
|
||||
// releaseBindingSource
|
||||
//
|
||||
this.releaseBindingSource.DataSource = typeof(MusicBrainz.Release);
|
||||
//
|
||||
// frmCUERipper
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
@@ -232,8 +243,8 @@ namespace CUERipper
|
||||
this.Load += new System.EventHandler(this.frmCUERipper_Load);
|
||||
this.statusStrip1.ResumeLayout(false);
|
||||
this.statusStrip1.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.releaseBindingSource)).EndInit();
|
||||
this.contextMenuStripRelease.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.releaseBindingSource)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
@@ -261,6 +272,7 @@ namespace CUERipper
|
||||
private System.Windows.Forms.BindingSource releaseBindingSource;
|
||||
private System.Windows.Forms.ContextMenuStrip contextMenuStripRelease;
|
||||
private System.Windows.Forms.ToolStripMenuItem editToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -37,11 +37,24 @@ namespace CUERipper
|
||||
_startStop = new StartStop();
|
||||
}
|
||||
|
||||
//private byte toBCD(int val)
|
||||
//{
|
||||
// return (byte)(((val / 10) << 4) + (val % 10));
|
||||
//}
|
||||
|
||||
private void frmCUERipper_Load(object sender, EventArgs e)
|
||||
{
|
||||
//byte[] _subchannelBuffer0 = { 0x1, 0x01, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x02, 0x10, 0x75, 0x4E };
|
||||
//byte[] _subchannelBuffer0 = { 0x01, 0x01, 0x01, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x02, 0x0A, 0x4C, 0x43 };
|
||||
//byte[] _subchannelBuffer1 = { 0x21, 0x01, 0x01, 0x00, 0x00, 0x11, 0x00, 0x00, 0x02, 0x11, 0xCF, 0x3E };
|
||||
//byte[] _subchannelBuffer2 = { 0x21, 0x01, 0x01, 0x00, 0x00, 0x12, 0x00, 0x00, 0x02, 0x12, 0x11, 0x8F };
|
||||
|
||||
//_subchannelBuffer0[3] = toBCD(_subchannelBuffer0[3]);
|
||||
//_subchannelBuffer0[4] = toBCD(_subchannelBuffer0[4]);
|
||||
//_subchannelBuffer0[5] = toBCD(_subchannelBuffer0[5]);
|
||||
//_subchannelBuffer0[7] = toBCD(_subchannelBuffer0[7]);
|
||||
//_subchannelBuffer0[8] = toBCD(_subchannelBuffer0[8]);
|
||||
//_subchannelBuffer0[9] = toBCD(_subchannelBuffer0[9]);
|
||||
|
||||
//Crc16Ccitt _crc = new Crc16Ccitt(InitialCrcValue.Zeros);
|
||||
//ushort crc0a = (ushort)(_crc.ComputeChecksum(_subchannelBuffer0, 0, 10) ^ 0xffff);
|
||||
//ushort crc0b = (ushort)(_subchannelBuffer0[11] + (_subchannelBuffer0[10] << 8));
|
||||
@@ -49,21 +62,25 @@ namespace CUERipper
|
||||
//ushort crc1b = (ushort)(_subchannelBuffer1[11] + (_subchannelBuffer1[10] << 8));
|
||||
//ushort crc2a = (ushort)(_crc.ComputeChecksum(_subchannelBuffer2, 0, 10) ^ 0xffff);
|
||||
//ushort crc2b = (ushort)(_subchannelBuffer2[11] + (_subchannelBuffer2[10] << 8));
|
||||
//if (crc0a != crc0b || crc1a != crc1b || crc2a != crc2b)
|
||||
//if (crc0a != crc0b) // || crc1a != crc1b || crc2a != crc2b)
|
||||
//{
|
||||
//}
|
||||
|
||||
foreach(char drive in CDDriveReader.DrivesAvailable())
|
||||
{
|
||||
CDDriveReader reader = new CDDriveReader();
|
||||
if (reader.Open(drive))
|
||||
int driveOffset;
|
||||
try
|
||||
{
|
||||
int driveOffset;
|
||||
if (!AccurateRipVerify.FindDriveReadOffset(reader.ARName, out driveOffset))
|
||||
; //throw new Exception("Failed to find drive read offset for drive" + _ripper.ARName);
|
||||
reader.DriveOffset = driveOffset;
|
||||
comboDrives.Items.Add(reader);
|
||||
reader.Open(drive);
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
if (!AccurateRipVerify.FindDriveReadOffset(reader.ARName, out driveOffset))
|
||||
; //throw new Exception("Failed to find drive read offset for drive" + _ripper.ARName);
|
||||
reader.DriveOffset = driveOffset;
|
||||
comboDrives.Items.Add(reader);
|
||||
}
|
||||
if (comboDrives.Items.Count == 0)
|
||||
comboDrives.Items.Add("No CD drives found");
|
||||
@@ -119,9 +136,15 @@ namespace CUERipper
|
||||
|
||||
this.BeginInvoke((MethodInvoker)delegate()
|
||||
{
|
||||
//Color color = ColorTranslator.FromWin32(e.ErrorsCount == 0 || e.Position == 0 ? (byte)0 : (byte)(Math.Log(1 + e.ErrorsCount / e.Position, 2) * 255));
|
||||
toolStripStatusLabel1.Text = status;
|
||||
toolStripProgressBar1.Value = Math.Max(0, Math.Min(100, (int)(percentTrck * 100)));
|
||||
//toolStripProgressBar1.ProgressBar.Style = ProgressBarStyle.Blocks;
|
||||
toolStripProgressBar2.Value = Math.Max(0, Math.Min(100, (int)(percentDisk * 100)));
|
||||
//if (e.ErrorsCount == 0 || e.Position == 0)
|
||||
//toolStripProgressBar3.Value = 0;
|
||||
//else
|
||||
//toolStripProgressBar3.Value = Math.Min(100, (int)(100 + Math.Log10(e.ErrorsCount / e.Position / 4 / 588) * 100));
|
||||
});
|
||||
}
|
||||
|
||||
@@ -130,11 +153,11 @@ namespace CUERipper
|
||||
CDDriveReader audioSource = (CDDriveReader)o;
|
||||
audioSource.ReadProgress += new EventHandler<ReadProgressArgs>(CDReadProgress);
|
||||
|
||||
CUESheet.WriteText(_pathOut, _cueSheet.CUESheetContents(_style));
|
||||
CUESheet.WriteText(Path.ChangeExtension(_pathOut, ".log"), _cueSheet.LOGContents());
|
||||
try
|
||||
{
|
||||
_cueSheet.WriteAudioFiles(".", _style);
|
||||
//CUESheet.WriteText(_pathOut, _cueSheet.CUESheetContents(_style));
|
||||
//CUESheet.WriteText(Path.ChangeExtension(_pathOut, ".log"), _cueSheet.LOGContents());
|
||||
}
|
||||
catch (StopException)
|
||||
{
|
||||
@@ -197,8 +220,8 @@ namespace CUERipper
|
||||
{
|
||||
if (e.ListItem is string)
|
||||
return;
|
||||
CUELine date = General.FindCUELine(((CUESheet)e.ListItem).Attributes, "REM", "DATE");
|
||||
e.Value = string.Format("{0}{1} - {2}", date != null ? date.Params[2] + ": " : "", ((CUESheet)e.ListItem).Artist, ((CUESheet)e.ListItem).Title);
|
||||
ReleaseInfo r = (ReleaseInfo)(e.ListItem);
|
||||
e.Value = string.Format("{0}{1} - {2}", r.cueSheet.Year != "" ? r.cueSheet.Year + ": " : "", r.cueSheet.Artist, r.cueSheet.Title);
|
||||
}
|
||||
|
||||
private void comboRelease_SelectedIndexChanged(object sender, EventArgs e)
|
||||
@@ -206,7 +229,7 @@ namespace CUERipper
|
||||
listTracks.Items.Clear();
|
||||
if (comboRelease.SelectedItem == null || comboRelease.SelectedItem is string)
|
||||
return;
|
||||
_cueSheet = (CUESheet)comboRelease.SelectedItem;
|
||||
_cueSheet = ((ReleaseInfo)comboRelease.SelectedItem).cueSheet;
|
||||
for (int i = 1; i <= _reader.TOC.AudioTracks; i++)
|
||||
listTracks.Items.Add(new ListViewItem(new string[] {
|
||||
_cueSheet.Tracks[i-1].Title,
|
||||
@@ -238,39 +261,39 @@ namespace CUERipper
|
||||
}
|
||||
this.BeginInvoke((MethodInvoker)delegate()
|
||||
{
|
||||
toolStripStatusLabel1.Text = "Looking up album via MusicBrainz";
|
||||
toolStripStatusLabel1.Text = "Looking up album via " + (e == null ? "FreeDB" : "MusicBrainz");
|
||||
toolStripProgressBar1.Value = 0;
|
||||
toolStripProgressBar2.Value = (100 + toolStripProgressBar2.Value) / 2;
|
||||
toolStripProgressBar2.Value = (100 + 2 * toolStripProgressBar2.Value) / 3;
|
||||
});
|
||||
}
|
||||
|
||||
private CUESheet CreateCUESheet(CDDriveReader audioSource, Release release, CDEntry cdEntry)
|
||||
private ReleaseInfo CreateCUESheet(CDDriveReader audioSource, Release release, CDEntry cdEntry)
|
||||
{
|
||||
CUESheet cueSheet = new CUESheet(_config);
|
||||
cueSheet.OpenCD(audioSource);
|
||||
General.SetCUELine(cueSheet.Attributes, "REM", "DISCID", AccurateRipVerify.CalculateCDDBId(audioSource.TOC), false);
|
||||
General.SetCUELine(cueSheet.Attributes, "REM", "COMMENT", CDDriveReader.RipperVersion(), true);
|
||||
ReleaseInfo r = new ReleaseInfo();
|
||||
r.cueSheet = new CUESheet(_config);
|
||||
r.cueSheet.OpenCD(audioSource);
|
||||
General.SetCUELine(r.cueSheet.Attributes, "REM", "DISCID", AccurateRipVerify.CalculateCDDBId(audioSource.TOC), false);
|
||||
General.SetCUELine(r.cueSheet.Attributes, "REM", "COMMENT", CDDriveReader.RipperVersion(), true);
|
||||
if (release != null)
|
||||
cueSheet.FillFromMusicBrainz(release);
|
||||
{
|
||||
r.cueSheet.FillFromMusicBrainz(release);
|
||||
r.bitmap = Properties.Resources.musicbrainz;
|
||||
}
|
||||
else if (cdEntry != null)
|
||||
{
|
||||
cueSheet.Artist = cdEntry.Artist;
|
||||
cueSheet.Title = cdEntry.Title;
|
||||
General.SetCUELine(cueSheet.Attributes, "REM", "DATE", cdEntry.Year, false);
|
||||
General.SetCUELine(cueSheet.Attributes, "REM", "GENRE", cdEntry.Genre, true);
|
||||
for (int i = 0; i < audioSource.TOC.AudioTracks; i++)
|
||||
cueSheet.Tracks[i].Title = cdEntry.Tracks[i].Title;
|
||||
r.cueSheet.FillFromFreedb(cdEntry);
|
||||
r.bitmap = Properties.Resources.freedb;
|
||||
}
|
||||
else
|
||||
{
|
||||
cueSheet.Artist = "Unknown Artist";
|
||||
cueSheet.Title = "Unknown Title";
|
||||
r.cueSheet.Artist = "Unknown Artist";
|
||||
r.cueSheet.Title = "Unknown Title";
|
||||
for (int i = 0; i < audioSource.TOC.AudioTracks; i++)
|
||||
cueSheet.Tracks[i].Title = string.Format("Track {0:00}", i + 1);
|
||||
r.cueSheet.Tracks[i].Title = string.Format("Track {0:00}", i + 1);
|
||||
}
|
||||
cueSheet.AccurateRip = AccurateRipMode.VerifyAndConvert;
|
||||
cueSheet.ArVerify.ContactAccurateRip(AccurateRipVerify.CalculateAccurateRipId(audioSource.TOC));
|
||||
return cueSheet;
|
||||
r.cueSheet.AccurateRip = AccurateRipMode.VerifyAndConvert;
|
||||
r.cueSheet.ArVerify.ContactAccurateRip(AccurateRipVerify.CalculateAccurateRipId(audioSource.TOC));
|
||||
return r;
|
||||
}
|
||||
|
||||
private void Lookup(object o)
|
||||
@@ -287,10 +310,10 @@ namespace CUERipper
|
||||
{
|
||||
release.GetEvents();
|
||||
release.GetTracks();
|
||||
CUESheet cueSheet = CreateCUESheet(audioSource, release, null);
|
||||
ReleaseInfo r = CreateCUESheet(audioSource, release, null);
|
||||
this.BeginInvoke((MethodInvoker)delegate()
|
||||
{
|
||||
comboRelease.Items.Add(cueSheet);
|
||||
comboRelease.Items.Add(r);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -313,17 +336,19 @@ namespace CUERipper
|
||||
string code = string.Empty;
|
||||
try
|
||||
{
|
||||
MusicBrainz_LookupProgress(this, null);
|
||||
code = m_freedb.Query(AccurateRipVerify.CalculateCDDBQuery(audioSource.TOC), out queryResult, out coll);
|
||||
if (code == FreedbHelper.ResponseCodes.CODE_200)
|
||||
{
|
||||
CDEntry cdEntry;
|
||||
MusicBrainz_LookupProgress(this, null);
|
||||
code = m_freedb.Read(queryResult, out cdEntry);
|
||||
if (code == FreedbHelper.ResponseCodes.CODE_210)
|
||||
{
|
||||
CUESheet cueSheet = CreateCUESheet(audioSource, null, cdEntry);
|
||||
ReleaseInfo r = CreateCUESheet(audioSource, null, cdEntry);
|
||||
this.BeginInvoke((MethodInvoker)delegate()
|
||||
{
|
||||
comboRelease.Items.Add(cueSheet);
|
||||
comboRelease.Items.Add(r);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -334,13 +359,14 @@ namespace CUERipper
|
||||
foreach (QueryResult qr in coll)
|
||||
{
|
||||
CDEntry cdEntry;
|
||||
MusicBrainz_LookupProgress(this, null);
|
||||
code = m_freedb.Read(qr, out cdEntry);
|
||||
if (code == FreedbHelper.ResponseCodes.CODE_210)
|
||||
{
|
||||
CUESheet cueSheet = CreateCUESheet(audioSource, null, cdEntry);
|
||||
ReleaseInfo r = CreateCUESheet(audioSource, null, cdEntry);
|
||||
this.BeginInvoke((MethodInvoker)delegate()
|
||||
{
|
||||
comboRelease.Items.Add(cueSheet);
|
||||
comboRelease.Items.Add(r);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -354,8 +380,8 @@ namespace CUERipper
|
||||
{
|
||||
if (comboRelease.Items.Count == 0)
|
||||
{
|
||||
CUESheet cueSheet = CreateCUESheet(audioSource, null, null);
|
||||
comboRelease.Items.Add(cueSheet);
|
||||
ReleaseInfo r = CreateCUESheet(audioSource, null, null);
|
||||
comboRelease.Items.Add(r);
|
||||
}
|
||||
});
|
||||
_workThread = null;
|
||||
@@ -373,9 +399,21 @@ namespace CUERipper
|
||||
if (comboDrives.SelectedItem is string)
|
||||
return;
|
||||
_reader = (CDDriveReader)comboDrives.SelectedItem;
|
||||
try
|
||||
{
|
||||
_reader.Open(_reader.Path[0]);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_reader.Close();
|
||||
comboRelease.Items.Add(ex.Message);
|
||||
comboRelease.SelectedIndex = 0;
|
||||
return;
|
||||
}
|
||||
if (_reader.TOC.AudioTracks == 0)
|
||||
{
|
||||
comboRelease.Items.Add("No audio tracks");
|
||||
comboRelease.SelectedIndex = 0;
|
||||
return;
|
||||
}
|
||||
comboRelease_SelectedIndexChanged(sender, e);
|
||||
@@ -415,18 +453,37 @@ namespace CUERipper
|
||||
|
||||
private void listTracks_AfterLabelEdit(object sender, LabelEditEventArgs e)
|
||||
{
|
||||
CUESheet cueSheet = (CUESheet)comboRelease.SelectedItem;
|
||||
CUESheet cueSheet = ((ReleaseInfo)comboRelease.SelectedItem).cueSheet;
|
||||
if (e.Label != null)
|
||||
cueSheet.Tracks[e.Item].Title = e.Label;
|
||||
}
|
||||
|
||||
private void editToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
CUESheet cueSheet = (CUESheet)comboRelease.SelectedItem;
|
||||
frmRelease frm = new frmRelease();
|
||||
CUESheet cueSheet = ((ReleaseInfo)comboRelease.SelectedItem).cueSheet;
|
||||
frmProperties frm = new frmProperties();
|
||||
frm.CUE = cueSheet;
|
||||
frm.ShowDialog();
|
||||
comboRelease.Items[comboRelease.SelectedIndex] = cueSheet;
|
||||
}
|
||||
|
||||
private void comboRelease_DrawItem(object sender, DrawItemEventArgs e)
|
||||
{
|
||||
e.DrawBackground();
|
||||
StringFormat format = new StringFormat();
|
||||
format.FormatFlags = StringFormatFlags.NoClip;
|
||||
format.Alignment = StringAlignment.Near;
|
||||
if (e.Index >= 0 && e.Index < comboRelease.Items.Count)
|
||||
{
|
||||
string text = comboRelease.GetItemText(comboRelease.Items[e.Index]);
|
||||
if (comboRelease.Items[e.Index] is ReleaseInfo)
|
||||
{
|
||||
Bitmap ImageToDraw = ((ReleaseInfo)comboRelease.Items[e.Index]).bitmap;
|
||||
e.Graphics.DrawImage(ImageToDraw, new Rectangle(e.Bounds.X, e.Bounds.Y, e.Bounds.Height, e.Bounds.Height));
|
||||
//e.Graphics.DrawImage(ImageToDraw, new Rectangle(e.Bounds.X + e.Bounds.Width - ImageToDraw.Width, e.Bounds.Y, ImageToDraw.Width, e.Bounds.Height));
|
||||
}
|
||||
e.Graphics.DrawString(text, e.Font, new SolidBrush(e.ForeColor), new RectangleF((float)e.Bounds.X + e.Bounds.Height, (float)e.Bounds.Y, (float)(e.Bounds.Width - e.Bounds.Height), (float)e.Bounds.Height), format);
|
||||
}
|
||||
e.DrawFocusRectangle();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -468,4 +525,10 @@ namespace CUERipper
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class ReleaseInfo
|
||||
{
|
||||
public CUESheet cueSheet;
|
||||
public Bitmap bitmap;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,6 +147,24 @@
|
||||
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>0, 371</value>
|
||||
</metadata>
|
||||
<data name="toolStripStatusLabel1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>169, 17</value>
|
||||
</data>
|
||||
<data name="toolStripStatusLabel1.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
|
||||
<value>MiddleLeft</value>
|
||||
</data>
|
||||
<data name="toolStripProgressBar1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>140, 16</value>
|
||||
</data>
|
||||
<data name="toolStripProgressBar1.ToolTipText" xml:space="preserve">
|
||||
<value>Track progress</value>
|
||||
</data>
|
||||
<data name="toolStripProgressBar2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>140, 16</value>
|
||||
</data>
|
||||
<data name="toolStripProgressBar2.ToolTipText" xml:space="preserve">
|
||||
<value>Disk progress</value>
|
||||
</data>
|
||||
<data name="statusStrip1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 371</value>
|
||||
</data>
|
||||
@@ -171,48 +189,9 @@
|
||||
<data name=">>statusStrip1.ZOrder" xml:space="preserve">
|
||||
<value>9</value>
|
||||
</data>
|
||||
<data name="toolStripStatusLabel1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>200, 17</value>
|
||||
</data>
|
||||
<data name="toolStripStatusLabel1.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
|
||||
<value>MiddleLeft</value>
|
||||
</data>
|
||||
<data name="toolStripProgressBar1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>140, 16</value>
|
||||
</data>
|
||||
<data name="toolStripProgressBar1.ToolTipText" xml:space="preserve">
|
||||
<value>Track progress</value>
|
||||
</data>
|
||||
<data name="toolStripProgressBar2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>140, 16</value>
|
||||
</data>
|
||||
<data name="toolStripProgressBar2.ToolTipText" xml:space="preserve">
|
||||
<value>Disk progress</value>
|
||||
</data>
|
||||
<data name="listTracks.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Left, Right</value>
|
||||
</data>
|
||||
<data name="listTracks.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>6, 60</value>
|
||||
</data>
|
||||
<data name="listTracks.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>481, 269</value>
|
||||
</data>
|
||||
<data name="listTracks.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name=">>listTracks.Name" xml:space="preserve">
|
||||
<value>listTracks</value>
|
||||
</data>
|
||||
<data name=">>listTracks.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ListView, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>listTracks.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>listTracks.ZOrder" xml:space="preserve">
|
||||
<value>8</value>
|
||||
</data>
|
||||
<data name="Title.DisplayIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
</data>
|
||||
@@ -243,9 +222,33 @@
|
||||
<data name="Length.Width" type="System.Int32, mscorlib">
|
||||
<value>70</value>
|
||||
</data>
|
||||
<data name="listTracks.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>6, 60</value>
|
||||
</data>
|
||||
<data name="listTracks.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>481, 269</value>
|
||||
</data>
|
||||
<data name="listTracks.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name=">>listTracks.Name" xml:space="preserve">
|
||||
<value>listTracks</value>
|
||||
</data>
|
||||
<data name=">>listTracks.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ListView, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>listTracks.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>listTracks.ZOrder" xml:space="preserve">
|
||||
<value>8</value>
|
||||
</data>
|
||||
<data name="buttonGo.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Left, Right</value>
|
||||
</data>
|
||||
<data name="buttonGo.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="buttonGo.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>396, 335</value>
|
||||
</data>
|
||||
@@ -433,7 +436,7 @@
|
||||
<value>285, 58</value>
|
||||
</metadata>
|
||||
<data name="editToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>152, 22</value>
|
||||
<value>94, 22</value>
|
||||
</data>
|
||||
<data name="editToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Edit</value>
|
||||
@@ -468,6 +471,12 @@
|
||||
<data name=">>comboRelease.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="toolStripMenuItem1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>181, 22</value>
|
||||
</data>
|
||||
<data name="toolStripMenuItem1.Text" xml:space="preserve">
|
||||
<value>toolStripMenuItem1</value>
|
||||
</data>
|
||||
<metadata name="releaseBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>116, 371</value>
|
||||
</metadata>
|
||||
@@ -528,18 +537,24 @@
|
||||
<data name=">>Length.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>releaseBindingSource.Name" xml:space="preserve">
|
||||
<value>releaseBindingSource</value>
|
||||
</data>
|
||||
<data name=">>releaseBindingSource.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.BindingSource, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>editToolStripMenuItem.Name" xml:space="preserve">
|
||||
<value>editToolStripMenuItem</value>
|
||||
</data>
|
||||
<data name=">>editToolStripMenuItem.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>toolStripMenuItem1.Name" xml:space="preserve">
|
||||
<value>toolStripMenuItem1</value>
|
||||
</data>
|
||||
<data name=">>toolStripMenuItem1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>releaseBindingSource.Name" xml:space="preserve">
|
||||
<value>releaseBindingSource</value>
|
||||
</data>
|
||||
<data name=">>releaseBindingSource.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.BindingSource, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>frmCUERipper</value>
|
||||
</data>
|
||||
|
||||
@@ -16,6 +16,7 @@ namespace CUETools.AccurateRip
|
||||
{
|
||||
_toc = toc;
|
||||
_accDisks = new List<AccDisk>();
|
||||
_crc32 = new Crc32();
|
||||
Init();
|
||||
}
|
||||
|
||||
@@ -23,7 +24,11 @@ namespace CUETools.AccurateRip
|
||||
{
|
||||
fixed (uint* CRCsA = &_offsetedCRC[Math.Max(0, iTrack - 1), 0],
|
||||
CRCsB = &_offsetedCRC[iTrack, 0],
|
||||
CRCsC = &_offsetedCRC[Math.Min(_toc.AudioTracks - 1, iTrack + 1), 0])
|
||||
CRCsC = &_offsetedCRC[Math.Min(_toc.AudioTracks - 1, iTrack + 1), 0]
|
||||
//CRC32A = &_offsetedCRC32[Math.Max(0, iTrack - 1), 0],
|
||||
//CRC32B = &_offsetedCRC32[iTrack, 0],
|
||||
//CRC32C = &_offsetedCRC32[Math.Min(_toc.AudioTracks - 1, iTrack + 1), 0]
|
||||
)
|
||||
{
|
||||
for (uint si = 0; si < count; si++)
|
||||
{
|
||||
@@ -31,24 +36,27 @@ namespace CUETools.AccurateRip
|
||||
int i;
|
||||
int iB = Math.Max(0, _arOffsetRange - (int)(currentOffset + si));
|
||||
int iC = Math.Min(2 * _arOffsetRange + 1, _arOffsetRange + (int)trackLength - (int)(currentOffset + si));
|
||||
|
||||
|
||||
uint baseSumA = sampleValue * (uint)(previousOffset + 1 - iB);
|
||||
for (i = 0; i < iB; i++)
|
||||
{
|
||||
CRCsA[i] += baseSumA;
|
||||
baseSumA += sampleValue;
|
||||
//CRC32A[i] = _crc32.ComputeChecksum(CRC32A[i], sampleValue);
|
||||
}
|
||||
uint baseSumB = sampleValue * (uint)Math.Max(1, (int)(currentOffset + si) - _arOffsetRange + 1);
|
||||
for (i = iB; i < iC; i++)
|
||||
{
|
||||
CRCsB[i] += baseSumB;
|
||||
baseSumB += sampleValue;
|
||||
//CRC32B[i] = _crc32.ComputeChecksum(CRC32B[i], sampleValue);
|
||||
}
|
||||
uint baseSumC = sampleValue;
|
||||
for (i = iC; i <= 2 * _arOffsetRange; i++)
|
||||
{
|
||||
CRCsC[i] += baseSumC;
|
||||
baseSumC += sampleValue;
|
||||
//CRC32C[i] = _crc32.ComputeChecksum(CRC32C[i], sampleValue);
|
||||
}
|
||||
}
|
||||
return;
|
||||
@@ -60,6 +68,7 @@ namespace CUETools.AccurateRip
|
||||
for (int si = 0; si < count; si++)
|
||||
{
|
||||
uint sampleValue = (uint)((samples[2 * si] & 0xffff) + (samples[2 * si + 1] << 16));
|
||||
|
||||
for (int oi = -_arOffsetRange; oi <= _arOffsetRange; oi++)
|
||||
{
|
||||
int iTrack2 = iTrack;
|
||||
@@ -88,6 +97,7 @@ namespace CUETools.AccurateRip
|
||||
currentOffset2 -= (int)trackLength;
|
||||
}
|
||||
_offsetedCRC[iTrack2, _arOffsetRange - oi] += sampleValue * (uint)(currentOffset2 + 1);
|
||||
//_offsetedCRC32[iTrack2, _arOffsetRange - oi] = _crc32.ComputeChecksum(_offsetedCRC32[iTrack2, _arOffsetRange - oi], sampleValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -121,6 +131,7 @@ namespace CUETools.AccurateRip
|
||||
{
|
||||
CRCs[i] += baseSum;
|
||||
baseSum -= stepSum;
|
||||
//CRC32[i] = _crc32.ComputeChecksum (CRC32[i], samples, count);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -140,6 +151,11 @@ namespace CUETools.AccurateRip
|
||||
return _offsetedCRC[iTrack, _arOffsetRange - oi];
|
||||
}
|
||||
|
||||
public uint CRC32(int iTrack)
|
||||
{
|
||||
return _offsetedCRC32[iTrack] ^ 0xffffffff;
|
||||
}
|
||||
|
||||
public uint CRC450(int iTrack, int oi)
|
||||
{
|
||||
return _offsetedFrame450CRC[iTrack, _arOffsetRange - oi];
|
||||
@@ -150,11 +166,11 @@ namespace CUETools.AccurateRip
|
||||
for (uint pos = 0; pos < sampleCount; )
|
||||
{
|
||||
uint copyCount = Math.Min(sampleCount - pos, (uint)_samplesRemTrack);
|
||||
if (_currentTrack != 0)
|
||||
unsafe
|
||||
{
|
||||
unsafe
|
||||
fixed (int* pSampleBuff = &sampleBuffer[pos, 0])
|
||||
{
|
||||
fixed (int* pSampleBuff = &sampleBuffer[pos, 0])
|
||||
if (_currentTrack != 0)
|
||||
{
|
||||
uint trackLength = _toc[_currentTrack].Length * 588;
|
||||
uint currentOffset = (uint)_sampleCount - _toc[_currentTrack].Start * 588;
|
||||
@@ -171,7 +187,10 @@ namespace CUETools.AccurateRip
|
||||
CalculateAccurateRipCRCs(pSampleBuff + si2 * 2, copyCount - si2, _currentTrack - 1, currentOffset + si2, previousOffset, trackLength);
|
||||
else
|
||||
CalculateAccurateRipCRCsSemifast(pSampleBuff + si2 * 2, copyCount - si2, _currentTrack - 1, currentOffset + si2, previousOffset, trackLength);
|
||||
|
||||
_offsetedCRC32[_currentTrack] = _crc32.ComputeChecksum(_offsetedCRC32[_currentTrack], pSampleBuff, copyCount);
|
||||
}
|
||||
_offsetedCRC32[0] = _crc32.ComputeChecksum(_offsetedCRC32[0], pSampleBuff, copyCount);
|
||||
}
|
||||
}
|
||||
pos += copyCount;
|
||||
@@ -185,6 +204,9 @@ namespace CUETools.AccurateRip
|
||||
{
|
||||
_offsetedCRC = new uint[_toc.AudioTracks, 10 * 588];
|
||||
_offsetedFrame450CRC = new uint[_toc.AudioTracks, 10 * 588];
|
||||
_offsetedCRC32 = new uint[_toc.AudioTracks + 1];
|
||||
for (int i = 0; i <= _toc.AudioTracks; i++)
|
||||
_offsetedCRC32[i] = 0xffffffff;
|
||||
_currentTrack = 0;
|
||||
_sampleCount = 0;
|
||||
_samplesRemTrack = _toc.Pregap * 588;
|
||||
@@ -413,6 +435,14 @@ namespace CUETools.AccurateRip
|
||||
}
|
||||
}
|
||||
}
|
||||
if (CRC32(0) != 0)
|
||||
{
|
||||
sw.WriteLine("");
|
||||
sw.WriteLine("Track\t[ CRC32 ]");
|
||||
sw.WriteLine(String.Format(" --\t[{0:X8}]", CRC32(0)));
|
||||
for (int iTrack = 1; iTrack <= _toc.AudioTracks; iTrack++)
|
||||
sw.WriteLine(String.Format(" {0:00}\t[{1:X8}]", iTrack, CRC32(iTrack)));
|
||||
}
|
||||
}
|
||||
|
||||
private static uint sumDigits(uint n)
|
||||
@@ -505,8 +535,8 @@ namespace CUETools.AccurateRip
|
||||
{
|
||||
uint cddbDiscId = 0;
|
||||
for (int iTrack = 1; iTrack <= toc.TrackCount; iTrack++)
|
||||
cddbDiscId += sumDigits(toc[iTrack].Start / 75 + 2);
|
||||
return string.Format("{0:X8}", ((cddbDiscId << 24) + ((toc.Length / 75 - toc[1].Start / 75) << 8) + (uint)toc.TrackCount) & 0xFFFFFFFF);
|
||||
cddbDiscId += sumDigits(toc[iTrack].Start / 75 + 2); // !!!!!!!!!!!!!!!!! %255 !!
|
||||
return string.Format("{0:X8}", (((cddbDiscId % 255) << 24) + ((toc.Length / 75 - toc[1].Start / 75) << 8) + (uint)toc.TrackCount) & 0xFFFFFFFF);
|
||||
}
|
||||
|
||||
public static string CalculateAccurateRipId(CDImageLayout toc)
|
||||
@@ -560,8 +590,11 @@ namespace CUETools.AccurateRip
|
||||
private HttpStatusCode _accResult;
|
||||
private uint[,] _offsetedCRC;
|
||||
private uint[,] _offsetedFrame450CRC;
|
||||
private uint[] _offsetedCRC32;
|
||||
private uint[] _backupCRC;
|
||||
|
||||
Crc32 _crc32;
|
||||
|
||||
private const int _arOffsetRange = 5 * 588 - 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -41,6 +41,11 @@ namespace CUETools.Codecs.ALAC
|
||||
_saved_mdat_pos = _IO.Position;
|
||||
}
|
||||
|
||||
public int[,] Read(int[,] buff)
|
||||
{
|
||||
return AudioSamples.Read(this, buff);
|
||||
}
|
||||
|
||||
public uint Read(int[,] buff, uint sampleCount)
|
||||
{
|
||||
if (_predicterror_buffer_a == null)
|
||||
|
||||
@@ -239,6 +239,11 @@ namespace CUETools { namespace Codecs { namespace APE {
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual array<Int32, 2>^ Read(array<Int32, 2>^ buff)
|
||||
{
|
||||
return AudioSamples::Read(this, buff);
|
||||
}
|
||||
|
||||
virtual UInt32 Read([Out] array<Int32, 2>^ buff, UInt32 sampleCount)
|
||||
{
|
||||
UInt32 buffOffset = 0;
|
||||
|
||||
@@ -265,6 +265,11 @@ namespace CUETools { namespace Codecs { namespace FLAC {
|
||||
}
|
||||
}
|
||||
|
||||
virtual array<Int32, 2>^ Read(array<Int32, 2>^ buff)
|
||||
{
|
||||
return AudioSamples::Read(this, buff);
|
||||
}
|
||||
|
||||
virtual UInt32 Read([Out] array<Int32, 2>^ buff, UInt32 sampleCount)
|
||||
{
|
||||
UInt32 buffOffset = 0;
|
||||
|
||||
@@ -901,6 +901,11 @@ namespace CUETools.Codecs.LossyWAV
|
||||
scaling_factor = 1.0; // !!!! Need to read 'fact' chunks or tags here
|
||||
}
|
||||
|
||||
public int[,] Read(int[,] buff)
|
||||
{
|
||||
return AudioSamples.Read(this, buff);
|
||||
}
|
||||
|
||||
public uint Read(int[,] buff, uint sampleCount)
|
||||
{
|
||||
if (sampleBuffer == null || sampleBuffer.Length < sampleCount)
|
||||
|
||||
@@ -4,9 +4,12 @@
|
||||
|
||||
#include "CUETools.Codecs.TTA.h"
|
||||
|
||||
using namespace APETagsDotNet;
|
||||
|
||||
typedef void * HANDLE;
|
||||
|
||||
#include "../TTALib-1.1/TTAReader.h"
|
||||
#include "../TTALib-1.1/TTAWriter.h"
|
||||
#include "../TTALib-1.1/TTAError.h"
|
||||
|
||||
namespace CUETools {
|
||||
@@ -31,7 +34,7 @@ namespace TTA {
|
||||
public:
|
||||
TTAReader(String^ path, Stream^ IO)
|
||||
{
|
||||
_tags = gcnew NameValueCollection();
|
||||
_tags = nullptr;
|
||||
_sampleOffset = 0;
|
||||
_sampleBuffer = nullptr;
|
||||
_path = path;
|
||||
@@ -127,6 +130,12 @@ namespace TTA {
|
||||
|
||||
virtual property NameValueCollection^ Tags {
|
||||
NameValueCollection^ get () {
|
||||
if (!_tags)
|
||||
{
|
||||
APETagDotNet^ apeTag = gcnew APETagDotNet (_IO, true);
|
||||
_tags = apeTag->GetStringTags (true);
|
||||
apeTag->Close ();
|
||||
}
|
||||
return _tags;
|
||||
}
|
||||
void set (NameValueCollection ^tags) {
|
||||
@@ -136,7 +145,12 @@ namespace TTA {
|
||||
|
||||
virtual bool UpdateTags (bool preserveTime)
|
||||
{
|
||||
return false;
|
||||
Close ();
|
||||
APETagDotNet^ apeTag = gcnew APETagDotNet (_path, true, false);
|
||||
apeTag->SetStringTags (_tags, true);
|
||||
apeTag->Save();
|
||||
apeTag->Close();
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual property UInt64 Remaining {
|
||||
@@ -193,7 +207,14 @@ namespace TTA {
|
||||
do
|
||||
{
|
||||
long * buf;
|
||||
int samplesInBuf = _ttaReader->GetBlock(&buf);
|
||||
int samplesInBuf;
|
||||
try
|
||||
{
|
||||
samplesInBuf = _ttaReader->GetBlock(&buf);
|
||||
} catch (TTALib::TTAException ex)
|
||||
{
|
||||
throw gcnew Exception(String::Format("TTA decoder: {0}", gcnew String(TTAErrorsStr[ex.GetErrNo()])));
|
||||
}
|
||||
if (samplesInBuf == 0)
|
||||
throw gcnew Exception("An error occurred while decoding.");
|
||||
processBlock (buf, samplesInBuf);
|
||||
@@ -227,6 +248,247 @@ namespace TTA {
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
public ref class TTAWriter : IAudioDest
|
||||
{
|
||||
public:
|
||||
TTAWriter(String^ path, Int32 bitsPerSample, Int32 channelCount, Int32 sampleRate)
|
||||
{
|
||||
if (bitsPerSample < 16 || bitsPerSample > 24)
|
||||
throw gcnew Exception("Bits per sample must be 16..24.");
|
||||
|
||||
_initialized = false;
|
||||
_sampleBuffer = nullptr;
|
||||
_path = path;
|
||||
_finalSampleCount = 0;
|
||||
_samplesWritten = 0;
|
||||
_bitsPerSample = bitsPerSample;
|
||||
_channelCount = channelCount;
|
||||
_sampleRate = sampleRate;
|
||||
_compressionLevel = 5;
|
||||
_blockSize = 0;
|
||||
_tags = gcnew NameValueCollection();
|
||||
}
|
||||
|
||||
virtual void Close() {
|
||||
//FLAC__stream_encoder_finish(_encoder);
|
||||
//for (int i = 0; i < _metadataCount; i++) {
|
||||
// FLAC__metadata_object_delete(_metadataList[i]);
|
||||
//}
|
||||
|
||||
if (_ttaWriter)
|
||||
{
|
||||
try
|
||||
{
|
||||
delete _ttaWriter;
|
||||
} catch (TTALib::TTAException ex)
|
||||
{
|
||||
_ttaWriter = nullptr;
|
||||
throw gcnew Exception(String::Format("TTA encoder: {0}", gcnew String(TTAErrorsStr[ex.GetErrNo()])));
|
||||
}
|
||||
_ttaWriter = nullptr;
|
||||
}
|
||||
|
||||
if (_IO)
|
||||
_IO->Close();
|
||||
|
||||
if (_tags->Count > 0)
|
||||
{
|
||||
APETagDotNet^ apeTag = gcnew APETagDotNet (_path, true, false);
|
||||
apeTag->SetStringTags (_tags, true);
|
||||
apeTag->Save();
|
||||
apeTag->Close();
|
||||
_tags->Clear ();
|
||||
}
|
||||
|
||||
if ((_finalSampleCount != 0) && (_samplesWritten != _finalSampleCount)) {
|
||||
throw gcnew Exception("Samples written differs from the expected sample count.");
|
||||
}
|
||||
_tags->Clear ();
|
||||
}
|
||||
|
||||
virtual void Delete()
|
||||
{
|
||||
try { Close (); } catch (Exception^) {}
|
||||
File::Delete(_path);
|
||||
}
|
||||
|
||||
virtual property Int64 FinalSampleCount {
|
||||
Int64 get() {
|
||||
return _finalSampleCount;
|
||||
}
|
||||
void set(Int64 value) {
|
||||
if (value < 0) {
|
||||
throw gcnew Exception("Invalid final sample count.");
|
||||
}
|
||||
if (_initialized) {
|
||||
throw gcnew Exception("Final sample count cannot be changed after encoding begins.");
|
||||
}
|
||||
_finalSampleCount = value;
|
||||
}
|
||||
}
|
||||
|
||||
virtual property Int64 BlockSize
|
||||
{
|
||||
void set(Int64 value)
|
||||
{
|
||||
_blockSize = value;
|
||||
}
|
||||
}
|
||||
|
||||
virtual property int BitsPerSample
|
||||
{
|
||||
int get() { return _bitsPerSample; }
|
||||
}
|
||||
|
||||
virtual bool SetTags (NameValueCollection^ tags)
|
||||
{
|
||||
_tags = tags;
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual property String^ Path {
|
||||
String^ get() {
|
||||
return _path;
|
||||
}
|
||||
}
|
||||
|
||||
virtual void Write(array<Int32, 2>^ sampleBuffer, UInt32 sampleCount) {
|
||||
if (!_initialized) Initialize();
|
||||
|
||||
if ((_sampleBuffer == nullptr) || (_sampleBuffer->Length < sampleCount * _channelCount))
|
||||
_sampleBuffer = gcnew array<long> (sampleCount * _channelCount);
|
||||
|
||||
interior_ptr<Int32> pSampleBuffer = &sampleBuffer[0, 0];
|
||||
interior_ptr<long> pTTABuffer = &_sampleBuffer[0];
|
||||
for (int i = 0; i < sampleCount * _channelCount; i++)
|
||||
pTTABuffer[i] = pSampleBuffer[i];
|
||||
|
||||
pin_ptr<long> buffer = &_sampleBuffer[0];
|
||||
try
|
||||
{
|
||||
_ttaWriter->CompressBlock(buffer, sampleCount);
|
||||
} catch (TTALib::TTAException ex)
|
||||
{
|
||||
throw gcnew Exception(String::Format("TTA encoder: {0}", gcnew String(TTAErrorsStr[ex.GetErrNo()])));
|
||||
}
|
||||
|
||||
_samplesWritten += sampleCount;
|
||||
}
|
||||
|
||||
property Int32 CompressionLevel {
|
||||
Int32 get() {
|
||||
return _compressionLevel;
|
||||
}
|
||||
void set(Int32 value) {
|
||||
if ((value < 0) || (value > 8)) {
|
||||
throw gcnew Exception("Invalid compression level.");
|
||||
}
|
||||
_compressionLevel = value;
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
TTALib::TTAWriter* _ttaWriter;
|
||||
FileStream^ _IO;
|
||||
array<long>^ _sampleBuffer;
|
||||
bool _initialized;
|
||||
String^ _path;
|
||||
Int64 _finalSampleCount, _samplesWritten, _blockSize;
|
||||
Int32 _bitsPerSample, _channelCount, _sampleRate;
|
||||
Int32 _compressionLevel;
|
||||
NameValueCollection^ _tags;
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
if (!_finalSampleCount)
|
||||
throw gcnew Exception("FinalSampleCount not set.");
|
||||
|
||||
//FLAC__StreamMetadata *padding, *seektable, *vorbiscomment;
|
||||
|
||||
//_metadataList = new FLAC__StreamMetadata*[8];
|
||||
//_metadataCount = 0;
|
||||
|
||||
//if (_finalSampleCount != 0) {
|
||||
// seektable = FLAC__metadata_object_new(FLAC__METADATA_TYPE_SEEKTABLE);
|
||||
// FLAC__metadata_object_seektable_template_append_spaced_points_by_samples(
|
||||
// seektable, _sampleRate * 10, _finalSampleCount);
|
||||
// FLAC__metadata_object_seektable_template_sort(seektable, true);
|
||||
// _metadataList[_metadataCount++] = seektable;
|
||||
//}
|
||||
|
||||
//vorbiscomment = FLAC__metadata_object_new(FLAC__METADATA_TYPE_VORBIS_COMMENT);
|
||||
|
||||
//for (int tagno = 0; tagno < _tags->Count; tagno++)
|
||||
//{
|
||||
// String ^ tag_name = _tags->GetKey(tagno);
|
||||
// int tag_len = tag_name->Length;
|
||||
// char * tag = new char [tag_len + 1];
|
||||
// IntPtr nameChars = Marshal::StringToHGlobalAnsi(tag_name);
|
||||
// memcpy (tag, (const char*)nameChars.ToPointer(), tag_len);
|
||||
// Marshal::FreeHGlobal(nameChars);
|
||||
// tag[tag_len] = 0;
|
||||
|
||||
// array<String^>^ tag_values = _tags->GetValues(tagno);
|
||||
// for (int valno = 0; valno < tag_values->Length; valno++)
|
||||
// {
|
||||
// UTF8Encoding^ enc = gcnew UTF8Encoding();
|
||||
// array<Byte>^ value_array = enc->GetBytes (tag_values[valno]);
|
||||
// int value_len = value_array->Length;
|
||||
// char * value = new char [value_len + 1];
|
||||
// Marshal::Copy (value_array, 0, (IntPtr) value, value_len);
|
||||
// value[value_len] = 0;
|
||||
|
||||
// FLAC__StreamMetadata_VorbisComment_Entry entry;
|
||||
// /* create and entry and append it */
|
||||
// if(!FLAC__metadata_object_vorbiscomment_entry_from_name_value_pair(&entry, tag, value)) {
|
||||
// throw gcnew Exception("Unable to add tags, must be valid utf8.");
|
||||
// }
|
||||
// if(!FLAC__metadata_object_vorbiscomment_append_comment(vorbiscomment, entry, /*copy=*/false)) {
|
||||
// throw gcnew Exception("Unable to add tags.");
|
||||
// }
|
||||
// delete [] value;
|
||||
// }
|
||||
// delete [] tag;
|
||||
//}
|
||||
//_metadataList[_metadataCount++] = vorbiscomment;
|
||||
|
||||
//if (_paddingLength != 0) {
|
||||
// padding = FLAC__metadata_object_new(FLAC__METADATA_TYPE_PADDING);
|
||||
// padding->length = _paddingLength;
|
||||
// _metadataList[_metadataCount++] = padding;
|
||||
//}
|
||||
|
||||
//FLAC__stream_encoder_set_metadata(_encoder, _metadataList, _metadataCount);
|
||||
|
||||
//FLAC__stream_encoder_set_verify(_encoder, _verify);
|
||||
|
||||
//if (_finalSampleCount != 0) {
|
||||
// FLAC__stream_encoder_set_total_samples_estimate(_encoder, _finalSampleCount);
|
||||
//}
|
||||
|
||||
//FLAC__stream_encoder_set_compression_level(_encoder, _compressionLevel);
|
||||
|
||||
//if (_blockSize > 0)
|
||||
// FLAC__stream_encoder_set_blocksize(_encoder, (unsigned)_blockSize);
|
||||
|
||||
//if (FLAC__stream_encoder_init_FILE(_encoder, hFile, NULL, NULL) !=
|
||||
// FLAC__STREAM_ENCODER_INIT_STATUS_OK)
|
||||
//{
|
||||
// throw gcnew Exception("Unable to initialize the encoder.");
|
||||
//}
|
||||
|
||||
_IO = gcnew FileStream (_path, FileMode::Create, FileAccess::Write, FileShare::Read);
|
||||
try
|
||||
{
|
||||
_ttaWriter = new TTALib::TTAWriter((HANDLE)_IO->Handle, 0, WAVE_FORMAT_PCM, _channelCount, _bitsPerSample, _sampleRate, _finalSampleCount);
|
||||
} catch (TTALib::TTAException ex)
|
||||
{
|
||||
throw gcnew Exception(String::Format("TTA encoder: {0}", gcnew String(TTAErrorsStr[ex.GetErrNo()])));
|
||||
}
|
||||
_initialized = true;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,79 +92,6 @@
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)..\bin\$(PlatformName)\$(ConfigurationName)"
|
||||
IntermediateDirectory="$(SolutionDir)..\obj\$(ProjectName)\$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
CharacterSet="1"
|
||||
ManagedExtensions="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="2"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="$(NoInherit)"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|x64"
|
||||
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
|
||||
@@ -240,6 +167,79 @@
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)..\bin\$(PlatformName)\$(ConfigurationName)"
|
||||
IntermediateDirectory="$(SolutionDir)..\obj\$(ProjectName)\$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
CharacterSet="1"
|
||||
ManagedExtensions="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="2"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="$(NoInherit)"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|x64"
|
||||
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
|
||||
@@ -332,6 +332,10 @@
|
||||
ReferencedProjectIdentifier="{6458A13A-30EF-45A9-9D58-E5031B17BEE2}"
|
||||
RelativePathToProject="..\CUETools.Codecs\CUETools.Codecs.csproj"
|
||||
/>
|
||||
<ProjectReference
|
||||
ReferencedProjectIdentifier="{CA200BCB-DFC6-4153-9BD4-785BC768B26B}"
|
||||
RelativePathToProject="..\APETagDotNet\APETagDotNet.csproj"
|
||||
/>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
@@ -359,7 +363,7 @@
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
Name="Debug|x64"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
@@ -367,7 +371,7 @@
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|x64"
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
|
||||
@@ -198,6 +198,11 @@ namespace CUETools { namespace Codecs { namespace WavPack {
|
||||
}
|
||||
}
|
||||
|
||||
virtual array<Int32, 2>^ Read(array<Int32, 2>^ buff)
|
||||
{
|
||||
return AudioSamples::Read(this, buff);
|
||||
}
|
||||
|
||||
virtual UInt32 Read(array<Int32, 2>^ sampleBuffer, UInt32 sampleCount)
|
||||
{
|
||||
pin_ptr<Int32> pSampleBuffer = &sampleBuffer[0, 0];
|
||||
|
||||
@@ -3,12 +3,14 @@ using System.IO;
|
||||
using System.Text;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Threading;
|
||||
|
||||
namespace CUETools.Codecs
|
||||
{
|
||||
public interface IAudioSource
|
||||
{
|
||||
uint Read(int[,] buff, uint sampleCount);
|
||||
int[,] Read(int[,] buff);
|
||||
ulong Length { get; }
|
||||
ulong Position { get; set; }
|
||||
NameValueCollection Tags { get; set; }
|
||||
@@ -128,6 +130,19 @@ namespace CUETools.Codecs
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static int[,] Read(IAudioSource source, int[,] buff)
|
||||
{
|
||||
if (source.Remaining == 0) return null;
|
||||
uint toRead = Math.Min(65536U, (uint)source.Remaining);
|
||||
if (buff == null || (ulong)buff.GetLength(0) > source.Remaining)
|
||||
buff = new int[toRead, source.ChannelCount];
|
||||
else
|
||||
toRead = (uint)buff.GetLength(0);
|
||||
uint samplesRead = source.Read(buff, toRead);
|
||||
if (samplesRead != toRead) throw new Exception("samples read != requested");
|
||||
return buff;
|
||||
}
|
||||
}
|
||||
|
||||
public class DummyWriter : IAudioDest
|
||||
@@ -266,6 +281,19 @@ namespace CUETools.Codecs
|
||||
return sampleCount;
|
||||
}
|
||||
|
||||
public int[,] Read(int[,] buff)
|
||||
{
|
||||
if (buff != null && buff.GetLength(0) <= (int)Remaining)
|
||||
{
|
||||
_sampleOffset += (ulong) buff.GetLength(0);
|
||||
Array.Clear(buff, 0, buff.Length);
|
||||
return buff;
|
||||
}
|
||||
ulong samples = Math.Min(Remaining, (ulong)4096);
|
||||
_sampleCount += samples;
|
||||
return new int[samples, ChannelCount];
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
}
|
||||
@@ -487,12 +515,6 @@ namespace CUETools.Codecs
|
||||
return false;
|
||||
}
|
||||
|
||||
public void GetTags(out List<string> names, out List<string> values)
|
||||
{
|
||||
names = new List<string>();
|
||||
values = new List<string>();
|
||||
}
|
||||
|
||||
public uint Read(int[,] buff, uint sampleCount)
|
||||
{
|
||||
if (sampleCount > Remaining)
|
||||
@@ -511,6 +533,11 @@ namespace CUETools.Codecs
|
||||
return sampleCount;
|
||||
}
|
||||
|
||||
public int[,] Read(int[,] buff)
|
||||
{
|
||||
return AudioSamples.Read(this, buff);
|
||||
}
|
||||
|
||||
public string Path { get { return _path; } }
|
||||
}
|
||||
|
||||
@@ -701,4 +728,283 @@ namespace CUETools.Codecs
|
||||
|
||||
public string Path { get { return _path; } }
|
||||
}
|
||||
|
||||
public class AudioPipe : IAudioSource//, IDisposable
|
||||
{
|
||||
private readonly Queue<int[,]> _buffer = new Queue<int[,]>();
|
||||
int _bitsPerSample, _channelCount, _sampleRate, _bufferPos;
|
||||
ulong _sampleLen, _samplePos;
|
||||
private int _maxLength;
|
||||
private Thread _workThread;
|
||||
IAudioSource _source;
|
||||
bool _close = false;
|
||||
Exception _ex = null;
|
||||
|
||||
public AudioPipe(IAudioSource source, int maxLength)
|
||||
{
|
||||
_source = source;
|
||||
_maxLength = maxLength;
|
||||
_bitsPerSample = _source.BitsPerSample;
|
||||
_channelCount = _source.ChannelCount;
|
||||
_sampleRate = _source.SampleRate;
|
||||
_sampleLen = _source.Length;
|
||||
_samplePos = 0;
|
||||
_bufferPos = 0;
|
||||
}
|
||||
|
||||
private void Decompress(object o)
|
||||
{
|
||||
// catch
|
||||
try
|
||||
{
|
||||
do
|
||||
{
|
||||
//int[,] buff = new int[65536, 2];
|
||||
//uint toRead = Math.Min((uint)buff.GetLength(0), (uint)_source.Remaining);
|
||||
//uint samplesRead = _source.Read(buff, toRead);
|
||||
int[,] buff = _source.Read(null);
|
||||
if (buff == null) break;
|
||||
//uint samplesRead = buff.GetLength(0);
|
||||
//if (samplesRead == 0) break;
|
||||
//if (samplesRead != toRead)
|
||||
// throw new Exception("samples read != samples requested");
|
||||
Write(buff);
|
||||
} while (true);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
lock (_buffer)
|
||||
{
|
||||
_ex = ex;
|
||||
Monitor.Pulse(_buffer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void Go()
|
||||
{
|
||||
if (_workThread != null || _ex != null) return;
|
||||
_workThread = new Thread(Decompress);
|
||||
_workThread.Priority = ThreadPriority.BelowNormal;
|
||||
_workThread.IsBackground = true;
|
||||
_workThread.Start(null);
|
||||
}
|
||||
|
||||
//public new void Dispose()
|
||||
//{
|
||||
// _buffer.Clear();
|
||||
//}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
lock (_buffer)
|
||||
{
|
||||
_close = true;
|
||||
Monitor.Pulse(_buffer);
|
||||
}
|
||||
if (_workThread != null)
|
||||
{
|
||||
_workThread.Join();
|
||||
_workThread = null;
|
||||
}
|
||||
_buffer.Clear();
|
||||
}
|
||||
|
||||
public ulong Position
|
||||
{
|
||||
get
|
||||
{
|
||||
return _samplePos;
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new Exception("not supported");
|
||||
}
|
||||
}
|
||||
|
||||
public ulong Length
|
||||
{
|
||||
get
|
||||
{
|
||||
return _sampleLen;
|
||||
}
|
||||
}
|
||||
|
||||
public ulong Remaining
|
||||
{
|
||||
get
|
||||
{
|
||||
return _sampleLen - _samplePos;
|
||||
}
|
||||
}
|
||||
|
||||
public int ChannelCount
|
||||
{
|
||||
get
|
||||
{
|
||||
return _channelCount;
|
||||
}
|
||||
}
|
||||
|
||||
public int SampleRate
|
||||
{
|
||||
get
|
||||
{
|
||||
return _sampleRate;
|
||||
}
|
||||
}
|
||||
|
||||
public int BitsPerSample
|
||||
{
|
||||
get
|
||||
{
|
||||
return _bitsPerSample;
|
||||
}
|
||||
}
|
||||
|
||||
public NameValueCollection Tags
|
||||
{
|
||||
get
|
||||
{
|
||||
return _source.Tags;
|
||||
//return new NameValueCollection();
|
||||
}
|
||||
set
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public bool UpdateTags(bool preserveTime)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public int[,] Read(int[,] buff)
|
||||
{
|
||||
Go();
|
||||
if (Remaining == 0)
|
||||
return null;
|
||||
if (_bufferPos != 0)
|
||||
throw new Exception("Mixed Read usage not yet suppoted");
|
||||
lock (_buffer)
|
||||
{
|
||||
while (_buffer.Count == 0 && _ex == null)
|
||||
Monitor.Wait(_buffer);
|
||||
if (_ex != null)
|
||||
throw _ex;
|
||||
buff = _buffer.Dequeue();
|
||||
Monitor.Pulse(_buffer);
|
||||
}
|
||||
return buff;
|
||||
}
|
||||
|
||||
public uint Read(int[,] buff, uint sampleCount)
|
||||
{
|
||||
Go();
|
||||
if (sampleCount > Remaining)
|
||||
sampleCount = (uint)Remaining;
|
||||
int pos = 0;
|
||||
while (sampleCount > 0)
|
||||
{
|
||||
lock (_buffer)
|
||||
{
|
||||
while (_buffer.Count == 0 && _ex == null)
|
||||
Monitor.Wait(_buffer);
|
||||
if (_ex != null)
|
||||
throw _ex;
|
||||
int[,] chunk = _buffer.Peek();
|
||||
int copyCount = Math.Min((int)sampleCount, chunk.GetLength(0) - _bufferPos);
|
||||
Array.Copy(chunk, _bufferPos * _channelCount, buff, pos * _channelCount, copyCount * _channelCount);
|
||||
pos += copyCount;
|
||||
sampleCount -= (uint) copyCount;
|
||||
_samplePos += (ulong) copyCount;
|
||||
_bufferPos += copyCount;
|
||||
if (_bufferPos == chunk.GetLength(0))
|
||||
{
|
||||
_buffer.Dequeue(); // .Finalize?
|
||||
_bufferPos = 0;
|
||||
Monitor.Pulse(_buffer);
|
||||
}
|
||||
}
|
||||
}
|
||||
return (uint) pos;
|
||||
}
|
||||
|
||||
public void Write(int[,] buff)
|
||||
{
|
||||
lock (_buffer)
|
||||
{
|
||||
while (_buffer.Count >= _maxLength && !_close)
|
||||
Monitor.Wait(_buffer);
|
||||
if (_close)
|
||||
throw new Exception("Decompression aborted");
|
||||
//_flushed = false;
|
||||
_buffer.Enqueue(buff);
|
||||
Monitor.Pulse(_buffer);
|
||||
}
|
||||
}
|
||||
|
||||
public string Path { get { return _source.Path; } }
|
||||
}
|
||||
|
||||
public class Crc32
|
||||
{
|
||||
uint[] table = new uint[256];
|
||||
|
||||
public uint ComputeChecksum(uint crc, byte val)
|
||||
{
|
||||
return (crc >> 8) ^ table[(crc & 0xff) ^ val];
|
||||
}
|
||||
|
||||
public uint ComputeChecksum(uint crc, byte[] bytes, int pos, int count)
|
||||
{
|
||||
for (int i = pos; i < pos + count; i++)
|
||||
crc = ComputeChecksum(crc, bytes[i]);
|
||||
return crc;
|
||||
}
|
||||
|
||||
public uint ComputeChecksum(uint crc, uint s)
|
||||
{
|
||||
return ComputeChecksum(ComputeChecksum(ComputeChecksum(ComputeChecksum(
|
||||
crc, (byte)s), (byte)(s >> 8)), (byte)(s >> 16)), (byte)(s >> 24));
|
||||
}
|
||||
|
||||
public unsafe uint ComputeChecksum(uint crc, int * samples, uint count)
|
||||
{
|
||||
for (uint i = 0; i < count; i++)
|
||||
{
|
||||
int s1 = samples[2 * i], s2 = samples[2 * i + 1];
|
||||
crc = ComputeChecksum(ComputeChecksum(ComputeChecksum(ComputeChecksum(
|
||||
crc, (byte)s1), (byte)(s1 >> 8)), (byte)(s2)), (byte)(s2 >> 8));
|
||||
}
|
||||
return crc;
|
||||
}
|
||||
|
||||
uint Reflect(uint val, int ch)
|
||||
{
|
||||
uint value = 0;
|
||||
// Swap bit 0 for bit 7
|
||||
// bit 1 for bit 6, etc.
|
||||
for (int i = 1; i < (ch + 1); i++)
|
||||
{
|
||||
if (0 != (val & 1))
|
||||
value |= 1U << (ch - i);
|
||||
val >>= 1;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
const uint ulPolynomial = 0x04c11db7;
|
||||
|
||||
public Crc32()
|
||||
{
|
||||
for (uint i = 0; i < table.Length; i++)
|
||||
{
|
||||
table[i] = Reflect(i, 8) << 24;
|
||||
for (int j = 0; j < 8; j++)
|
||||
table[i] = (table[i] << 1) ^ ((table[i] & (1U << 31)) == 0 ? 0 : ulPolynomial);
|
||||
table[i] = Reflect(table[i], 32);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,9 +2,12 @@ using System;
|
||||
using System.IO;
|
||||
using CUETools.Codecs;
|
||||
using CUETools.Codecs.ALAC;
|
||||
#if !MONO
|
||||
using CUETools.Codecs.FLAC;
|
||||
using CUETools.Codecs.WavPack;
|
||||
using CUETools.Codecs.APE;
|
||||
using CUETools.Codecs.TTA;
|
||||
#endif
|
||||
using CUETools.Codecs.LossyWAV;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
@@ -27,9 +30,11 @@ namespace CUETools.Processor
|
||||
return new WavPackReader(path, IO, null);
|
||||
case ".ape":
|
||||
return new APEReader(path, IO);
|
||||
case ".tta":
|
||||
return new TTAReader(path, IO);
|
||||
#endif
|
||||
default:
|
||||
throw new Exception("Unsupported audio type.");
|
||||
throw new Exception("Unsupported audio type: " + path);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,7 +49,15 @@ namespace CUETools.Processor
|
||||
string lossyPath = Path.Combine(Path.GetDirectoryName(path), Path.GetFileNameWithoutExtension(filename) + ".lossy" + extension);
|
||||
string lwcdfPath = Path.Combine(Path.GetDirectoryName(path), Path.GetFileNameWithoutExtension(filename) + ".lwcdf" + extension);
|
||||
IAudioSource lossySource = GetAudioSource(lossyPath, null, extension);
|
||||
IAudioSource lwcdfSource = GetAudioSource(lwcdfPath, null, extension);
|
||||
IAudioSource lwcdfSource = null;
|
||||
try
|
||||
{
|
||||
lwcdfSource = GetAudioSource(lwcdfPath, null, extension);
|
||||
}
|
||||
catch
|
||||
{
|
||||
return lossySource;
|
||||
}
|
||||
return new LossyWAVReader(lossySource, lwcdfSource);
|
||||
}
|
||||
|
||||
@@ -70,12 +83,15 @@ namespace CUETools.Processor
|
||||
dest = new APEWriter(path, bitsPerSample, channelCount, sampleRate);
|
||||
((APEWriter)dest).CompressionLevel = (int)config.apeCompressionLevel;
|
||||
break;
|
||||
case ".tta":
|
||||
dest = new TTAWriter(path, bitsPerSample, channelCount, sampleRate);
|
||||
break;
|
||||
case ".dummy":
|
||||
dest = new DummyWriter(path, bitsPerSample, channelCount, sampleRate);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
throw new Exception("Unsupported audio type.");
|
||||
throw new Exception("Unsupported audio type: " + path);
|
||||
}
|
||||
dest.FinalSampleCount = finalSampleCount;
|
||||
return dest;
|
||||
|
||||
@@ -80,10 +80,18 @@
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AudioReadWrite.cs" />
|
||||
<Compile Include="frmProperties.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="frmProperties.Designer.cs">
|
||||
<DependentUpon>frmProperties.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Processor.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Settings.cs" />
|
||||
@@ -97,6 +105,10 @@
|
||||
<Project>{9AE965C4-301E-4C01-B90F-297AF341ACC6}</Project>
|
||||
<Name>CUETools.Codecs.APE</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\CUETools.Codecs.TTA\CUETools.Codecs.TTA.vcproj">
|
||||
<Project>{1D1E99BC-6D22-41C0-BD94-FF4DD5EC725B}</Project>
|
||||
<Name>CUETools.Codecs.TTA</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\CUETools.Codecs\CUETools.Codecs.csproj">
|
||||
<Project>{6458A13A-30EF-45A9-9D58-E5031B17BEE2}</Project>
|
||||
<Name>CUETools.Codecs</Name>
|
||||
@@ -117,6 +129,10 @@
|
||||
<Project>{E70FA90A-7012-4A52-86B5-362B699D1540}</Project>
|
||||
<Name>CUETools.Codecs.FLAC</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Freedb\Freedb.csproj">
|
||||
<Project>{5ADCFD6D-BFEA-4B10-BB45-9083BBB56AF4}</Project>
|
||||
<Name>Freedb</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\HDCDDotNet\HDCDDotNet.csproj">
|
||||
<Project>{32338A04-5B6B-4C63-8EE7-C6400F73B5D7}</Project>
|
||||
<Name>HDCDDotNet</Name>
|
||||
@@ -138,6 +154,12 @@
|
||||
<Name>CUETools.Codecs.WavPack</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="frmProperties.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>frmProperties.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
||||
@@ -37,6 +37,7 @@ using CUETools.CDImage;
|
||||
using CUETools.AccurateRip;
|
||||
using CUETools.Ripper.SCSI;
|
||||
using MusicBrainz;
|
||||
using Freedb;
|
||||
#if !MONO
|
||||
using UnRarDotNet;
|
||||
using CUETools.Codecs.FLAC;
|
||||
@@ -50,6 +51,7 @@ namespace CUETools.Processor
|
||||
FLAC,
|
||||
WavPack,
|
||||
APE,
|
||||
TTA,
|
||||
NoAudio
|
||||
}
|
||||
|
||||
@@ -78,6 +80,7 @@ namespace CUETools.Processor
|
||||
case OutputAudioFormat.FLAC: return ".flac";
|
||||
case OutputAudioFormat.WavPack: return ".wv";
|
||||
case OutputAudioFormat.APE: return ".ape";
|
||||
case OutputAudioFormat.TTA: return ".tta";
|
||||
case OutputAudioFormat.WAV: return ".wav";
|
||||
case OutputAudioFormat.NoAudio: return ".dummy";
|
||||
}
|
||||
@@ -108,6 +111,23 @@ namespace CUETools.Processor
|
||||
return null;
|
||||
}
|
||||
|
||||
//public static CUELine FindCUELine(List<CUELine> list, string [] commands)
|
||||
//{
|
||||
// foreach (CUELine line in list)
|
||||
// {
|
||||
// if (line.Params.Count < commands.Length)
|
||||
// continue;
|
||||
// for (int i = 0; i < commands.Length; i++)
|
||||
// {
|
||||
// if (line.Params[i].ToUpper() != commands[i].ToUpper())
|
||||
// break;
|
||||
// if (i == commands.Length - 1)
|
||||
// return line;
|
||||
// }
|
||||
// }
|
||||
// return null;
|
||||
//}
|
||||
|
||||
public static void SetCUELine(List<CUELine> list, string command, string value, bool quoted)
|
||||
{
|
||||
CUELine line = General.FindCUELine(list, command);
|
||||
@@ -143,6 +163,22 @@ namespace CUETools.Processor
|
||||
}
|
||||
}
|
||||
|
||||
public static void DelCUELine(List<CUELine> list, string command, string command2)
|
||||
{
|
||||
CUELine line = General.FindCUELine(list, command, command2);
|
||||
if (line == null)
|
||||
return;
|
||||
list.Remove(line);
|
||||
}
|
||||
|
||||
public static void DelCUELine(List<CUELine> list, string command)
|
||||
{
|
||||
CUELine line = General.FindCUELine(list, command);
|
||||
if (line == null)
|
||||
return;
|
||||
list.Remove(line);
|
||||
}
|
||||
|
||||
public static string ReplaceMultiple(string s, List<string> find, List<string> replace)
|
||||
{
|
||||
if (find.Count != replace.Count)
|
||||
@@ -217,7 +253,9 @@ namespace CUETools.Processor
|
||||
public string specialExceptions;
|
||||
public bool replaceSpaces;
|
||||
public bool embedLog;
|
||||
public bool extractLog;
|
||||
public bool fillUpCUE;
|
||||
public bool overwriteCUEData;
|
||||
public bool filenamesANSISafe;
|
||||
public bool bruteForceDTL;
|
||||
public bool detectHDCD;
|
||||
@@ -261,7 +299,9 @@ namespace CUETools.Processor
|
||||
specialExceptions = "-()";
|
||||
replaceSpaces = false;
|
||||
embedLog = true;
|
||||
extractLog = true;
|
||||
fillUpCUE = true;
|
||||
overwriteCUEData = false;
|
||||
filenamesANSISafe = true;
|
||||
bruteForceDTL = false;
|
||||
detectHDCD = true;
|
||||
@@ -269,7 +309,7 @@ namespace CUETools.Processor
|
||||
decodeHDCD = false;
|
||||
createM3U = false;
|
||||
createTOC = false;
|
||||
createCUEFileWhenEmbedded = false;
|
||||
createCUEFileWhenEmbedded = true;
|
||||
truncate4608ExtraSamples = true;
|
||||
lossyWAVQuality = 5;
|
||||
lossyWAVHybrid = true;
|
||||
@@ -306,7 +346,9 @@ namespace CUETools.Processor
|
||||
sw.Save("SpecialCharactersExceptions", specialExceptions);
|
||||
sw.Save("ReplaceSpaces", replaceSpaces);
|
||||
sw.Save("EmbedLog", embedLog);
|
||||
sw.Save("ExtractLog", extractLog);
|
||||
sw.Save("FillUpCUE", fillUpCUE);
|
||||
sw.Save("OverwriteCUEData", overwriteCUEData);
|
||||
sw.Save("FilenamesANSISafe", filenamesANSISafe);
|
||||
sw.Save("BruteForceDTL", bruteForceDTL);
|
||||
sw.Save("DetectHDCD", detectHDCD);
|
||||
@@ -351,7 +393,9 @@ namespace CUETools.Processor
|
||||
specialExceptions = sr.Load("SpecialCharactersExceptions") ?? "-()";
|
||||
replaceSpaces = sr.LoadBoolean("ReplaceSpaces") ?? false;
|
||||
embedLog = sr.LoadBoolean("EmbedLog") ?? true;
|
||||
extractLog = sr.LoadBoolean("ExtractLog") ?? true;
|
||||
fillUpCUE = sr.LoadBoolean("FillUpCUE") ?? true;
|
||||
overwriteCUEData = sr.LoadBoolean("OverwriteCUEData") ?? false;
|
||||
filenamesANSISafe = sr.LoadBoolean("FilenamesANSISafe") ?? true;
|
||||
bruteForceDTL = sr.LoadBoolean("BruteForceDTL") ?? false;
|
||||
detectHDCD = sr.LoadBoolean("DetectHDCD") ?? true;
|
||||
@@ -359,7 +403,7 @@ namespace CUETools.Processor
|
||||
decodeHDCD = sr.LoadBoolean("DecodeHDCD") ?? false;
|
||||
createM3U = sr.LoadBoolean("CreateM3U") ?? false;
|
||||
createTOC = sr.LoadBoolean("CreateTOC") ?? false;
|
||||
createCUEFileWhenEmbedded = sr.LoadBoolean("CreateCUEFileWhenEmbedded") ?? false;
|
||||
createCUEFileWhenEmbedded = sr.LoadBoolean("CreateCUEFileWhenEmbedded") ?? true;
|
||||
truncate4608ExtraSamples = sr.LoadBoolean("Truncate4608ExtraSamples") ?? true;
|
||||
lossyWAVQuality = sr.LoadInt32("LossyWAVQuality", 0, 10) ?? 5;
|
||||
lossyWAVHybrid = sr.LoadBoolean("LossyWAVHybrid") ?? true;
|
||||
@@ -409,6 +453,13 @@ namespace CUETools.Processor
|
||||
public bool ContinueOperation = true;
|
||||
}
|
||||
|
||||
public class CUEToolsSelectionEventArgs
|
||||
{
|
||||
public string[] choices;
|
||||
public int selection = -1;
|
||||
}
|
||||
|
||||
public delegate void CUEToolsSelectionHandler(object sender, CUEToolsSelectionEventArgs e);
|
||||
public delegate void CUEToolsProgressHandler(object sender, CUEToolsProgressEventArgs e);
|
||||
public delegate void ArchivePasswordRequiredHandler(object sender, ArchivePasswordRequiredEventArgs e);
|
||||
|
||||
@@ -451,6 +502,7 @@ namespace CUETools.Processor
|
||||
|
||||
public event ArchivePasswordRequiredHandler PasswordRequired;
|
||||
public event CUEToolsProgressHandler CUEToolsProgress;
|
||||
public event CUEToolsSelectionHandler CUEToolsSelection;
|
||||
|
||||
public CUESheet(CUEConfig config)
|
||||
{
|
||||
@@ -514,20 +566,106 @@ namespace CUETools.Processor
|
||||
}
|
||||
}
|
||||
|
||||
public void FillFromMusicBrainz(Release release)
|
||||
public void FillFromMusicBrainz(MusicBrainz.Release release)
|
||||
{
|
||||
if (release.GetEvents().Count > 0)
|
||||
General.SetCUELine(_attributes, "REM", "DATE", release.GetEvents()[0].Date.Substring(0, 4), false);
|
||||
Year = release.GetEvents().Count > 0 ? release.GetEvents()[0].Date.Substring(0, 4) : "";
|
||||
Artist = release.GetArtist();
|
||||
Title = release.GetTitle();
|
||||
//Catalog = release.GetEvents().Count > 0 ? release.GetEvents()[0].Barcode : "";
|
||||
for (int i = 1; i <= _toc.AudioTracks; i++)
|
||||
{
|
||||
Track track = release.GetTracks()[(int)_toc[i].Number - 1];
|
||||
MusicBrainz.Track track = release.GetTracks()[(int)_toc[i].Number - 1];
|
||||
Tracks[i - 1].Title = track.GetTitle();
|
||||
Tracks[i - 1].Artist = track.GetArtist();
|
||||
}
|
||||
}
|
||||
|
||||
public void FillFromFreedb(Freedb.CDEntry cdEntry)
|
||||
{
|
||||
Year = cdEntry.Year;
|
||||
Genre = cdEntry.Genre;
|
||||
Artist = cdEntry.Artist;
|
||||
Title = cdEntry.Title;
|
||||
for (int i = 0; i < _toc.AudioTracks; i++)
|
||||
Tracks[i].Title = cdEntry.Tracks[i].Title;
|
||||
}
|
||||
|
||||
public List<object> LookupAlbumInfo()
|
||||
{
|
||||
List<object> Releases = new List<object>();
|
||||
|
||||
ReleaseQueryParameters p = new ReleaseQueryParameters();
|
||||
p.DiscId = _toc.MusicBrainzId;
|
||||
Query<Release> results = Release.Query(p);
|
||||
MusicBrainzService.XmlRequest += new EventHandler<XmlRequestEventArgs>(MusicBrainz_LookupProgress);
|
||||
_progress.percentDisk = 0;
|
||||
try
|
||||
{
|
||||
foreach (MusicBrainz.Release release in results)
|
||||
{
|
||||
release.GetEvents();
|
||||
release.GetTracks();
|
||||
try
|
||||
{
|
||||
foreach (MusicBrainz.Track track in release.GetTracks())
|
||||
;
|
||||
} catch { }
|
||||
try
|
||||
{
|
||||
foreach (MusicBrainz.Event ev in release.GetEvents())
|
||||
;
|
||||
} catch { }
|
||||
Releases.Add(release);
|
||||
}
|
||||
} catch { }
|
||||
MusicBrainzService.XmlRequest -= new EventHandler<XmlRequestEventArgs>(MusicBrainz_LookupProgress);
|
||||
//if (release != null)
|
||||
//{
|
||||
// FillFromMusicBrainz(release);
|
||||
// return;
|
||||
//}
|
||||
//if (cdEntry != null)
|
||||
// FillFromFreedb(cdEntry);
|
||||
|
||||
FreedbHelper m_freedb = new FreedbHelper();
|
||||
|
||||
m_freedb.UserName = "gchudov";
|
||||
m_freedb.Hostname = "gmail.com";
|
||||
m_freedb.ClientName = "CUETools";
|
||||
m_freedb.Version = "1.9.4";
|
||||
m_freedb.SetDefaultSiteAddress("freedb.org");
|
||||
|
||||
QueryResult queryResult;
|
||||
QueryResultCollection coll;
|
||||
string code = string.Empty;
|
||||
CDEntry cdEntry = null;
|
||||
try
|
||||
{
|
||||
code = m_freedb.Query(AccurateRipVerify.CalculateCDDBQuery(_toc), out queryResult, out coll);
|
||||
if (code == FreedbHelper.ResponseCodes.CODE_200)
|
||||
{
|
||||
code = m_freedb.Read(queryResult, out cdEntry);
|
||||
if (code == FreedbHelper.ResponseCodes.CODE_210)
|
||||
Releases.Add(cdEntry);
|
||||
}
|
||||
else
|
||||
if (code == FreedbHelper.ResponseCodes.CODE_210 ||
|
||||
code == FreedbHelper.ResponseCodes.CODE_211)
|
||||
{
|
||||
foreach (QueryResult qr in coll)
|
||||
{
|
||||
code = m_freedb.Read(qr, out cdEntry);
|
||||
if (code == FreedbHelper.ResponseCodes.CODE_210)
|
||||
Releases.Add(cdEntry);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
return Releases;
|
||||
}
|
||||
|
||||
public void Open(string pathIn)
|
||||
{
|
||||
string cueDir = Path.GetDirectoryName(pathIn) ?? pathIn;
|
||||
@@ -543,27 +681,7 @@ namespace CUETools.Processor
|
||||
if (!AccurateRipVerify.FindDriveReadOffset(_ripper.ARName, out driveOffset))
|
||||
throw new Exception("Failed to find drive read offset for drive" + _ripper.ARName);
|
||||
_ripper.DriveOffset = driveOffset;
|
||||
|
||||
Release release;
|
||||
ReleaseQueryParameters p = new ReleaseQueryParameters();
|
||||
p.DiscId = _toc.MusicBrainzId;
|
||||
Query<Release> results = Release.Query(p);
|
||||
MusicBrainzService.XmlRequest += new EventHandler<XmlRequestEventArgs>(MusicBrainz_LookupProgress);
|
||||
_progress.percentDisk = 0;
|
||||
try
|
||||
{
|
||||
release = results.First();
|
||||
if (release != null)
|
||||
{
|
||||
release.GetEvents();
|
||||
release.GetTracks();
|
||||
FillFromMusicBrainz(release);
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
release = null;
|
||||
}
|
||||
LookupAlbumInfo();
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -587,32 +705,79 @@ namespace CUETools.Processor
|
||||
if (cueDir + Path.DirectorySeparatorChar != pathIn && cueDir != pathIn)
|
||||
throw new Exception("Input directory must end on path separator character.");
|
||||
string cueSheet = null;
|
||||
string[] audioExts = new string[] { "*.wav", "*.flac", "*.wv", "*.ape", "*.m4a" };
|
||||
string[] audioExts = new string[] { "*.wav", "*.flac", "*.wv", "*.ape", "*.m4a", "*.tta" };
|
||||
for (i = 0; i < audioExts.Length && cueSheet == null; i++)
|
||||
cueSheet = CUESheet.CreateDummyCUESheet(pathIn, audioExts[i]);
|
||||
if (cueSheet == null)
|
||||
throw new Exception("Input directory doesn't contain supported audio files.");
|
||||
sr = new StringReader(cueSheet);
|
||||
if (CUEToolsSelection != null)
|
||||
{
|
||||
CUEToolsSelectionEventArgs e = new CUEToolsSelectionEventArgs();
|
||||
e.choices = Directory.GetFiles(pathIn, "*.log");
|
||||
if (e.choices.Length > 0)
|
||||
{
|
||||
CUEToolsSelection(this, e);
|
||||
if (e.selection != -1)
|
||||
{
|
||||
StreamReader logReader = new StreamReader(e.choices[e.selection], CUESheet.Encoding);
|
||||
_eacLog = logReader.ReadToEnd();
|
||||
logReader.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#if !MONO
|
||||
else if (Path.GetExtension(pathIn).ToLower() == ".rar")
|
||||
{
|
||||
Unrar _unrar = new Unrar();
|
||||
_unrar.PasswordRequired += new PasswordRequiredHandler(unrar_PasswordRequired);
|
||||
string cueName = null, cueText = null;
|
||||
string cueName = null, cueText = null, logName = null;
|
||||
List<string> cueNames = new List<string>();
|
||||
List<string> logNames = new List<string>();
|
||||
_unrar.Open(pathIn, Unrar.OpenMode.List);
|
||||
_archiveContents = new List<string>();
|
||||
while (_unrar.ReadHeader())
|
||||
{
|
||||
if (!_unrar.CurrentFile.IsDirectory)
|
||||
{
|
||||
_archiveContents.Add(_unrar.CurrentFile.FileName);
|
||||
if (Path.GetExtension(_unrar.CurrentFile.FileName).ToLower() == ".cue")
|
||||
cueName = _unrar.CurrentFile.FileName;
|
||||
}
|
||||
_unrar.Skip();
|
||||
}
|
||||
_unrar.Close();
|
||||
foreach (string s in _archiveContents)
|
||||
{
|
||||
if (Path.GetExtension(s).ToLower() == ".cue")
|
||||
cueNames.Add(s);
|
||||
if (Path.GetExtension(s).ToLower() == ".log")
|
||||
logNames.Add(s);
|
||||
}
|
||||
|
||||
if (cueNames.Count == 0)
|
||||
throw new Exception("Input archive doesn't contain a cue sheet.");
|
||||
if (cueNames.Count == 1)
|
||||
cueName = cueNames[0];
|
||||
if (cueName == null && CUEToolsSelection != null)
|
||||
{
|
||||
CUEToolsSelectionEventArgs e = new CUEToolsSelectionEventArgs();
|
||||
e.choices = cueNames.ToArray();
|
||||
CUEToolsSelection(this, e);
|
||||
if (e.selection != -1)
|
||||
cueName = e.choices[e.selection];
|
||||
}
|
||||
if (cueName == null)
|
||||
throw new Exception("Input archive contains several cue sheets.");
|
||||
|
||||
if (logNames.Contains(Path.ChangeExtension(cueName, ".log")))
|
||||
logName = Path.ChangeExtension(cueName, ".log");
|
||||
if (logName == null && CUEToolsSelection != null && logNames.Count > 0)
|
||||
{
|
||||
CUEToolsSelectionEventArgs e = new CUEToolsSelectionEventArgs();
|
||||
e.choices = logNames.ToArray();
|
||||
CUEToolsSelection(this, e);
|
||||
if (e.selection != -1)
|
||||
logName = e.choices[e.selection];
|
||||
}
|
||||
|
||||
if (cueName != null)
|
||||
{
|
||||
RarStream rarStream = new RarStream(pathIn, cueName);
|
||||
@@ -626,7 +791,18 @@ namespace CUETools.Processor
|
||||
}
|
||||
if (cueText == null)
|
||||
throw new Exception("Input archive doesn't contain a cue sheet.");
|
||||
if (logName != null)
|
||||
{
|
||||
RarStream rarStream = new RarStream(pathIn, logName);
|
||||
rarStream.PasswordRequired += new PasswordRequiredHandler(unrar_PasswordRequired);
|
||||
StreamReader logReader = new StreamReader(rarStream, CUESheet.Encoding);
|
||||
_eacLog = logReader.ReadToEnd();
|
||||
logReader.Close();
|
||||
rarStream.Close();
|
||||
}
|
||||
_archiveCUEpath = Path.GetDirectoryName(cueName);
|
||||
if (_config.autoCorrectFilenames)
|
||||
cueText = CorrectAudioFilenames(_archiveCUEpath, cueText, false, _archiveContents);
|
||||
sr = new StringReader(cueText);
|
||||
_isArchive = true;
|
||||
_archivePath = pathIn;
|
||||
@@ -639,13 +815,28 @@ namespace CUETools.Processor
|
||||
else
|
||||
sr = new StreamReader (pathIn, CUESheet.Encoding);
|
||||
|
||||
try
|
||||
string logPath = Path.ChangeExtension(pathIn, ".log");
|
||||
if (File.Exists(logPath))
|
||||
{
|
||||
StreamReader logReader = new StreamReader(Path.ChangeExtension(pathIn, ".log"), CUESheet.Encoding);
|
||||
StreamReader logReader = new StreamReader(logPath, CUESheet.Encoding);
|
||||
_eacLog = logReader.ReadToEnd();
|
||||
logReader.Close();
|
||||
}
|
||||
catch { }
|
||||
else if (CUEToolsSelection != null)
|
||||
{
|
||||
CUEToolsSelectionEventArgs e = new CUEToolsSelectionEventArgs();
|
||||
e.choices = Directory.GetFiles(cueDir, "*.log");
|
||||
if (e.choices.Length > 0)
|
||||
{
|
||||
CUEToolsSelection(this, e);
|
||||
if (e.selection != -1)
|
||||
{
|
||||
StreamReader logReader = new StreamReader(e.choices[e.selection], CUESheet.Encoding);
|
||||
_eacLog = logReader.ReadToEnd();
|
||||
logReader.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
} else
|
||||
{
|
||||
IAudioSource audioSource;
|
||||
@@ -869,18 +1060,6 @@ namespace CUETools.Processor
|
||||
_trackFilenames.Add( _hasTrackFilenames ? Path.GetFileName(
|
||||
_sourcePaths[i + (_hasHTOAFilename ? 1 : 0)]) : String.Format("{0:00}.wav", i + 1) );
|
||||
}
|
||||
|
||||
if (_hasTrackFilenames)
|
||||
for (i = 0; i < TrackCount; i++)
|
||||
{
|
||||
TrackInfo track = _tracks[i];
|
||||
string artist = track._trackTags.Get("ARTIST");
|
||||
string title = track._trackTags.Get("TITLE");
|
||||
if (track.Artist == "" && artist != null)
|
||||
track.Artist = artist;
|
||||
if (track.Title == "" && title != null)
|
||||
track.Title = title;
|
||||
}
|
||||
if (!_hasEmbeddedCUESheet && _hasSingleFilename)
|
||||
{
|
||||
_albumTags = _tracks[0]._trackTags;
|
||||
@@ -888,18 +1067,30 @@ namespace CUETools.Processor
|
||||
}
|
||||
if (_config.fillUpCUE)
|
||||
{
|
||||
if (General.FindCUELine(_attributes, "PERFORMER") == null && GetCommonTag("ALBUM ARTIST") != null)
|
||||
if ((_config.overwriteCUEData || General.FindCUELine(_attributes, "PERFORMER") == null) && GetCommonTag("ALBUM ARTIST") != null)
|
||||
General.SetCUELine(_attributes, "PERFORMER", GetCommonTag("ALBUM ARTIST"), true);
|
||||
if (General.FindCUELine(_attributes, "PERFORMER") == null && GetCommonTag("ARTIST") != null)
|
||||
if ((_config.overwriteCUEData || General.FindCUELine(_attributes, "PERFORMER") == null) && GetCommonTag("ARTIST") != null)
|
||||
General.SetCUELine(_attributes, "PERFORMER", GetCommonTag("ARTIST"), true);
|
||||
if (General.FindCUELine(_attributes, "TITLE") == null && GetCommonTag("ALBUM") != null)
|
||||
if ((_config.overwriteCUEData || General.FindCUELine(_attributes, "TITLE") == null) && GetCommonTag("ALBUM") != null)
|
||||
General.SetCUELine(_attributes, "TITLE", GetCommonTag("ALBUM"), true);
|
||||
if (General.FindCUELine(_attributes, "REM", "DATE") == null && GetCommonTag("DATE") != null)
|
||||
if ((_config.overwriteCUEData || General.FindCUELine(_attributes, "REM", "DATE") == null) && GetCommonTag("DATE") != null)
|
||||
General.SetCUELine(_attributes, "REM", "DATE", GetCommonTag("DATE"), false);
|
||||
if (General.FindCUELine(_attributes, "REM", "DATE") == null && GetCommonTag("YEAR") != null)
|
||||
if ((_config.overwriteCUEData || General.FindCUELine(_attributes, "REM", "DATE") == null) && GetCommonTag("YEAR") != null)
|
||||
General.SetCUELine(_attributes, "REM", "DATE", GetCommonTag("YEAR"), false);
|
||||
if (General.FindCUELine(_attributes, "REM", "GENRE") == null && GetCommonTag("GENRE") != null)
|
||||
if ((_config.overwriteCUEData || General.FindCUELine(_attributes, "REM", "GENRE") == null) && GetCommonTag("GENRE") != null)
|
||||
General.SetCUELine(_attributes, "REM", "GENRE", GetCommonTag("GENRE"), true);
|
||||
for (i = 0; i < TrackCount; i++)
|
||||
{
|
||||
TrackInfo track = _tracks[i];
|
||||
string artist = _hasTrackFilenames ? track._trackTags.Get("ARTIST") :
|
||||
_hasEmbeddedCUESheet ? _albumTags.Get(String.Format("cue_track{0:00}_ARTIST", i + 1)) : null;
|
||||
string title = _hasTrackFilenames ? track._trackTags.Get("TITLE") :
|
||||
_hasEmbeddedCUESheet ? _albumTags.Get(String.Format("cue_track{0:00}_TITLE", i + 1)) : null;
|
||||
if ((_config.overwriteCUEData || track.Artist == "") && artist != null)
|
||||
track.Artist = artist;
|
||||
if ((_config.overwriteCUEData || track.Title == "") && title != null)
|
||||
track.Title = title;
|
||||
}
|
||||
}
|
||||
|
||||
CUELine cddbDiscIdLine = General.FindCUELine(_attributes, "REM", "DISCID");
|
||||
@@ -1127,6 +1318,7 @@ namespace CUETools.Processor
|
||||
find.Add("%A"); // 3: Track artist
|
||||
find.Add("%T"); // 4: Track title
|
||||
find.Add("%F"); // 5: Input filename
|
||||
find.Add("%Y"); // 6: Album date
|
||||
|
||||
replace.Add(General.EmptyStringToNull(_config.CleanseString(Artist)));
|
||||
replace.Add(General.EmptyStringToNull(_config.CleanseString(Title)));
|
||||
@@ -1134,7 +1326,8 @@ namespace CUETools.Processor
|
||||
replace.Add(null);
|
||||
replace.Add(null);
|
||||
replace.Add(Path.GetFileNameWithoutExtension(outputPath));
|
||||
|
||||
replace.Add(General.EmptyStringToNull(_config.CleanseString(Year)));
|
||||
|
||||
if (_outputLossyWAV)
|
||||
extension = ".lossy" + extension;
|
||||
if (_config.detectHDCD && _config.decodeHDCD && (!_outputLossyWAV || !_config.decodeHDCDtoLW16))
|
||||
@@ -1331,7 +1524,7 @@ namespace CUETools.Processor
|
||||
{
|
||||
StringWriter sw = new StringWriter();
|
||||
for (int iTrack = 0; iTrack < TrackCount; iTrack++)
|
||||
WriteLine(sw, 0, "\t" + _toc[iTrack+1].Start + 150);
|
||||
sw.WriteLine("\t{0}", _toc[iTrack+1].Start + 150);
|
||||
sw.Close();
|
||||
return sw.ToString();
|
||||
}
|
||||
@@ -1684,6 +1877,9 @@ namespace CUETools.Processor
|
||||
|
||||
if (logContents != null)
|
||||
WriteText(Path.ChangeExtension(_cuePath, ".log"), logContents);
|
||||
else
|
||||
if (_eacLog != null && _config.extractLog)
|
||||
WriteText(Path.ChangeExtension(_cuePath, ".log"), _eacLog);
|
||||
if (style != CUEStyle.SingleFileWithCUE)
|
||||
{
|
||||
WriteText(_cuePath, cueContents);
|
||||
@@ -1823,6 +2019,7 @@ namespace CUETools.Processor
|
||||
|
||||
destTags.Remove("CUESHEET");
|
||||
destTags.Remove("TRACKNUMBER");
|
||||
destTags.Remove("TOTALTRACKS");
|
||||
destTags.Remove("LOG");
|
||||
destTags.Remove("LOGFILE");
|
||||
destTags.Remove("EACLOG");
|
||||
@@ -1833,7 +2030,18 @@ namespace CUETools.Processor
|
||||
destTags.Add("TITLE", _tracks[iTrack].Title);
|
||||
if (destTags.Get("ARTIST") == null && "" != _tracks[iTrack].Artist)
|
||||
destTags.Add("ARTIST", _tracks[iTrack].Artist);
|
||||
destTags.Add("TRACKNUMBER", (iTrack + 1).ToString());
|
||||
if (destTags.Get("ARTIST") == null && "" != Artist)
|
||||
destTags.Add("ARTIST", Artist);
|
||||
if (destTags.Get("ALBUM ARTIST") == null && "" != Artist)
|
||||
destTags.Add("ALBUM ARTIST", Artist);
|
||||
if (destTags.Get("ALBUM") == null && "" != Title)
|
||||
destTags.Add("ALBUM", Title);
|
||||
if (destTags.Get("DATE") == null && "" != Year)
|
||||
destTags.Add("DATE", Year);
|
||||
if (destTags.Get("GENRE") == null && "" != Genre)
|
||||
destTags.Add("GENRE", Genre);
|
||||
destTags.Add("TRACKNUMBER", (iTrack + 1).ToString("00"));
|
||||
destTags.Add("TOTALTRACKS", TrackCount.ToString("00"));
|
||||
if (_config.writeArTagsOnConvert)
|
||||
{
|
||||
if (!_isCD && _accurateRipMode == AccurateRipMode.VerifyThenConvert && _arVerify.AccResult == HttpStatusCode.OK)
|
||||
@@ -1917,7 +2125,7 @@ namespace CUETools.Processor
|
||||
int iSource = -1;
|
||||
int iDest = -1;
|
||||
uint samplesRemSource = 0;
|
||||
CDImageLayout updatedTOC = null;
|
||||
//CDImageLayout updatedTOC = null;
|
||||
|
||||
if (_writeOffset != 0)
|
||||
{
|
||||
@@ -2054,12 +2262,10 @@ namespace CUETools.Processor
|
||||
{
|
||||
if (samplesRemSource == 0)
|
||||
{
|
||||
#if !MONO
|
||||
if (_isCD && audioSource != null && audioSource is CDDriveReader)
|
||||
{
|
||||
updatedTOC = ((CDDriveReader)audioSource).TOC;
|
||||
}
|
||||
#endif
|
||||
//#if !MONO
|
||||
// if (_isCD && audioSource != null && audioSource is CDDriveReader)
|
||||
// updatedTOC = ((CDDriveReader)audioSource).TOC;
|
||||
//#endif
|
||||
if (audioSource != null && !_isCD) audioSource.Close();
|
||||
audioSource = GetAudioSource(++iSource);
|
||||
samplesRemSource = (uint)_sources[iSource].Length;
|
||||
@@ -2140,15 +2346,13 @@ namespace CUETools.Processor
|
||||
}
|
||||
|
||||
#if !MONO
|
||||
if (_isCD && audioSource != null && audioSource is CDDriveReader)
|
||||
//if (_isCD && audioSource != null && audioSource is CDDriveReader)
|
||||
// updatedTOC = ((CDDriveReader)audioSource).TOC;
|
||||
if (_isCD)
|
||||
{
|
||||
updatedTOC = ((CDDriveReader)audioSource).TOC;
|
||||
}
|
||||
if (updatedTOC != null)
|
||||
{
|
||||
_toc = updatedTOC;
|
||||
_toc = (CDImageLayout)_ripper.TOC.Clone();
|
||||
if (_toc.Catalog != null)
|
||||
General.SetCUELine(_attributes, "CATALOG", _toc.Catalog, false);
|
||||
Catalog = _toc.Catalog;
|
||||
for (iTrack = 1; iTrack <= _toc.TrackCount; iTrack++)
|
||||
if (_toc[iTrack].IsAudio)
|
||||
{
|
||||
@@ -2195,11 +2399,12 @@ namespace CUETools.Processor
|
||||
StreamReader sr = new StreamReader(path, CUESheet.Encoding);
|
||||
string cue = sr.ReadToEnd();
|
||||
sr.Close();
|
||||
return CorrectAudioFilenames(Path.GetDirectoryName(path), cue, always);
|
||||
return CorrectAudioFilenames(Path.GetDirectoryName(path), cue, always, null);
|
||||
}
|
||||
|
||||
public static string CorrectAudioFilenames(string dir, string cue, bool always) {
|
||||
string[] audioExts = new string[] { "*.wav", "*.flac", "*.wv", "*.ape", "*.m4a" };
|
||||
public static string CorrectAudioFilenames(string dir, string cue, bool always, List<string> files)
|
||||
{
|
||||
string[] audioExts = new string[] { "*.wav", "*.flac", "*.wv", "*.ape", "*.m4a", "*.tta" };
|
||||
List<string> lines = new List<string>();
|
||||
List<int> filePos = new List<int>();
|
||||
List<string> origFiles = new List<string>();
|
||||
@@ -2218,7 +2423,7 @@ namespace CUETools.Processor
|
||||
if ((fileType != "BINARY") && (fileType != "MOTOROLA")) {
|
||||
filePos.Add(lines.Count - 1);
|
||||
origFiles.Add(line.Params[1]);
|
||||
foundAll &= (LocateFile(dir, line.Params[1], null) != null);
|
||||
foundAll &= (LocateFile(dir, line.Params[1], files) != null);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2235,7 +2440,7 @@ namespace CUETools.Processor
|
||||
for (int j = 0; j < origFiles.Count; j++)
|
||||
{
|
||||
string newFilename = Path.ChangeExtension(Path.GetFileName(origFiles[j]), audioExts[i].Substring(1));
|
||||
foundAll &= LocateFile(dir, newFilename, null) != null;
|
||||
foundAll &= LocateFile(dir, newFilename, files) != null;
|
||||
newFiles.Add (newFilename);
|
||||
}
|
||||
if (foundAll)
|
||||
@@ -2247,7 +2452,15 @@ namespace CUETools.Processor
|
||||
if (!foundAll)
|
||||
for (i = 0; i < audioExts.Length; i++)
|
||||
{
|
||||
audioFiles = Directory.GetFiles(dir == "" ? "." : dir, audioExts[i]);
|
||||
if (files == null)
|
||||
audioFiles = Directory.GetFiles(dir == "" ? "." : dir, audioExts[i]);
|
||||
else
|
||||
{
|
||||
audioFiles = files.FindAll(delegate(string s)
|
||||
{
|
||||
return Path.GetDirectoryName(s) == dir && Path.GetExtension(s) == audioExts[i].Substring(1);
|
||||
}).ToArray();
|
||||
}
|
||||
if (audioFiles.Length == filePos.Count)
|
||||
{
|
||||
Array.Sort(audioFiles);
|
||||
@@ -2360,8 +2573,9 @@ namespace CUETools.Processor
|
||||
#if !MONO
|
||||
if (_isCD)
|
||||
{
|
||||
audioSource = _ripper;
|
||||
audioSource.Position = 0;
|
||||
_ripper.Position = 0;
|
||||
//audioSource = _ripper;
|
||||
audioSource = new AudioPipe(_ripper, 3);
|
||||
} else
|
||||
if (_isArchive)
|
||||
{
|
||||
@@ -2446,17 +2660,65 @@ namespace CUETools.Processor
|
||||
public string Artist {
|
||||
get {
|
||||
CUELine line = General.FindCUELine(_attributes, "PERFORMER");
|
||||
return (line == null) ? String.Empty : line.Params[1];
|
||||
return (line == null || line.Params.Count < 2) ? String.Empty : line.Params[1];
|
||||
}
|
||||
set {
|
||||
General.SetCUELine(_attributes, "PERFORMER", value, true);
|
||||
}
|
||||
}
|
||||
|
||||
public string Year
|
||||
{
|
||||
get
|
||||
{
|
||||
CUELine line = General.FindCUELine(_attributes, "REM", "DATE");
|
||||
return ( line == null || line.Params.Count < 3 ) ? String.Empty : line.Params[2];
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value != "")
|
||||
General.SetCUELine(_attributes, "REM", "DATE", value, false);
|
||||
else
|
||||
General.DelCUELine(_attributes, "REM", "DATE");
|
||||
}
|
||||
}
|
||||
|
||||
public string Genre
|
||||
{
|
||||
get
|
||||
{
|
||||
CUELine line = General.FindCUELine(_attributes, "REM", "GENRE");
|
||||
return (line == null || line.Params.Count < 3) ? String.Empty : line.Params[2];
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value != "")
|
||||
General.SetCUELine(_attributes, "REM", "GENRE", value, true);
|
||||
else
|
||||
General.DelCUELine(_attributes, "REM", "GENRE");
|
||||
}
|
||||
}
|
||||
|
||||
public string Catalog
|
||||
{
|
||||
get
|
||||
{
|
||||
CUELine line = General.FindCUELine(_attributes, "CATALOG");
|
||||
return (line == null || line.Params.Count < 2) ? String.Empty : line.Params[1];
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value != "")
|
||||
General.SetCUELine(_attributes, "CATALOG", value, false);
|
||||
else
|
||||
General.DelCUELine(_attributes, "CATALOG");
|
||||
}
|
||||
}
|
||||
|
||||
public string Title {
|
||||
get {
|
||||
CUELine line = General.FindCUELine(_attributes, "TITLE");
|
||||
return (line == null) ? String.Empty : line.Params[1];
|
||||
return (line == null || line.Params.Count < 2) ? String.Empty : line.Params[1];
|
||||
}
|
||||
set {
|
||||
General.SetCUELine(_attributes, "TITLE", value, true);
|
||||
@@ -2631,7 +2893,7 @@ namespace CUETools.Processor
|
||||
public string Artist {
|
||||
get {
|
||||
CUELine line = General.FindCUELine(_attributes, "PERFORMER");
|
||||
return (line == null) ? String.Empty : line.Params[1];
|
||||
return (line == null || line.Params.Count < 2) ? String.Empty : line.Params[1];
|
||||
}
|
||||
set
|
||||
{
|
||||
@@ -2642,7 +2904,7 @@ namespace CUETools.Processor
|
||||
public string Title {
|
||||
get {
|
||||
CUELine line = General.FindCUELine(_attributes, "TITLE");
|
||||
return (line == null) ? String.Empty : line.Params[1];
|
||||
return (line == null || line.Params.Count < 2) ? String.Empty : line.Params[1];
|
||||
}
|
||||
set
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("CUEToolsLib")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2006-2008 Moitah, Gregory S. Chudov")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2006-2009 Moitah, Gregory S. Chudov")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ namespace CUETools.ConsoleRipper
|
||||
string driveLetter = null;
|
||||
int driveOffset = 0;
|
||||
bool test = false;
|
||||
bool forceD8 = false, forceBE = false;
|
||||
bool forceD8 = false, forceBE = false, quiet = false;
|
||||
for (int arg = 0; arg < args.Length; arg++)
|
||||
{
|
||||
bool ok = true;
|
||||
@@ -113,6 +113,8 @@ namespace CUETools.ConsoleRipper
|
||||
forceD8 = true;
|
||||
else if (args[arg] == "--be")
|
||||
forceBE = true;
|
||||
else if (args[arg] == "-Q" || args[arg] == "--quiet")
|
||||
quiet = true;
|
||||
else if ((args[arg] == "-D" || args[arg] == "--drive") && ++arg < args.Length)
|
||||
driveLetter = args[arg];
|
||||
else if ((args[arg] == "-O" || args[arg] == "--offset") && ++arg < args.Length)
|
||||
@@ -162,7 +164,7 @@ namespace CUETools.ConsoleRipper
|
||||
|
||||
audioSource.DriveOffset = driveOffset;
|
||||
audioSource.CorrectionQuality = correctionQuality;
|
||||
audioSource.DebugMessages = true;
|
||||
audioSource.DebugMessages = !quiet;
|
||||
if (forceD8) audioSource.ForceD8 = true;
|
||||
if (forceBE) audioSource.ForceBE = true;
|
||||
string readCmd = audioSource.AutoDetectReadCommand;
|
||||
|
||||
@@ -8,9 +8,9 @@ using System.Runtime.InteropServices;
|
||||
[assembly: AssemblyTitle("CUETools.Ripper.SCSI")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Microsoft")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("CUETools.Ripper.SCSI")]
|
||||
[assembly: AssemblyCopyright("Copyright © Microsoft 2008")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2008-2009 Greg Chudov")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
@@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: AssemblyVersion("1.9.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.9.0.0")]
|
||||
|
||||
@@ -48,7 +48,8 @@ namespace CUETools.Ripper.SCSI
|
||||
const int CB_AUDIO = 4 * 588 + 2 + 294 + 16;
|
||||
const int MAXSCANS = 20;
|
||||
const int NSECTORS = 16;
|
||||
const int MSECTORS = 5*1024*1024 / (4 * 588);
|
||||
//const int MSECTORS = 5*1024*1024 / (4 * 588);
|
||||
const int MSECTORS = 2400;
|
||||
int _currentTrack = -1, _currentIndex = -1, _currentTrackActualStart = -1;
|
||||
Logger m_logger;
|
||||
CDImageLayout _toc;
|
||||
@@ -170,12 +171,12 @@ namespace CUETools.Ripper.SCSI
|
||||
get
|
||||
{
|
||||
return _readCDCommand == ReadCDCommand.Unknown ? "unknown" :
|
||||
string.Format("{0}, {1}, {2}{3}, {4}, {5} blocks at a time",
|
||||
string.Format("{0}, {1:X2}h, {2}{3}, {4} blocks at a time",
|
||||
(_readCDCommand == ReadCDCommand.ReadCdBEh ? "BEh" : "D8h"),
|
||||
(_mainChannelMode == Device.MainChannelSelection.UserData ? "10h" : "F8h"),
|
||||
(_mainChannelMode == Device.MainChannelSelection.UserData ? 0x10 : 0xF8) +
|
||||
(_c2ErrorMode == Device.C2ErrorMode.None ? 0 : _c2ErrorMode == Device.C2ErrorMode.Mode294 ? 2 : 4),
|
||||
(_subChannelMode == Device.SubChannelMode.None ? "00h" : _subChannelMode == Device.SubChannelMode.QOnly ? "02h" : "04h"),
|
||||
_qChannelInBCD ? "" : "nonBCD",
|
||||
(_c2ErrorMode == Device.C2ErrorMode.None ? "00h" : _c2ErrorMode == Device.C2ErrorMode.Mode294 ? "01h" : "04h"),
|
||||
m_max_sectors);
|
||||
}
|
||||
}
|
||||
@@ -196,9 +197,15 @@ namespace CUETools.Ripper.SCSI
|
||||
|
||||
// Open the base device
|
||||
m_device_letter = Drive;
|
||||
if (m_device != null)
|
||||
Close();
|
||||
|
||||
m_device = new Device(m_logger);
|
||||
if (!m_device.Open(m_device_letter))
|
||||
{
|
||||
m_device = null;
|
||||
throw new Exception("Open failed: SCSI error");
|
||||
}
|
||||
|
||||
// Get device info
|
||||
st = m_device.Inquiry(out m_inqury_result);
|
||||
@@ -249,7 +256,8 @@ namespace CUETools.Ripper.SCSI
|
||||
IList<TocEntry> toc;
|
||||
st = m_device.ReadToc((byte)0, false, out toc);
|
||||
if (st != Device.CommandStatus.Success)
|
||||
throw new Exception("ReadTOC: " + (st == Device.CommandStatus.DeviceFailed ? Device.LookupSenseError(m_device.GetSenseAsc(), m_device.GetSenseAscq()) : st.ToString()));
|
||||
throw new SCSIException("ReadTOC", m_device, st);
|
||||
//throw new Exception("ReadTOC: " + (st == Device.CommandStatus.DeviceFailed ? Device.LookupSenseError(m_device.GetSenseAsc(), m_device.GetSenseAscq()) : st.ToString()));
|
||||
|
||||
st = m_device.ReadCDText(out cdtext);
|
||||
// new CDTextEncoderDecoder
|
||||
@@ -265,7 +273,7 @@ namespace CUETools.Ripper.SCSI
|
||||
if (_toc[1].IsAudio)
|
||||
_toc[1][0].Start = 0;
|
||||
if (_toc.AudioLength > 0)
|
||||
_errors = new BitArray((int)_toc.AudioLength); // !!!
|
||||
Position = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -320,7 +328,7 @@ namespace CUETools.Ripper.SCSI
|
||||
StringBuilder st = new StringBuilder();
|
||||
for (int i = 0; i < 12; i++)
|
||||
st.AppendFormat(",0x{0:X2}", QData[_currentScan, q_pos, i]);
|
||||
System.Console.WriteLine("\nCRC error@{0}{1}", CDImageLayout.TimeToString((uint)(sector + iSector)), st.ToString());
|
||||
System.Console.WriteLine("\rCRC error@{0}{1};", CDImageLayout.TimeToString((uint)(sector + iSector)), st.ToString());
|
||||
}
|
||||
continue;
|
||||
}
|
||||
@@ -452,7 +460,7 @@ namespace CUETools.Ripper.SCSI
|
||||
_mainChannelMode = mainmode[m];
|
||||
if (_forceReadCommand != ReadCDCommand.Unknown && _readCDCommand != _forceReadCommand)
|
||||
continue;
|
||||
if (_readCDCommand == ReadCDCommand.ReadCdD8h && (_c2ErrorMode != Device.C2ErrorMode.None || _mainChannelMode != Device.MainChannelSelection.UserData))
|
||||
if (_readCDCommand == ReadCDCommand.ReadCdD8h) // && (_c2ErrorMode != Device.C2ErrorMode.None || _mainChannelMode != Device.MainChannelSelection.UserData))
|
||||
continue;
|
||||
Array.Clear(_readBuffer, 0, _readBuffer.Length); // fill with something nasty instead?
|
||||
DateTime tm = DateTime.Now;
|
||||
@@ -530,6 +538,13 @@ namespace CUETools.Ripper.SCSI
|
||||
Device.CommandStatus st;
|
||||
fixed (byte* data = _readBuffer)
|
||||
{
|
||||
if (_debugMessages)
|
||||
{
|
||||
int size = (4 * 588 +
|
||||
(_subChannelMode == Device.SubChannelMode.QOnly ? 16 : _subChannelMode == Device.SubChannelMode.RWMode ? 96 : 0) +
|
||||
(_c2ErrorMode == Device.C2ErrorMode.Mode294 ? 294 : _c2ErrorMode == Device.C2ErrorMode.Mode296 ? 296 : 0)) * (int)Sectors2Read;
|
||||
MemSet(data, size, 0xff);
|
||||
}
|
||||
if (_readCDCommand == ReadCDCommand.ReadCdBEh)
|
||||
st = m_device.ReadCDAndSubChannel(_mainChannelMode, _subChannelMode, _c2ErrorMode, 1, false, (uint)sector, (uint)Sectors2Read, (IntPtr)((void*)data), _timeout);
|
||||
else
|
||||
@@ -618,6 +633,86 @@ namespace CUETools.Ripper.SCSI
|
||||
throw new Exception("wierd IntPtr.Size");
|
||||
}
|
||||
|
||||
private unsafe void MemSet(byte* buf, int count, byte val)
|
||||
{
|
||||
Int32 intVal = (((((val << 8) + val) << 8) + val) << 8) + val;
|
||||
if (IntPtr.Size == 4)
|
||||
{
|
||||
Int32* start = (Int32*)buf;
|
||||
Int32* end = (Int32*)(buf + count);
|
||||
while (start < end)
|
||||
*(start++) = intVal;
|
||||
for (int i = 0; i < (count & 3); i++)
|
||||
buf[count - i - 1] = val;
|
||||
}
|
||||
else if (IntPtr.Size == 8)
|
||||
{
|
||||
Int64 int64Val = ((Int64)intVal << 32) + intVal;
|
||||
Int64* start = (Int64*)buf;
|
||||
Int64* end = (Int64*)(buf + count);
|
||||
while (start < end)
|
||||
*(start++) = int64Val;
|
||||
for (int i = 0; i < (count & 7); i++)
|
||||
buf[count - i - 1] = val;
|
||||
}
|
||||
else
|
||||
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[_currentScan, 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 CorrectSectors0(int sector, int Sectors2Read)
|
||||
{
|
||||
for (int iSector = 0; iSector < Sectors2Read; iSector++)
|
||||
@@ -645,6 +740,8 @@ namespace CUETools.Ripper.SCSI
|
||||
int err2 = (C2Data[1, pos, iPar >> 3] >> (iPar & 7)) & 1;
|
||||
_currentErrorsCount += err1 | err2 | (val1 != val2 ? 1 : 0);
|
||||
_currentData[pos * 4 * 588 + iPar] = err1 != 0 ? val2 : val1;
|
||||
//if (_debugMessages && ((C2Data[_currentScan, pos, iPar >> 3] >> (iPar & 7)) & 1) != 0 && _currentErrorsCount < 10)
|
||||
// System.Console.WriteLine("\rC2 error @{0}, byte {1:0000} ", CDImageLayout.TimeToString((uint)(sector + iSector)), iPar);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -686,6 +783,8 @@ namespace CUETools.Ripper.SCSI
|
||||
if (valueScore[value] > valueScore[bestValue])
|
||||
bestValue = value;
|
||||
}
|
||||
// if (_debugMessages && ((C2Data[_currentScan, pos, iPar >> 3] >> (iPar & 7)) & 1) != 0 && _currentErrorsCount < 10)
|
||||
// System.Console.WriteLine("\rC2 error @{0}, byte {1:0000} ", CDImageLayout.TimeToString((uint)(sector + iSector)), iPar);
|
||||
bool fError = valueScore[bestValue] <= _correctionQuality + c2Score + totalScore / 2;
|
||||
if (fError)
|
||||
_currentErrorsCount++;
|
||||
@@ -775,8 +874,8 @@ namespace CUETools.Ripper.SCSI
|
||||
|
||||
//FileStream correctFile = new FileStream("correct.wav", FileMode.Open);
|
||||
//byte[] realData = new byte[MSECTORS * 4 * 588];
|
||||
//correctFile.Seek(0x2C + start * 588 * 4, SeekOrigin.Begin);
|
||||
//if (correctFile.Read(realData, 0, MSECTORS * 4 * 588) != MSECTORS * 4 * 588)
|
||||
//correctFile.Seek(0x2C + _currentStart * 588 * 4, SeekOrigin.Begin);
|
||||
//if (correctFile.Read(realData, _driveOffset * 4, MSECTORS * 4 * 588 - _driveOffset * 4) != MSECTORS * 4 * 588 - _driveOffset * 4)
|
||||
// throw new Exception("read");
|
||||
//correctFile.Close();
|
||||
|
||||
@@ -816,6 +915,7 @@ namespace CUETools.Ripper.SCSI
|
||||
ProcessSubchannel(sector, Sectors2Read, true);
|
||||
//DateTime LastFetched = DateTime.Now;
|
||||
CorrectSectors(Math.Min(pass, MAXSCANS - 1), sector, Sectors2Read, pass >= MAXSCANS - 1, pass == MAXSCANS - 1 + nExtraPasses);
|
||||
PrintErrors(Math.Min(pass, MAXSCANS - 1), sector, Sectors2Read, /*realData*/null);
|
||||
//TimeSpan delay2 = DateTime.Now - LastFetched;
|
||||
//if (sector == _currentStart)
|
||||
//System.Console.WriteLine("\n{0},{1}", delay1.TotalMilliseconds, delay2.TotalMilliseconds);
|
||||
@@ -856,20 +956,38 @@ namespace CUETools.Ripper.SCSI
|
||||
}
|
||||
}
|
||||
|
||||
public int[,] Read(int[,] buff)
|
||||
{
|
||||
if (_toc == null)
|
||||
throw new Exception("Read: invalid TOC");
|
||||
if (_sampleOffset - _driveOffset >= (uint)Length)
|
||||
return null;
|
||||
if (_sampleOffset >= (int)Length)
|
||||
return new int[_driveOffset - (_sampleOffset - (int)Length), ChannelCount];
|
||||
if (_sampleOffset < 0)
|
||||
return new int[-_sampleOffset, ChannelCount];
|
||||
PrefetchSector((int)_sampleOffset / 588);
|
||||
int samplesRead = Math.Min(_currentEnd * 588, (int)Length + _driveOffset) - _sampleOffset;
|
||||
buff = new int[samplesRead, ChannelCount];
|
||||
AudioSamples.BytesToFLACSamples_16(_currentData, (_sampleOffset - _currentStart * 588) * 4, buff, 0, (uint) samplesRead, 2);
|
||||
_sampleOffset = _currentEnd * 588;
|
||||
return buff;
|
||||
}
|
||||
|
||||
public uint Read(int[,] buff, uint sampleCount)
|
||||
{
|
||||
if (_toc == null)
|
||||
throw new Exception("Read: invalid TOC");
|
||||
if (_sampleOffset - _driveOffset >= (uint)Length)
|
||||
return 0;
|
||||
if (_sampleOffset > (uint)Length)
|
||||
if (_sampleOffset >= (uint)Length)
|
||||
{
|
||||
int samplesRead = _sampleOffset - (int)Length;
|
||||
int samplesRead = _driveOffset - (_sampleOffset - (int)Length);
|
||||
for (int i = 0; i < samplesRead; i++)
|
||||
for (int c = 0; c < ChannelCount; c++)
|
||||
buff[i, c] = 0;
|
||||
_sampleOffset += samplesRead;
|
||||
return 0;
|
||||
return (uint) samplesRead;
|
||||
}
|
||||
if ((uint)(_sampleOffset - _driveOffset + sampleCount) > Length)
|
||||
sampleCount = (uint)((int)Length + _driveOffset - _sampleOffset);
|
||||
@@ -999,7 +1117,7 @@ namespace CUETools.Ripper.SCSI
|
||||
_currentIndex = -1;
|
||||
_crcErrorsCount = 0;
|
||||
_errorsCount = 0;
|
||||
_errors = new BitArray((int)_toc.AudioLength);
|
||||
_errors = new BitArray((int)_toc.AudioLength); // !!!
|
||||
_sampleOffset = (int)value + _driveOffset;
|
||||
}
|
||||
}
|
||||
@@ -1039,7 +1157,7 @@ namespace CUETools.Ripper.SCSI
|
||||
|
||||
public static string RipperVersion()
|
||||
{
|
||||
return "CUERipper v1.9.3 Copyright (C) 2008 Gregory S. Chudov";
|
||||
return "CUERipper v1.9.4 Copyright (C) 2008 Gregory S. Chudov";
|
||||
// ripper.GetName().Name + " " + ripper.GetName().Version;
|
||||
}
|
||||
|
||||
|
||||
@@ -90,6 +90,12 @@
|
||||
<Compile Include="frmBatch.Designer.cs">
|
||||
<DependentUpon>frmBatch.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="frmChoice.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="frmChoice.Designer.cs">
|
||||
<DependentUpon>frmChoice.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="frmFilenameCorrector.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -134,6 +140,14 @@
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>frmBatch.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="frmChoice.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>frmChoice.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="frmCUETools.de-DE.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>frmCUETools.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="frmCUETools.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>frmCUETools.cs</DependentUpon>
|
||||
@@ -154,6 +168,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>frmReport.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="frmSettings.de-DE.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>frmSettings.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="frmSettings.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>frmSettings.cs</DependentUpon>
|
||||
@@ -189,6 +207,20 @@
|
||||
<Project>{4911BD82-49EF-4858-8B51-5394F86739A4}</Project>
|
||||
<Name>CUETools.Processor</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Freedb\Freedb.csproj">
|
||||
<Project>{5ADCFD6D-BFEA-4B10-BB45-9083BBB56AF4}</Project>
|
||||
<Name>Freedb</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\MusicBrainz\MusicBrainz.csproj">
|
||||
<Project>{74C2036B-2C9B-4FC8-B7BD-AE81A8DCE533}</Project>
|
||||
<Name>MusicBrainz</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\freedb.gif" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\musicbrainz.ico" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
|
||||
@@ -10,16 +10,16 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CUETools.Codecs.FLAC", "..\
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CUETools.Codecs.APE", "..\CUETools.Codecs.APE\CUETools.Codecs.APE.vcproj", "{9AE965C4-301E-4C01-B90F-297AF341ACC6}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{0B9C97D4-61B8-4294-A1DF-BA90752A1779} = {0B9C97D4-61B8-4294-A1DF-BA90752A1779}
|
||||
{CA200BCB-DFC6-4153-9BD4-785BC768B26B} = {CA200BCB-DFC6-4153-9BD4-785BC768B26B}
|
||||
{0B9C97D4-61B8-4294-A1DF-BA90752A1779} = {0B9C97D4-61B8-4294-A1DF-BA90752A1779}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CodecLibs", "CodecLibs", "{8B179853-B7D6-479C-B8B2-6CBCE835D040}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CUETools.Codecs.WavPack", "..\CUETools.Codecs.WavPack\CUETools.Codecs.WavPack.vcproj", "{CC2E74B6-534A-43D8-9F16-AC03FE955000}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{CA200BCB-DFC6-4153-9BD4-785BC768B26B} = {CA200BCB-DFC6-4153-9BD4-785BC768B26B}
|
||||
{5CCCB9CF-0384-458F-BA08-72B73866840F} = {5CCCB9CF-0384-458F-BA08-72B73866840F}
|
||||
{CA200BCB-DFC6-4153-9BD4-785BC768B26B} = {CA200BCB-DFC6-4153-9BD4-785BC768B26B}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MACLib", "..\MAC_SDK\Source\MACLib\MACLib.vcproj", "{0B9C97D4-61B8-4294-A1DF-BA90752A1779}"
|
||||
@@ -36,9 +36,9 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ArCueDotNet", "..\ArCueDotN
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CUETools.Processor", "..\CUETools.Processor\CUETools.Processor.csproj", "{4911BD82-49EF-4858-8B51-5394F86739A4}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{9AE965C4-301E-4C01-B90F-297AF341ACC6} = {9AE965C4-301E-4C01-B90F-297AF341ACC6}
|
||||
{CC2E74B6-534A-43D8-9F16-AC03FE955000} = {CC2E74B6-534A-43D8-9F16-AC03FE955000}
|
||||
{E70FA90A-7012-4A52-86B5-362B699D1540} = {E70FA90A-7012-4A52-86B5-362B699D1540}
|
||||
{CC2E74B6-534A-43D8-9F16-AC03FE955000} = {CC2E74B6-534A-43D8-9F16-AC03FE955000}
|
||||
{9AE965C4-301E-4C01-B90F-297AF341ACC6} = {9AE965C4-301E-4C01-B90F-297AF341ACC6}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HDCDDotNet", "..\HDCDDotNet\HDCDDotNet.csproj", "{32338A04-5B6B-4C63-8EE7-C6400F73B5D7}"
|
||||
@@ -77,6 +77,14 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CUERipper", "..\CUERipper\C
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Freedb", "..\Freedb\Freedb.csproj", "{5ADCFD6D-BFEA-4B10-BB45-9083BBB56AF4}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TTALib", "..\ttalib-1.1\TTALib.vcproj", "{B3DF599C-1C8F-451D-91E4-DD766210DA1F}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CUETools.Codecs.TTA", "..\CUETools.Codecs.TTA\CUETools.Codecs.TTA.vcproj", "{1D1E99BC-6D22-41C0-BD94-FF4DD5EC725B}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{6458A13A-30EF-45A9-9D58-E5031B17BEE2} = {6458A13A-30EF-45A9-9D58-E5031B17BEE2}
|
||||
{B3DF599C-1C8F-451D-91E4-DD766210DA1F} = {B3DF599C-1C8F-451D-91E4-DD766210DA1F}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@@ -383,6 +391,26 @@ Global
|
||||
{5ADCFD6D-BFEA-4B10-BB45-9083BBB56AF4}.Release|x64.ActiveCfg = Release|x64
|
||||
{5ADCFD6D-BFEA-4B10-BB45-9083BBB56AF4}.Release|x64.Build.0 = Release|x64
|
||||
{5ADCFD6D-BFEA-4B10-BB45-9083BBB56AF4}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{B3DF599C-1C8F-451D-91E4-DD766210DA1F}.Debug|Any CPU.ActiveCfg = Debug|Win32
|
||||
{B3DF599C-1C8F-451D-91E4-DD766210DA1F}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{B3DF599C-1C8F-451D-91E4-DD766210DA1F}.Debug|x64.Build.0 = Debug|x64
|
||||
{B3DF599C-1C8F-451D-91E4-DD766210DA1F}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{B3DF599C-1C8F-451D-91E4-DD766210DA1F}.Debug|x86.Build.0 = Debug|Win32
|
||||
{B3DF599C-1C8F-451D-91E4-DD766210DA1F}.Release|Any CPU.ActiveCfg = Release|Win32
|
||||
{B3DF599C-1C8F-451D-91E4-DD766210DA1F}.Release|x64.ActiveCfg = Release|x64
|
||||
{B3DF599C-1C8F-451D-91E4-DD766210DA1F}.Release|x64.Build.0 = Release|x64
|
||||
{B3DF599C-1C8F-451D-91E4-DD766210DA1F}.Release|x86.ActiveCfg = Release|Win32
|
||||
{B3DF599C-1C8F-451D-91E4-DD766210DA1F}.Release|x86.Build.0 = Release|Win32
|
||||
{1D1E99BC-6D22-41C0-BD94-FF4DD5EC725B}.Debug|Any CPU.ActiveCfg = Debug|Win32
|
||||
{1D1E99BC-6D22-41C0-BD94-FF4DD5EC725B}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{1D1E99BC-6D22-41C0-BD94-FF4DD5EC725B}.Debug|x64.Build.0 = Debug|x64
|
||||
{1D1E99BC-6D22-41C0-BD94-FF4DD5EC725B}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{1D1E99BC-6D22-41C0-BD94-FF4DD5EC725B}.Debug|x86.Build.0 = Debug|Win32
|
||||
{1D1E99BC-6D22-41C0-BD94-FF4DD5EC725B}.Release|Any CPU.ActiveCfg = Release|Win32
|
||||
{1D1E99BC-6D22-41C0-BD94-FF4DD5EC725B}.Release|x64.ActiveCfg = Release|x64
|
||||
{1D1E99BC-6D22-41C0-BD94-FF4DD5EC725B}.Release|x64.Build.0 = Release|x64
|
||||
{1D1E99BC-6D22-41C0-BD94-FF4DD5EC725B}.Release|x86.ActiveCfg = Release|Win32
|
||||
{1D1E99BC-6D22-41C0-BD94-FF4DD5EC725B}.Release|x86.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@@ -393,9 +421,11 @@ Global
|
||||
{E70FA90A-7012-4A52-86B5-362B699D1540} = {85F88959-C9E9-4989-ACB1-67BA9D1BEFE7}
|
||||
{F2EC7193-D5E5-4252-9803-5CEB407E910F} = {85F88959-C9E9-4989-ACB1-67BA9D1BEFE7}
|
||||
{8A0426FA-0BC2-4C49-A6E5-1F9A68156F19} = {85F88959-C9E9-4989-ACB1-67BA9D1BEFE7}
|
||||
{1D1E99BC-6D22-41C0-BD94-FF4DD5EC725B} = {85F88959-C9E9-4989-ACB1-67BA9D1BEFE7}
|
||||
{0B9C97D4-61B8-4294-A1DF-BA90752A1779} = {8B179853-B7D6-479C-B8B2-6CBCE835D040}
|
||||
{4CEFBC84-C215-11DB-8314-0800200C9A66} = {8B179853-B7D6-479C-B8B2-6CBCE835D040}
|
||||
{5CCCB9CF-0384-458F-BA08-72B73866840F} = {8B179853-B7D6-479C-B8B2-6CBCE835D040}
|
||||
{B3DF599C-1C8F-451D-91E4-DD766210DA1F} = {8B179853-B7D6-479C-B8B2-6CBCE835D040}
|
||||
{A574F3B1-E38B-4EE4-9394-49D6E2DF52EA} = {4B59E09C-A51F-4B80-91BE-987904DCEF7D}
|
||||
{9253A314-1821-42BF-B02F-2BF986B1765D} = {4B59E09C-A51F-4B80-91BE-987904DCEF7D}
|
||||
{A5A8D8FA-9E32-4010-8AAF-AE580C5AF728} = {4B59E09C-A51F-4B80-91BE-987904DCEF7D}
|
||||
|
||||
@@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("")]
|
||||
[assembly: AssemblyCopyright("Copyright 2006-2007 Moitah")]
|
||||
[assembly: AssemblyCopyright("Copyright 2006-2009 Moitah, Greg Chudov")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
|
||||
14
CUETools/Properties/Resources.Designer.cs
generated
14
CUETools/Properties/Resources.Designer.cs
generated
@@ -60,6 +60,13 @@ namespace JDP.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
internal static System.Drawing.Bitmap freedb {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("freedb", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to &Go.
|
||||
/// </summary>
|
||||
@@ -69,6 +76,13 @@ namespace JDP.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
internal static System.Drawing.Bitmap musicbrainz {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("musicbrainz", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Stop.
|
||||
/// </summary>
|
||||
|
||||
@@ -117,9 +117,16 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="freedb" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\freedb.gif;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Go" xml:space="preserve">
|
||||
<value>&Go</value>
|
||||
</data>
|
||||
<data name="musicbrainz" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\musicbrainz.ico;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Stop" xml:space="preserve">
|
||||
<value>Stop</value>
|
||||
</data>
|
||||
|
||||
BIN
CUETools/Resources/freedb.gif
Normal file
BIN
CUETools/Resources/freedb.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.0 KiB |
BIN
CUETools/Resources/musicbrainz.ico
Normal file
BIN
CUETools/Resources/musicbrainz.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
13
CUETools/frmAbout.Designer.cs
generated
13
CUETools/frmAbout.Designer.cs
generated
@@ -32,6 +32,7 @@ namespace JDP
|
||||
this.linkLabel1 = new System.Windows.Forms.LinkLabel();
|
||||
this.textBox1 = new System.Windows.Forms.TextBox();
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.linkLabel2 = new System.Windows.Forms.LinkLabel();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// linkLabel1
|
||||
@@ -67,6 +68,16 @@ namespace JDP
|
||||
this.button1.Name = "button1";
|
||||
this.button1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// linkLabel2
|
||||
//
|
||||
this.linkLabel2.AccessibleDescription = null;
|
||||
this.linkLabel2.AccessibleName = null;
|
||||
resources.ApplyResources(this.linkLabel2, "linkLabel2");
|
||||
this.linkLabel2.Font = null;
|
||||
this.linkLabel2.Name = "linkLabel2";
|
||||
this.linkLabel2.TabStop = true;
|
||||
this.linkLabel2.UseCompatibleTextRendering = true;
|
||||
//
|
||||
// frmAbout
|
||||
//
|
||||
this.AccessibleDescription = null;
|
||||
@@ -75,6 +86,7 @@ namespace JDP
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackgroundImage = null;
|
||||
this.CancelButton = this.button1;
|
||||
this.Controls.Add(this.linkLabel2);
|
||||
this.Controls.Add(this.button1);
|
||||
this.Controls.Add(this.textBox1);
|
||||
this.Controls.Add(this.linkLabel1);
|
||||
@@ -97,5 +109,6 @@ namespace JDP
|
||||
private System.Windows.Forms.LinkLabel linkLabel1;
|
||||
private System.Windows.Forms.TextBox textBox1;
|
||||
private System.Windows.Forms.Button button1;
|
||||
private System.Windows.Forms.LinkLabel linkLabel2;
|
||||
}
|
||||
}
|
||||
@@ -117,34 +117,62 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="linkLabel2.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name=">>textBox1.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
|
||||
<value>CenterParent</value>
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="linkLabel1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>265, 17</value>
|
||||
</data>
|
||||
<data name=">>$this.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Form, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>button1.Name" xml:space="preserve">
|
||||
<value>button1</value>
|
||||
</data>
|
||||
<data name="linkLabel2.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name=">>linkLabel2.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.LinkLabel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="button1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>182, 211</value>
|
||||
<value>180, 228</value>
|
||||
</data>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>About CUETools v1.9.4</value>
|
||||
</data>
|
||||
<data name="linkLabel2.LinkArea" type="System.Windows.Forms.LinkArea, System.Windows.Forms">
|
||||
<value>36, 28</value>
|
||||
</data>
|
||||
<data name=">>textBox1.Name" xml:space="preserve">
|
||||
<value>textBox1</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="linkLabel1.LinkArea" type="System.Windows.Forms.LinkArea, System.Windows.Forms">
|
||||
<value>27, 22</value>
|
||||
</data>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>About CUETools v1.9.3</value>
|
||||
<data name="linkLabel2.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>46, 195</value>
|
||||
</data>
|
||||
<data name="linkLabel2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>346, 17</value>
|
||||
</data>
|
||||
<data name=">>button1.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name=">>linkLabel1.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name=">>linkLabel2.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="linkLabel1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>87, 10</value>
|
||||
@@ -155,11 +183,14 @@
|
||||
<data name=">>button1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
|
||||
<value>CenterParent</value>
|
||||
<data name=">>linkLabel2.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>$this.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Form, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<data name="linkLabel2.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
|
||||
<value>MiddleCenter</value>
|
||||
</data>
|
||||
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
||||
<value>6, 13</value>
|
||||
</data>
|
||||
<data name="textBox1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>415, 151</value>
|
||||
@@ -170,8 +201,11 @@
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>439, 263</value>
|
||||
</data>
|
||||
<data name=">>textBox1.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
<data name="linkLabel1.Text" xml:space="preserve">
|
||||
<value>Copyright 2006-2008 Moitah http://www.moitah.net/.</value>
|
||||
</data>
|
||||
<data name=">>linkLabel2.Name" xml:space="preserve">
|
||||
<value>linkLabel2</value>
|
||||
</data>
|
||||
<data name="button1.Text" xml:space="preserve">
|
||||
<value>Close</value>
|
||||
@@ -191,10 +225,12 @@ hdcd.dll (c) Christopher Key</value>
|
||||
<data name=">>linkLabel1.Name" xml:space="preserve">
|
||||
<value>linkLabel1</value>
|
||||
</data>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="textBox1.Multiline" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name=">>textBox1.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="linkLabel1.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
@@ -219,21 +255,21 @@ hdcd.dll (c) Christopher Key</value>
|
||||
<data name=">>linkLabel1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.LinkLabel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
||||
<value>6, 13</value>
|
||||
<data name="linkLabel2.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="textBox1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 41</value>
|
||||
</data>
|
||||
<data name="linkLabel1.Text" xml:space="preserve">
|
||||
<value>Copyright 2006-2008 Moitah http://www.moitah.net/.</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>frmAbout</value>
|
||||
</data>
|
||||
<data name="textBox1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="linkLabel2.Text" xml:space="preserve">
|
||||
<value>Updates and support can be found at http://www.hydrogenaudio.org.</value>
|
||||
</data>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
|
||||
@@ -139,10 +139,23 @@ hdcd.dll (c) Christopher Key
|
||||
<data name="button1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>182, 261</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="linkLabel2.LinkArea" type="System.Windows.Forms.LinkArea, System.Windows.Forms">
|
||||
<value>39, 28</value>
|
||||
</data>
|
||||
<data name="linkLabel2.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>22, 226</value>
|
||||
</data>
|
||||
<data name="linkLabel2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>394, 17</value>
|
||||
</data>
|
||||
<data name="linkLabel2.Text" xml:space="preserve">
|
||||
<value>Обновления и поддержку ищите на форуме http://www.hydrogenaudio.org.</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>439, 296</value>
|
||||
</data>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>CUETools v1.9.3: О программе</value>
|
||||
<value>CUETools v1.9.4: О программе</value>
|
||||
</data>
|
||||
</root>
|
||||
71
CUETools/frmCUETools.Designer.cs
generated
71
CUETools/frmCUETools.Designer.cs
generated
@@ -49,12 +49,13 @@ namespace JDP {
|
||||
this.rbAppendFilename = new System.Windows.Forms.RadioButton();
|
||||
this.txtAppendFilename = new System.Windows.Forms.TextBox();
|
||||
this.grpAudioOutput = new System.Windows.Forms.GroupBox();
|
||||
this.rbTTA = new System.Windows.Forms.RadioButton();
|
||||
this.chkLossyWAV = new System.Windows.Forms.CheckBox();
|
||||
this.rbAPE = new System.Windows.Forms.RadioButton();
|
||||
this.rbNoAudio = new System.Windows.Forms.RadioButton();
|
||||
this.rbWavPack = new System.Windows.Forms.RadioButton();
|
||||
this.rbFLAC = new System.Windows.Forms.RadioButton();
|
||||
this.rbWAV = new System.Windows.Forms.RadioButton();
|
||||
this.rbFLAC = new System.Windows.Forms.RadioButton();
|
||||
this.btnBatch = new System.Windows.Forms.Button();
|
||||
this.btnFilenameCorrector = new System.Windows.Forms.Button();
|
||||
this.btnSettings = new System.Windows.Forms.Button();
|
||||
@@ -74,12 +75,17 @@ namespace JDP {
|
||||
this.btnStop = new System.Windows.Forms.Button();
|
||||
this.btnPause = new System.Windows.Forms.Button();
|
||||
this.btnResume = new System.Windows.Forms.Button();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.rbFreedbNever = new System.Windows.Forms.RadioButton();
|
||||
this.rbFreedbIf = new System.Windows.Forms.RadioButton();
|
||||
this.rbFreedbAlways = new System.Windows.Forms.RadioButton();
|
||||
this.grpCUEPaths.SuspendLayout();
|
||||
this.grpOutputStyle.SuspendLayout();
|
||||
this.grpOutputPathGeneration.SuspendLayout();
|
||||
this.grpAudioOutput.SuspendLayout();
|
||||
this.grpAccurateRip.SuspendLayout();
|
||||
this.statusStrip1.SuspendLayout();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// btnConvert
|
||||
@@ -262,16 +268,25 @@ namespace JDP {
|
||||
//
|
||||
// grpAudioOutput
|
||||
//
|
||||
this.grpAudioOutput.Controls.Add(this.rbTTA);
|
||||
this.grpAudioOutput.Controls.Add(this.chkLossyWAV);
|
||||
this.grpAudioOutput.Controls.Add(this.rbAPE);
|
||||
this.grpAudioOutput.Controls.Add(this.rbNoAudio);
|
||||
this.grpAudioOutput.Controls.Add(this.rbWavPack);
|
||||
this.grpAudioOutput.Controls.Add(this.rbFLAC);
|
||||
this.grpAudioOutput.Controls.Add(this.rbWAV);
|
||||
this.grpAudioOutput.Controls.Add(this.rbFLAC);
|
||||
resources.ApplyResources(this.grpAudioOutput, "grpAudioOutput");
|
||||
this.grpAudioOutput.Name = "grpAudioOutput";
|
||||
this.grpAudioOutput.TabStop = false;
|
||||
//
|
||||
// rbTTA
|
||||
//
|
||||
resources.ApplyResources(this.rbTTA, "rbTTA");
|
||||
this.rbTTA.Name = "rbTTA";
|
||||
this.rbTTA.TabStop = true;
|
||||
this.rbTTA.UseVisualStyleBackColor = true;
|
||||
this.rbTTA.CheckedChanged += new System.EventHandler(this.rbTTA_CheckedChanged);
|
||||
//
|
||||
// chkLossyWAV
|
||||
//
|
||||
resources.ApplyResources(this.chkLossyWAV, "chkLossyWAV");
|
||||
@@ -303,13 +318,6 @@ namespace JDP {
|
||||
this.rbWavPack.UseVisualStyleBackColor = true;
|
||||
this.rbWavPack.CheckedChanged += new System.EventHandler(this.rbWavPack_CheckedChanged);
|
||||
//
|
||||
// rbFLAC
|
||||
//
|
||||
resources.ApplyResources(this.rbFLAC, "rbFLAC");
|
||||
this.rbFLAC.Name = "rbFLAC";
|
||||
this.rbFLAC.UseVisualStyleBackColor = true;
|
||||
this.rbFLAC.CheckedChanged += new System.EventHandler(this.rbFLAC_CheckedChanged);
|
||||
//
|
||||
// rbWAV
|
||||
//
|
||||
resources.ApplyResources(this.rbWAV, "rbWAV");
|
||||
@@ -319,6 +327,13 @@ namespace JDP {
|
||||
this.rbWAV.UseVisualStyleBackColor = true;
|
||||
this.rbWAV.CheckedChanged += new System.EventHandler(this.rbWAV_CheckedChanged);
|
||||
//
|
||||
// rbFLAC
|
||||
//
|
||||
resources.ApplyResources(this.rbFLAC, "rbFLAC");
|
||||
this.rbFLAC.Name = "rbFLAC";
|
||||
this.rbFLAC.UseVisualStyleBackColor = true;
|
||||
this.rbFLAC.CheckedChanged += new System.EventHandler(this.rbFLAC_CheckedChanged);
|
||||
//
|
||||
// btnBatch
|
||||
//
|
||||
resources.ApplyResources(this.btnBatch, "btnBatch");
|
||||
@@ -463,10 +478,41 @@ namespace JDP {
|
||||
this.btnResume.UseVisualStyleBackColor = true;
|
||||
this.btnResume.Click += new System.EventHandler(this.btnPause_Click);
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.rbFreedbAlways);
|
||||
this.groupBox1.Controls.Add(this.rbFreedbIf);
|
||||
this.groupBox1.Controls.Add(this.rbFreedbNever);
|
||||
resources.ApplyResources(this.groupBox1, "groupBox1");
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.TabStop = false;
|
||||
//
|
||||
// rbFreedbNever
|
||||
//
|
||||
resources.ApplyResources(this.rbFreedbNever, "rbFreedbNever");
|
||||
this.rbFreedbNever.Name = "rbFreedbNever";
|
||||
this.rbFreedbNever.TabStop = true;
|
||||
this.rbFreedbNever.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// rbFreedbIf
|
||||
//
|
||||
resources.ApplyResources(this.rbFreedbIf, "rbFreedbIf");
|
||||
this.rbFreedbIf.Name = "rbFreedbIf";
|
||||
this.rbFreedbIf.TabStop = true;
|
||||
this.rbFreedbIf.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// rbFreedbAlways
|
||||
//
|
||||
resources.ApplyResources(this.rbFreedbAlways, "rbFreedbAlways");
|
||||
this.rbFreedbAlways.Name = "rbFreedbAlways";
|
||||
this.rbFreedbAlways.TabStop = true;
|
||||
this.rbFreedbAlways.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// frmCUETools
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.Controls.Add(this.btnResume);
|
||||
this.Controls.Add(this.btnPause);
|
||||
this.Controls.Add(this.btnStop);
|
||||
@@ -499,6 +545,8 @@ namespace JDP {
|
||||
this.grpAccurateRip.PerformLayout();
|
||||
this.statusStrip1.ResumeLayout(false);
|
||||
this.statusStrip1.PerformLayout();
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
@@ -555,6 +603,11 @@ namespace JDP {
|
||||
private System.Windows.Forms.Button btnResume;
|
||||
private System.Windows.Forms.CheckBox chkLossyWAV;
|
||||
private System.Windows.Forms.RadioButton rbArAndEncode;
|
||||
private System.Windows.Forms.RadioButton rbTTA;
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.RadioButton rbFreedbAlways;
|
||||
private System.Windows.Forms.RadioButton rbFreedbIf;
|
||||
private System.Windows.Forms.RadioButton rbFreedbNever;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -239,6 +239,7 @@ namespace JDP {
|
||||
CUESheet cueSheet = new CUESheet(_config);
|
||||
cueSheet.PasswordRequired += new ArchivePasswordRequiredHandler(PasswordRequired);
|
||||
cueSheet.CUEToolsProgress += new CUEToolsProgressHandler(SetStatus);
|
||||
cueSheet.CUEToolsSelection += new CUEToolsSelectionHandler(MakeSelection);
|
||||
cueSheet.WriteOffset = _writeOffset;
|
||||
|
||||
object[] p = new object[6];
|
||||
@@ -287,6 +288,21 @@ namespace JDP {
|
||||
});
|
||||
}
|
||||
|
||||
private void MakeSelection(object sender, CUEToolsSelectionEventArgs e)
|
||||
{
|
||||
if (_batchPaths.Count != 0)
|
||||
return;
|
||||
this.Invoke((MethodInvoker)delegate()
|
||||
{
|
||||
frmChoice dlg = new frmChoice();
|
||||
foreach (string s in e.choices)
|
||||
dlg.comboRelease.Items.Add(s);
|
||||
dlg.comboRelease.SelectedIndex = 0;
|
||||
if (dlg.ShowDialog(this) == DialogResult.OK)
|
||||
e.selection = dlg.comboRelease.SelectedIndex;
|
||||
});
|
||||
}
|
||||
|
||||
private void WriteAudioFilesThread(object o) {
|
||||
object[] p = (object[])o;
|
||||
|
||||
@@ -296,6 +312,7 @@ namespace JDP {
|
||||
AccurateRipMode accurateRip = (AccurateRipMode)p[3];
|
||||
OutputAudioFormat outputFormat = (OutputAudioFormat)p[4];
|
||||
bool lossyWAV = (bool)p[5];
|
||||
DialogResult dlgRes = DialogResult.OK;
|
||||
|
||||
try
|
||||
{
|
||||
@@ -303,15 +320,42 @@ namespace JDP {
|
||||
bool outputAudio = outputFormat != OutputAudioFormat.NoAudio && accurateRip != AccurateRipMode.Verify;
|
||||
bool outputCUE = cueStyle != CUEStyle.SingleFileWithCUE && accurateRip != AccurateRipMode.Verify;
|
||||
string pathOut = null;
|
||||
List<object> releases = null;
|
||||
|
||||
cueSheet.Open(pathIn);
|
||||
|
||||
if (_batchPaths.Count == 0 && accurateRip != AccurateRipMode.Verify)
|
||||
{
|
||||
if (rbFreedbAlways.Checked || (rbFreedbIf.Checked &&
|
||||
(cueSheet.Artist == "" || cueSheet.Title == "" || cueSheet.Year == "")))
|
||||
releases = cueSheet.LookupAlbumInfo();
|
||||
}
|
||||
|
||||
this.Invoke((MethodInvoker)delegate()
|
||||
{
|
||||
UpdateOutputPath(cueSheet.Artist != "" ? cueSheet.Artist : "Unknown Artist", cueSheet.Title != "" ? cueSheet.Title : "Unknown Title");
|
||||
if (releases != null && releases.Count > 0)
|
||||
{
|
||||
frmChoice dlg = new frmChoice();
|
||||
foreach (object release in releases)
|
||||
dlg.comboRelease.Items.Add(release);
|
||||
dlg.comboRelease.SelectedIndex = 0;
|
||||
dlg.CUE = cueSheet;
|
||||
if (dlg.ShowDialog(this) == DialogResult.Cancel)
|
||||
{
|
||||
cueSheet.Close();
|
||||
SetupControls(false);
|
||||
}
|
||||
}
|
||||
UpdateOutputPath(
|
||||
cueSheet.Year != "" ? cueSheet.Year : "YYYY",
|
||||
cueSheet.Artist != "" ? cueSheet.Artist : "Unknown Artist",
|
||||
cueSheet.Title != "" ? cueSheet.Title : "Unknown Title");
|
||||
pathOut = txtOutputPath.Text;
|
||||
});
|
||||
|
||||
if (dlgRes == DialogResult.Cancel)
|
||||
return;
|
||||
|
||||
cueSheet.GenerateFilenames(outputFormat, lossyWAV, pathOut);
|
||||
string outDir = Path.GetDirectoryName(pathOut);
|
||||
if (cueStyle == CUEStyle.SingleFileWithCUE)
|
||||
@@ -334,23 +378,22 @@ namespace JDP {
|
||||
outputExists |= File.Exists(Path.Combine(outDir, cueSheet.TrackFilenames[i]));
|
||||
}
|
||||
}
|
||||
DialogResult dlgRes = DialogResult.Cancel;
|
||||
dlgRes = DialogResult.Cancel;
|
||||
if (outputExists)
|
||||
{
|
||||
this.Invoke((MethodInvoker)delegate()
|
||||
{
|
||||
dlgRes = MessageBox.Show("One or more output file already exists, " +
|
||||
dlgRes = MessageBox.Show(this, "One or more output file already exists, " +
|
||||
"do you want to overwrite?", "Overwrite?", (_batchPaths.Count == 0) ?
|
||||
MessageBoxButtons.YesNo : MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
|
||||
if (dlgRes == DialogResult.Yes)
|
||||
outputExists = false;
|
||||
else if (_batchPaths.Count == 0)
|
||||
SetupControls(false);
|
||||
});
|
||||
|
||||
if (dlgRes == DialogResult.Yes)
|
||||
outputExists = false;
|
||||
else if (dlgRes == DialogResult.Cancel || _batchPaths.Count == 0)
|
||||
if (outputExists && _batchPaths.Count == 0)
|
||||
{
|
||||
cueSheet.Close();
|
||||
_batchPaths.Clear();
|
||||
SetupControls(false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -396,7 +439,7 @@ namespace JDP {
|
||||
this.Invoke((MethodInvoker)delegate()
|
||||
{
|
||||
SetupControls(false);
|
||||
MessageBox.Show("Conversion was stopped.", "Stopped", MessageBoxButtons.OK,
|
||||
MessageBox.Show(this, "Conversion was stopped.", "Stopped", MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Exclamation);
|
||||
});
|
||||
}
|
||||
@@ -475,17 +518,17 @@ namespace JDP {
|
||||
return;
|
||||
}
|
||||
if (warnAboutPadding) {
|
||||
MessageBox.Show("One or more input file doesn't end on a CD frame boundary. " +
|
||||
MessageBox.Show(this, "One or more input file doesn't end on a CD frame boundary. " +
|
||||
"The output has been padded where necessary to fix this. If your input " +
|
||||
"files are from a CD source, this may indicate a problem with your files.",
|
||||
"Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
}
|
||||
MessageBox.Show("Conversion was successful!", "Done", MessageBoxButtons.OK,
|
||||
MessageBox.Show(this, "Conversion was successful!", "Done", MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Information);
|
||||
}
|
||||
|
||||
private void ShowBatchDoneMessage() {
|
||||
MessageBox.Show("Batch conversion is complete!", "Done", MessageBoxButtons.OK,
|
||||
MessageBox.Show(this, "Batch conversion is complete!", "Done", MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Information);
|
||||
}
|
||||
|
||||
@@ -494,7 +537,7 @@ namespace JDP {
|
||||
return true;
|
||||
}
|
||||
|
||||
DialogResult dlgRes = MessageBox.Show("Write offset setting is non-zero which " +
|
||||
DialogResult dlgRes = MessageBox.Show(this, "Write offset setting is non-zero which " +
|
||||
"will cause some samples to be discarded. You should only use this setting " +
|
||||
"to make temporary files for burning. Are you sure you want to continue?",
|
||||
"Write offset is enabled", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
|
||||
@@ -523,6 +566,12 @@ namespace JDP {
|
||||
_usePregapForFirstTrackInSingleFile = sr.LoadBoolean("UsePregapForFirstTrackInSingleFile") ?? false;
|
||||
_reducePriority = sr.LoadBoolean("ReducePriority") ?? true;
|
||||
chkLossyWAV.Checked = sr.LoadBoolean("LossyWav") ?? false;
|
||||
switch (sr.LoadInt32("FreedbLookup", null, null) ?? 2)
|
||||
{
|
||||
case 0: rbFreedbNever.Checked = true; break;
|
||||
case 1: rbFreedbIf.Checked = true; break;
|
||||
case 2: rbFreedbAlways.Checked = true; break;
|
||||
}
|
||||
_config.Load(sr);
|
||||
}
|
||||
|
||||
@@ -539,6 +588,7 @@ namespace JDP {
|
||||
sw.Save("UsePregapForFirstTrackInSingleFile", _usePregapForFirstTrackInSingleFile);
|
||||
sw.Save("ReducePriority", _reducePriority);
|
||||
sw.Save("LossyWav", chkLossyWAV.Checked);
|
||||
sw.Save("FreedbLookup", rbFreedbNever.Checked ? 0 : rbFreedbIf.Checked ? 1 : 2);
|
||||
_config.Save(sw);
|
||||
sw.Close();
|
||||
}
|
||||
@@ -687,6 +737,7 @@ namespace JDP {
|
||||
if (rbFLAC.Checked) return OutputAudioFormat.FLAC;
|
||||
if (rbWavPack.Checked) return OutputAudioFormat.WavPack;
|
||||
if (rbAPE.Checked) return OutputAudioFormat.APE;
|
||||
if (rbTTA.Checked) return OutputAudioFormat.TTA;
|
||||
if (rbNoAudio.Checked) return OutputAudioFormat.NoAudio;
|
||||
return OutputAudioFormat.WAV;
|
||||
}
|
||||
@@ -695,6 +746,7 @@ namespace JDP {
|
||||
case OutputAudioFormat.FLAC: rbFLAC.Checked = true; break;
|
||||
case OutputAudioFormat.WavPack: rbWavPack.Checked = true; break;
|
||||
case OutputAudioFormat.APE: rbAPE.Checked = true; break;
|
||||
case OutputAudioFormat.TTA: rbTTA.Checked = true; break;
|
||||
case OutputAudioFormat.WAV: rbWAV.Checked = true; break;
|
||||
case OutputAudioFormat.NoAudio: rbNoAudio.Checked = true; break;
|
||||
}
|
||||
@@ -760,10 +812,10 @@ namespace JDP {
|
||||
}
|
||||
|
||||
private void UpdateOutputPath() {
|
||||
UpdateOutputPath("Artist", "Album");
|
||||
UpdateOutputPath("YYYY", "Artist", "Album");
|
||||
}
|
||||
|
||||
private void UpdateOutputPath(string artist, string album) {
|
||||
private void UpdateOutputPath(string year, string artist, string album) {
|
||||
/* if (rbArVerify.Checked)
|
||||
{
|
||||
txtOutputPath.Text = txtInputPath.Text;
|
||||
@@ -779,11 +831,11 @@ namespace JDP {
|
||||
{
|
||||
txtOutputPath.ReadOnly = true;
|
||||
btnBrowseOutput.Enabled = false;
|
||||
txtOutputPath.Text = GenerateOutputPath(artist, album);
|
||||
txtOutputPath.Text = GenerateOutputPath(year, artist, album);
|
||||
}
|
||||
}
|
||||
|
||||
private string GenerateOutputPath(string artist, string album) {
|
||||
private string GenerateOutputPath(string year, string artist, string album) {
|
||||
string pathIn, pathOut, dir, file, ext;
|
||||
|
||||
pathIn = txtInputPath.Text;
|
||||
@@ -830,8 +882,10 @@ namespace JDP {
|
||||
|
||||
find.Add("%D");
|
||||
find.Add("%C");
|
||||
find.Add("%Y");
|
||||
replace.Add(General.EmptyStringToNull(_config.CleanseString(rs ? artist.Replace(' ', '_') : artist)));
|
||||
replace.Add(General.EmptyStringToNull(_config.CleanseString(rs ? album.Replace(' ', '_') : album)));
|
||||
replace.Add(year);
|
||||
BuildOutputPathFindReplace(pathIn, format, find, replace);
|
||||
|
||||
pathOut = General.ReplaceMultiple(format, find, replace);
|
||||
@@ -849,7 +903,7 @@ namespace JDP {
|
||||
chkLossyWAV.Enabled = rbFLAC.Checked || rbWavPack.Checked || rbWAV.Checked;
|
||||
rbNoAudio.Enabled = !rbEmbedCUE.Checked && !chkLossyWAV.Checked;
|
||||
rbWAV.Enabled = !rbEmbedCUE.Checked;
|
||||
rbAPE.Enabled = !chkLossyWAV.Checked;
|
||||
rbTTA.Enabled = rbAPE.Enabled = !chkLossyWAV.Checked;
|
||||
}
|
||||
|
||||
private void rbWAV_CheckedChanged(object sender, EventArgs e)
|
||||
@@ -892,7 +946,7 @@ namespace JDP {
|
||||
string[] cueFiles = Directory.GetFiles(dir, "*.cue");
|
||||
if (cueFiles.Length == 0)
|
||||
{
|
||||
string[] audioExts = new string[] { "*.wav", "*.flac", "*.wv", "*.ape", "*.m4a" };
|
||||
string[] audioExts = new string[] { "*.wav", "*.flac", "*.wv", "*.ape", "*.m4a", "*.tta" };
|
||||
for (int i = 0; i < audioExts.Length; i++)
|
||||
{
|
||||
string cueSheet = CUESheet.CreateDummyCUESheet(dir, audioExts[i]);
|
||||
@@ -965,6 +1019,12 @@ namespace JDP {
|
||||
UpdateOutputPath();
|
||||
SetupControls(false);
|
||||
}
|
||||
|
||||
private void rbTTA_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
updateOutputStyles();
|
||||
UpdateOutputPath();
|
||||
}
|
||||
}
|
||||
|
||||
enum OutputPathGeneration {
|
||||
|
||||
@@ -120,12 +120,21 @@
|
||||
<data name="btnConvert.Text" xml:space="preserve">
|
||||
<value>&Los</value>
|
||||
</data>
|
||||
<data name="btnConvert.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="btnBrowseOutput.Text" xml:space="preserve">
|
||||
<value>Durchsuchen...</value>
|
||||
</data>
|
||||
<data name="btnBrowseOutput.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="btnBrowseInput.Text" xml:space="preserve">
|
||||
<value>Durchsuchen...</value>
|
||||
</data>
|
||||
<data name="btnBrowseInput.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="lblOutput.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>53, 13</value>
|
||||
@@ -133,9 +142,24 @@
|
||||
<data name="lblOutput.Text" xml:space="preserve">
|
||||
<value>&Ausgabe:</value>
|
||||
</data>
|
||||
<data name="lblOutput.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="lblInput.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="txtOutputPath.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="txtInputPath.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="grpCUEPaths.Text" xml:space="preserve">
|
||||
<value>CUE-Pfade</value>
|
||||
</data>
|
||||
<data name="grpCUEPaths.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="rbEmbedCUE.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>81, 17</value>
|
||||
</data>
|
||||
@@ -185,65 +209,98 @@
|
||||
<value>97, 211</value>
|
||||
</data>
|
||||
<data name="grpOutputStyle.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>141, 137</value>
|
||||
<value>141, 164</value>
|
||||
</data>
|
||||
<data name="grpOutputStyle.Text" xml:space="preserve">
|
||||
<value>CUE-Stil</value>
|
||||
</data>
|
||||
<data name="grpOutputStyle.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="btnAbout.Text" xml:space="preserve">
|
||||
<value>Über</value>
|
||||
</data>
|
||||
<data name="btnAbout.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="txtCustomFormat.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>163, 62</value>
|
||||
</data>
|
||||
<data name="txtCustomFormat.Text" xml:space="preserve">
|
||||
<value>%1:-2\Neu\%-1\%F.cue</value>
|
||||
</data>
|
||||
<data name="txtCustomFormat.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="rbCustomFormat.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>134, 17</value>
|
||||
</data>
|
||||
<data name="rbCustomFormat.Text" xml:space="preserve">
|
||||
<value>Nutze eigenes Format:</value>
|
||||
</data>
|
||||
<data name="rbCustomFormat.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="txtCreateSubdirectory.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>163, 20</value>
|
||||
</data>
|
||||
<data name="txtCreateSubdirectory.Text" xml:space="preserve">
|
||||
<value>Neu</value>
|
||||
</data>
|
||||
<data name="txtCreateSubdirectory.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="rbDontGenerate.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>61, 17</value>
|
||||
</data>
|
||||
<data name="rbDontGenerate.Text" xml:space="preserve">
|
||||
<value>&Manuell</value>
|
||||
</data>
|
||||
<data name="rbDontGenerate.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="rbCreateSubdirectory.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>147, 17</value>
|
||||
</data>
|
||||
<data name="rbCreateSubdirectory.Text" xml:space="preserve">
|
||||
<value>E&rstelle Unterverzeichnis:</value>
|
||||
</data>
|
||||
<data name="rbCreateSubdirectory.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="rbAppendFilename.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>153, 17</value>
|
||||
</data>
|
||||
<data name="rbAppendFilename.Text" xml:space="preserve">
|
||||
<value>An Dateinamen anhängen:</value>
|
||||
</data>
|
||||
<data name="rbAppendFilename.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="txtAppendFilename.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>163, 42</value>
|
||||
</data>
|
||||
<data name="txtAppendFilename.Text" xml:space="preserve">
|
||||
<value>-Neu</value>
|
||||
</data>
|
||||
<data name="grpOutputPathGeneration.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>398, 115</value>
|
||||
<data name="txtAppendFilename.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="grpOutputPathGeneration.Text" xml:space="preserve">
|
||||
<value>Ausgabepfad</value>
|
||||
</data>
|
||||
<data name="grpOutputPathGeneration.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="rbTTA.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="chkLossyWAV.ToolTip" xml:space="preserve">
|
||||
<value>Erstelle ein Paar von Dateien - .lossy.wav(flac usw.) und .lwcdf.wav(flac usw.). Die verlustbehaftete (lossy) Datei enthält komprimierte Musik, aber gemeinsam mit der lwcdf-Datei können die originalen Audiodaten wiederhergestellt werden.</value>
|
||||
</data>
|
||||
<data name="rbAPE.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="rbNoAudio.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>51, 17</value>
|
||||
</data>
|
||||
@@ -253,21 +310,45 @@
|
||||
<data name="rbNoAudio.ToolTip" xml:space="preserve">
|
||||
<value>Erstelle keine Audiodateien, nur CUE-Sheet</value>
|
||||
</data>
|
||||
<data name="rbWavPack.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="rbWAV.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="rbFLAC.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="grpAudioOutput.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>83, 137</value>
|
||||
<value>83, 164</value>
|
||||
</data>
|
||||
<data name="grpAudioOutput.Text" xml:space="preserve">
|
||||
<value>Audioausgabe</value>
|
||||
</data>
|
||||
<data name="grpAudioOutput.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="btnBatch.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>412, 307</value>
|
||||
</data>
|
||||
<data name="btnBatch.Text" xml:space="preserve">
|
||||
<value>Stapel...</value>
|
||||
</data>
|
||||
<data name="btnBatch.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="btnFilenameCorrector.Text" xml:space="preserve">
|
||||
<value>Dateinamenkorrektur...</value>
|
||||
</data>
|
||||
<data name="btnFilenameCorrector.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="btnSettings.Text" xml:space="preserve">
|
||||
<value>Erweiterte Einstellungen...</value>
|
||||
</data>
|
||||
<data name="btnSettings.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="rbArAndEncode.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>6, 37</value>
|
||||
</data>
|
||||
@@ -277,9 +358,15 @@
|
||||
<data name="rbArAndEncode.Text" xml:space="preserve">
|
||||
<value>Kodieren und verifizieren</value>
|
||||
</data>
|
||||
<data name="rbArAndEncode.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="label1.Text" xml:space="preserve">
|
||||
<value>Datenspur:</value>
|
||||
</data>
|
||||
<data name="label1.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="txtDataTrackLength.ToolTip" xml:space="preserve">
|
||||
<value>Nicht für normale Musik-CDs verwendet. Erweiterte CDs mit Datenspuren können nicht in der Datenbank gefunden werden, es sei denn, Sie kennen die Länge der Datenspur. Sie können sie oft im EAC-Log finden. Falls das EAC-Log beim CUE-Sheet gefunden wird, wird es automatisch ausgelesen, und Sie müssen hier nichts eingeben.</value>
|
||||
</data>
|
||||
@@ -319,19 +406,40 @@
|
||||
<data name="rbArNone.ToolTip" xml:space="preserve">
|
||||
<value>Die AccurateRip-Datenbank zur Verifizierung nicht kontaktieren</value>
|
||||
</data>
|
||||
<data name="grpAccurateRip.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>162, 137</value>
|
||||
<data name="grpAccurateRip.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="statusStrip1.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="btnCUECreator.Text" xml:space="preserve">
|
||||
<value>CUE-Sheet erstellen...</value>
|
||||
</data>
|
||||
<data name="btnCUECreator.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="btnStop.Text" xml:space="preserve">
|
||||
<value>&Stopp</value>
|
||||
</data>
|
||||
<data name="btnStop.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="btnPause.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="btnResume.Text" xml:space="preserve">
|
||||
<value>&Fortsetzen</value>
|
||||
</data>
|
||||
<data name="btnResume.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="groupBox1.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>CUE-Werkzeuge</value>
|
||||
</data>
|
||||
<data name="$this.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
</root>
|
||||
@@ -119,7 +119,7 @@
|
||||
</resheader>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="btnConvert.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>412, 307</value>
|
||||
<value>412, 339</value>
|
||||
</data>
|
||||
<data name="btnConvert.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>131, 23</value>
|
||||
@@ -141,7 +141,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>btnConvert.ZOrder" xml:space="preserve">
|
||||
<value>14</value>
|
||||
<value>15</value>
|
||||
</data>
|
||||
<data name="btnBrowseOutput.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>452, 49</value>
|
||||
@@ -309,7 +309,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>grpCUEPaths.ZOrder" xml:space="preserve">
|
||||
<value>13</value>
|
||||
<value>14</value>
|
||||
</data>
|
||||
<data name="rbEmbedCUE.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -472,7 +472,7 @@
|
||||
<value>108, 211</value>
|
||||
</data>
|
||||
<data name="grpOutputStyle.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>128, 137</value>
|
||||
<value>128, 164</value>
|
||||
</data>
|
||||
<data name="grpOutputStyle.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>3</value>
|
||||
@@ -490,10 +490,10 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>grpOutputStyle.ZOrder" xml:space="preserve">
|
||||
<value>12</value>
|
||||
<value>13</value>
|
||||
</data>
|
||||
<data name="btnAbout.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>412, 152</value>
|
||||
<value>412, 184</value>
|
||||
</data>
|
||||
<data name="btnAbout.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>131, 23</value>
|
||||
@@ -514,10 +514,10 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>btnAbout.ZOrder" xml:space="preserve">
|
||||
<value>11</value>
|
||||
<value>12</value>
|
||||
</data>
|
||||
<data name="txtCustomFormat.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>140, 62</value>
|
||||
<value>166, 60</value>
|
||||
</data>
|
||||
<data name="txtCustomFormat.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>226, 21</value>
|
||||
@@ -568,7 +568,7 @@
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="txtCreateSubdirectory.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>140, 20</value>
|
||||
<value>166, 18</value>
|
||||
</data>
|
||||
<data name="txtCreateSubdirectory.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>226, 21</value>
|
||||
@@ -673,7 +673,7 @@
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="txtAppendFilename.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>140, 41</value>
|
||||
<value>166, 39</value>
|
||||
</data>
|
||||
<data name="txtAppendFilename.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>226, 21</value>
|
||||
@@ -700,7 +700,7 @@
|
||||
<value>8, 92</value>
|
||||
</data>
|
||||
<data name="grpOutputPathGeneration.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>380, 115</value>
|
||||
<value>398, 115</value>
|
||||
</data>
|
||||
<data name="grpOutputPathGeneration.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
@@ -718,13 +718,40 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>grpOutputPathGeneration.ZOrder" xml:space="preserve">
|
||||
<value>10</value>
|
||||
<value>11</value>
|
||||
</data>
|
||||
<data name="rbTTA.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="rbTTA.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>10, 68</value>
|
||||
</data>
|
||||
<data name="rbTTA.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>44, 17</value>
|
||||
</data>
|
||||
<data name="rbTTA.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="rbTTA.Text" xml:space="preserve">
|
||||
<value>TTA</value>
|
||||
</data>
|
||||
<data name=">>rbTTA.Name" xml:space="preserve">
|
||||
<value>rbTTA</value>
|
||||
</data>
|
||||
<data name=">>rbTTA.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>rbTTA.Parent" xml:space="preserve">
|
||||
<value>grpAudioOutput</value>
|
||||
</data>
|
||||
<data name=">>rbTTA.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="chkLossyWAV.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="chkLossyWAV.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>10, 109</value>
|
||||
<value>6, 141</value>
|
||||
</data>
|
||||
<data name="chkLossyWAV.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>76, 17</value>
|
||||
@@ -748,7 +775,7 @@
|
||||
<value>grpAudioOutput</value>
|
||||
</data>
|
||||
<data name=">>chkLossyWAV.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="rbAPE.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -775,13 +802,13 @@
|
||||
<value>grpAudioOutput</value>
|
||||
</data>
|
||||
<data name=">>rbAPE.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="rbNoAudio.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="rbNoAudio.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>10, 85</value>
|
||||
<value>10, 102</value>
|
||||
</data>
|
||||
<data name="rbNoAudio.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>50, 17</value>
|
||||
@@ -805,7 +832,7 @@
|
||||
<value>grpAudioOutput</value>
|
||||
</data>
|
||||
<data name=">>rbNoAudio.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="rbWavPack.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -832,8 +859,35 @@
|
||||
<value>grpAudioOutput</value>
|
||||
</data>
|
||||
<data name=">>rbWavPack.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="rbWAV.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="rbWAV.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>10, 85</value>
|
||||
</data>
|
||||
<data name="rbWAV.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>48, 17</value>
|
||||
</data>
|
||||
<data name="rbWAV.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="rbWAV.Text" xml:space="preserve">
|
||||
<value>&WAV</value>
|
||||
</data>
|
||||
<data name=">>rbWAV.Name" xml:space="preserve">
|
||||
<value>rbWAV</value>
|
||||
</data>
|
||||
<data name=">>rbWAV.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>rbWAV.Parent" xml:space="preserve">
|
||||
<value>grpAudioOutput</value>
|
||||
</data>
|
||||
<data name=">>rbWAV.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="rbFLAC.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
@@ -859,40 +913,13 @@
|
||||
<value>grpAudioOutput</value>
|
||||
</data>
|
||||
<data name=">>rbFLAC.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="rbWAV.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="rbWAV.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>10, 68</value>
|
||||
</data>
|
||||
<data name="rbWAV.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>48, 17</value>
|
||||
</data>
|
||||
<data name="rbWAV.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="rbWAV.Text" xml:space="preserve">
|
||||
<value>&WAV</value>
|
||||
</data>
|
||||
<data name=">>rbWAV.Name" xml:space="preserve">
|
||||
<value>rbWAV</value>
|
||||
</data>
|
||||
<data name=">>rbWAV.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>rbWAV.Parent" xml:space="preserve">
|
||||
<value>grpAudioOutput</value>
|
||||
</data>
|
||||
<data name=">>rbWAV.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="grpAudioOutput.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>8, 211</value>
|
||||
</data>
|
||||
<data name="grpAudioOutput.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>92, 137</value>
|
||||
<value>92, 164</value>
|
||||
</data>
|
||||
<data name="grpAudioOutput.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
@@ -910,10 +937,10 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>grpAudioOutput.ZOrder" xml:space="preserve">
|
||||
<value>9</value>
|
||||
<value>10</value>
|
||||
</data>
|
||||
<data name="btnBatch.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>412, 276</value>
|
||||
<value>412, 308</value>
|
||||
</data>
|
||||
<data name="btnBatch.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>131, 23</value>
|
||||
@@ -934,10 +961,10 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>btnBatch.ZOrder" xml:space="preserve">
|
||||
<value>8</value>
|
||||
<value>9</value>
|
||||
</data>
|
||||
<data name="btnFilenameCorrector.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>412, 245</value>
|
||||
<value>412, 277</value>
|
||||
</data>
|
||||
<data name="btnFilenameCorrector.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>131, 23</value>
|
||||
@@ -958,10 +985,10 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>btnFilenameCorrector.ZOrder" xml:space="preserve">
|
||||
<value>7</value>
|
||||
<value>8</value>
|
||||
</data>
|
||||
<data name="btnSettings.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>412, 183</value>
|
||||
<value>412, 215</value>
|
||||
</data>
|
||||
<data name="btnSettings.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>131, 23</value>
|
||||
@@ -982,7 +1009,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>btnSettings.ZOrder" xml:space="preserve">
|
||||
<value>6</value>
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name="rbArAndEncode.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@@ -1015,7 +1042,7 @@
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>7, 106</value>
|
||||
<value>7, 141</value>
|
||||
</data>
|
||||
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>61, 13</value>
|
||||
@@ -1039,7 +1066,7 @@
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="txtDataTrackLength.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>77, 103</value>
|
||||
<value>77, 138</value>
|
||||
</data>
|
||||
<data name="txtDataTrackLength.Mask" xml:space="preserve">
|
||||
<value>00:00:00</value>
|
||||
@@ -1162,7 +1189,7 @@
|
||||
<value>244, 211</value>
|
||||
</data>
|
||||
<data name="grpAccurateRip.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>144, 137</value>
|
||||
<value>162, 164</value>
|
||||
</data>
|
||||
<data name="grpAccurateRip.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>4</value>
|
||||
@@ -1180,13 +1207,13 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>grpAccurateRip.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
<value>6</value>
|
||||
</data>
|
||||
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>0, 359</value>
|
||||
<value>0, 378</value>
|
||||
</metadata>
|
||||
<data name="toolStripStatusLabel1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>221, 17</value>
|
||||
<value>253, 17</value>
|
||||
</data>
|
||||
<data name="toolStripStatusLabel1.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
|
||||
<value>MiddleLeft</value>
|
||||
@@ -1204,10 +1231,10 @@
|
||||
<value>Disk progress</value>
|
||||
</data>
|
||||
<data name="statusStrip1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 359</value>
|
||||
<value>0, 378</value>
|
||||
</data>
|
||||
<data name="statusStrip1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>551, 22</value>
|
||||
<value>552, 22</value>
|
||||
</data>
|
||||
<data name="statusStrip1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>11</value>
|
||||
@@ -1225,13 +1252,13 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>statusStrip1.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="btnCUECreator.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="btnCUECreator.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>412, 214</value>
|
||||
<value>412, 246</value>
|
||||
</data>
|
||||
<data name="btnCUECreator.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>131, 23</value>
|
||||
@@ -1252,13 +1279,13 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>btnCUECreator.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="btnStop.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="btnStop.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>412, 307</value>
|
||||
<value>412, 339</value>
|
||||
</data>
|
||||
<data name="btnStop.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>66, 23</value>
|
||||
@@ -1282,13 +1309,13 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>btnStop.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="btnPause.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="btnPause.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>477, 307</value>
|
||||
<value>477, 339</value>
|
||||
</data>
|
||||
<data name="btnPause.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>66, 23</value>
|
||||
@@ -1312,13 +1339,13 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>btnPause.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="btnResume.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="btnResume.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>477, 307</value>
|
||||
<value>477, 339</value>
|
||||
</data>
|
||||
<data name="btnResume.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>66, 23</value>
|
||||
@@ -1342,6 +1369,111 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>btnResume.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="rbFreedbAlways.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="rbFreedbAlways.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>6, 53</value>
|
||||
</data>
|
||||
<data name="rbFreedbAlways.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>59, 17</value>
|
||||
</data>
|
||||
<data name="rbFreedbAlways.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="rbFreedbAlways.Text" xml:space="preserve">
|
||||
<value>Always</value>
|
||||
</data>
|
||||
<data name=">>rbFreedbAlways.Name" xml:space="preserve">
|
||||
<value>rbFreedbAlways</value>
|
||||
</data>
|
||||
<data name=">>rbFreedbAlways.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>rbFreedbAlways.Parent" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>rbFreedbAlways.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="rbFreedbIf.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="rbFreedbIf.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>6, 36</value>
|
||||
</data>
|
||||
<data name="rbFreedbIf.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>72, 17</value>
|
||||
</data>
|
||||
<data name="rbFreedbIf.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="rbFreedbIf.Text" xml:space="preserve">
|
||||
<value>If needed</value>
|
||||
</data>
|
||||
<data name=">>rbFreedbIf.Name" xml:space="preserve">
|
||||
<value>rbFreedbIf</value>
|
||||
</data>
|
||||
<data name=">>rbFreedbIf.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>rbFreedbIf.Parent" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>rbFreedbIf.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="rbFreedbNever.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="rbFreedbNever.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>6, 19</value>
|
||||
</data>
|
||||
<data name="rbFreedbNever.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>54, 17</value>
|
||||
</data>
|
||||
<data name="rbFreedbNever.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="rbFreedbNever.Text" xml:space="preserve">
|
||||
<value>Never</value>
|
||||
</data>
|
||||
<data name=">>rbFreedbNever.Name" xml:space="preserve">
|
||||
<value>rbFreedbNever</value>
|
||||
</data>
|
||||
<data name=">>rbFreedbNever.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>rbFreedbNever.Parent" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>rbFreedbNever.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="groupBox1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>412, 92</value>
|
||||
</data>
|
||||
<data name="groupBox1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>131, 86</value>
|
||||
</data>
|
||||
<data name="groupBox1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>15</value>
|
||||
</data>
|
||||
<data name="groupBox1.Text" xml:space="preserve">
|
||||
<value>Freedb lookup</value>
|
||||
</data>
|
||||
<data name=">>groupBox1.Name" xml:space="preserve">
|
||||
<value>groupBox1</value>
|
||||
</data>
|
||||
<data name=">>groupBox1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>groupBox1.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>groupBox1.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
@@ -1351,7 +1483,7 @@
|
||||
<value>6, 13</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>551, 381</value>
|
||||
<value>552, 400</value>
|
||||
</data>
|
||||
<data name="$this.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Tahoma, 8.25pt</value>
|
||||
|
||||
@@ -117,55 +117,34 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="btnConvert.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>412, 346</value>
|
||||
</data>
|
||||
<data name="btnConvert.Text" xml:space="preserve">
|
||||
<value>Поехали</value>
|
||||
</data>
|
||||
<data name="btnConvert.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="btnBrowseOutput.Text" xml:space="preserve">
|
||||
<value>Выбор...</value>
|
||||
</data>
|
||||
<data name="btnBrowseOutput.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="btnBrowseInput.Text" xml:space="preserve">
|
||||
<value>Выбор...</value>
|
||||
</data>
|
||||
<data name="btnBrowseInput.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="lblOutput.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>44, 13</value>
|
||||
</data>
|
||||
<data name="lblOutput.Text" xml:space="preserve">
|
||||
<value>Выход:</value>
|
||||
</data>
|
||||
<data name="lblOutput.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="lblInput.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>36, 13</value>
|
||||
</data>
|
||||
<data name="lblInput.Text" xml:space="preserve">
|
||||
<value>&Вход:</value>
|
||||
</data>
|
||||
<data name="lblInput.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="txtOutputPath.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="txtInputPath.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="grpCUEPaths.Text" xml:space="preserve">
|
||||
<value>Пути к файлам</value>
|
||||
</data>
|
||||
<data name="grpCUEPaths.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="rbEmbedCUE.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>86, 17</value>
|
||||
</data>
|
||||
@@ -212,143 +191,95 @@
|
||||
<value>Создать образ диска в виде одного аудио-файла и .cue файла</value>
|
||||
</data>
|
||||
<data name="grpOutputStyle.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>130, 137</value>
|
||||
<value>130, 164</value>
|
||||
</data>
|
||||
<data name="grpOutputStyle.Text" xml:space="preserve">
|
||||
<value>Стиль CUE</value>
|
||||
</data>
|
||||
<data name="grpOutputStyle.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
<data name="btnAbout.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>412, 191</value>
|
||||
</data>
|
||||
<data name="btnAbout.Text" xml:space="preserve">
|
||||
<value>О программе</value>
|
||||
</data>
|
||||
<data name="btnAbout.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="txtCustomFormat.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>240, 21</value>
|
||||
</data>
|
||||
<data name="txtCustomFormat.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="rbCustomFormat.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>89, 17</value>
|
||||
</data>
|
||||
<data name="rbCustomFormat.Text" xml:space="preserve">
|
||||
<value>По шаблону:</value>
|
||||
</data>
|
||||
<data name="rbCustomFormat.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="txtCreateSubdirectory.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>240, 21</value>
|
||||
</data>
|
||||
<data name="txtCreateSubdirectory.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="rbDontGenerate.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>70, 17</value>
|
||||
</data>
|
||||
<data name="rbDontGenerate.Text" xml:space="preserve">
|
||||
<value>Вручную</value>
|
||||
</data>
|
||||
<data name="rbDontGenerate.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="rbCreateSubdirectory.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>116, 17</value>
|
||||
</data>
|
||||
<data name="rbCreateSubdirectory.Text" xml:space="preserve">
|
||||
<value>Создать каталог:</value>
|
||||
</data>
|
||||
<data name="rbCreateSubdirectory.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="rbAppendFilename.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>117, 17</value>
|
||||
</data>
|
||||
<data name="rbAppendFilename.Text" xml:space="preserve">
|
||||
<value>Суффикс к имени:</value>
|
||||
</data>
|
||||
<data name="rbAppendFilename.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="txtAppendFilename.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>240, 21</value>
|
||||
</data>
|
||||
<data name="txtAppendFilename.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="grpOutputPathGeneration.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>392, 113</value>
|
||||
</data>
|
||||
<data name="grpOutputPathGeneration.Text" xml:space="preserve">
|
||||
<value>Путь для выходных файлов</value>
|
||||
</data>
|
||||
<data name="grpOutputPathGeneration.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="rbAPE.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="rbNoAudio.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>76, 17</value>
|
||||
</data>
|
||||
<data name="rbNoAudio.Text" xml:space="preserve">
|
||||
<value>Без аудио</value>
|
||||
</data>
|
||||
<data name="rbWavPack.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="rbFLAC.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="rbWAV.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="grpAudioOutput.Text" xml:space="preserve">
|
||||
<value>Формат аудио</value>
|
||||
</data>
|
||||
<data name="grpAudioOutput.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
<data name="btnBatch.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>412, 315</value>
|
||||
</data>
|
||||
<data name="btnBatch.Text" xml:space="preserve">
|
||||
<value>Обработать папку...</value>
|
||||
</data>
|
||||
<data name="btnBatch.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
<data name="btnFilenameCorrector.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>412, 284</value>
|
||||
</data>
|
||||
<data name="btnFilenameCorrector.Text" xml:space="preserve">
|
||||
<value>Исправить имена...</value>
|
||||
</data>
|
||||
<data name="btnFilenameCorrector.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
<data name="btnSettings.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>412, 222</value>
|
||||
</data>
|
||||
<data name="btnSettings.Text" xml:space="preserve">
|
||||
<value>Настройки...</value>
|
||||
</data>
|
||||
<data name="btnSettings.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="rbArAndEncode.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>138, 17</value>
|
||||
</data>
|
||||
<data name="rbArAndEncode.Text" xml:space="preserve">
|
||||
<value>Записать и проверить</value>
|
||||
</data>
|
||||
<data name="rbArAndEncode.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>47, 13</value>
|
||||
</data>
|
||||
<data name="label1.Text" xml:space="preserve">
|
||||
<value>Данные</value>
|
||||
</data>
|
||||
<data name="label1.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="txtDataTrackLength.ToolTip" xml:space="preserve">
|
||||
<value>Не используется для обычных музыкальных дисков. "Улучшенные" компакт диски с треком данных не найдутся в базе данных, если не указать длину трека данных. Её часто можно найти в логе EAC. Если лог EAC лежит в той же папке что и .cue, и имеет такое же имя как .cue файл, то он будет проанализирован автоматически и тут опять же ничего не надо будет вводить.</value>
|
||||
</data>
|
||||
@@ -383,39 +314,30 @@
|
||||
<value>250, 211</value>
|
||||
</data>
|
||||
<data name="grpAccurateRip.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>154, 137</value>
|
||||
<value>154, 164</value>
|
||||
</data>
|
||||
<data name="grpAccurateRip.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="statusStrip1.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
<data name="btnCUECreator.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>412, 253</value>
|
||||
</data>
|
||||
<data name="btnCUECreator.Text" xml:space="preserve">
|
||||
<value>Создать CUE...</value>
|
||||
</data>
|
||||
<data name="btnCUECreator.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
<data name="btnStop.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>412, 346</value>
|
||||
</data>
|
||||
<data name="btnStop.Text" xml:space="preserve">
|
||||
<value>Стоп</value>
|
||||
</data>
|
||||
<data name="btnStop.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
<data name="btnPause.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>477, 346</value>
|
||||
</data>
|
||||
<data name="btnPause.Text" xml:space="preserve">
|
||||
<value>Пауза</value>
|
||||
</data>
|
||||
<data name="btnPause.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
<data name="btnResume.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>477, 346</value>
|
||||
</data>
|
||||
<data name="btnResume.Text" xml:space="preserve">
|
||||
<value>&Поехали</value>
|
||||
</data>
|
||||
<data name="btnResume.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="$this.ToolTip" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
</root>
|
||||
5
CUETools/frmChoice.Designer.cs
generated
5
CUETools/frmChoice.Designer.cs
generated
@@ -37,9 +37,10 @@ namespace JDP
|
||||
//
|
||||
resources.ApplyResources(this.comboRelease, "comboRelease");
|
||||
this.comboRelease.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.comboRelease.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
|
||||
this.comboRelease.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.comboRelease.FormattingEnabled = true;
|
||||
this.comboRelease.Name = "comboRelease";
|
||||
this.comboRelease.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.comboRelease_DrawItem);
|
||||
//
|
||||
// button1
|
||||
//
|
||||
@@ -57,6 +58,8 @@ namespace JDP
|
||||
this.Controls.Add(this.comboRelease);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
|
||||
this.Name = "frmChoice";
|
||||
this.Load += new System.EventHandler(this.frmChoice_Load);
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.frmChoice_FormClosing);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
@@ -5,6 +5,9 @@ using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using CUETools.Processor;
|
||||
using MusicBrainz;
|
||||
using Freedb;
|
||||
|
||||
namespace JDP
|
||||
{
|
||||
@@ -14,5 +17,71 @@ namespace JDP
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public CUESheet CUE;
|
||||
|
||||
private void comboRelease_DrawItem(object sender, DrawItemEventArgs e)
|
||||
{
|
||||
e.DrawBackground();
|
||||
StringFormat format = new StringFormat();
|
||||
format.FormatFlags = StringFormatFlags.NoClip;
|
||||
format.Alignment = StringAlignment.Near;
|
||||
if (e.Index >= 0 && e.Index < comboRelease.Items.Count)
|
||||
{
|
||||
string text = null;
|
||||
Bitmap ImageToDraw = null;
|
||||
if (comboRelease.Items[e.Index] is string)
|
||||
{
|
||||
text = (string) comboRelease.Items[e.Index];
|
||||
//comboRelease.GetItemText(comboRelease.Items[e.Index]);
|
||||
}
|
||||
else if (comboRelease.Items[e.Index] is MusicBrainz.Release)
|
||||
{
|
||||
ImageToDraw = Properties.Resources.musicbrainz;
|
||||
MusicBrainz.Release release = (MusicBrainz.Release) comboRelease.Items[e.Index];
|
||||
text = String.Format("{0}{1} - {2}",
|
||||
release.GetEvents().Count > 0 ? release.GetEvents()[0].Date.Substring(0, 4) + ": " : "",
|
||||
release.GetArtist(),
|
||||
release.GetTitle());
|
||||
}
|
||||
else if (comboRelease.Items[e.Index] is CDEntry)
|
||||
{
|
||||
ImageToDraw = Properties.Resources.freedb;
|
||||
CDEntry cdEntry = (CDEntry)comboRelease.Items[e.Index];
|
||||
text = String.Format("{0}: {1} - {2}",
|
||||
cdEntry.Year,
|
||||
cdEntry.Artist,
|
||||
cdEntry.Title);
|
||||
}
|
||||
if (ImageToDraw != null)
|
||||
e.Graphics.DrawImage(ImageToDraw, new Rectangle(e.Bounds.X, e.Bounds.Y, e.Bounds.Height, e.Bounds.Height));
|
||||
//e.Graphics.DrawImage(ImageToDraw, new Rectangle(e.Bounds.X + e.Bounds.Width - ImageToDraw.Width, e.Bounds.Y, ImageToDraw.Width, e.Bounds.Height));
|
||||
if (text != null)
|
||||
e.Graphics.DrawString(text, e.Font, new SolidBrush(e.ForeColor), new RectangleF((float)e.Bounds.X + e.Bounds.Height, (float)e.Bounds.Y, (float)(e.Bounds.Width - e.Bounds.Height), (float)e.Bounds.Height), format);
|
||||
}
|
||||
//e.DrawFocusRectangle();
|
||||
}
|
||||
|
||||
private void frmChoice_Load(object sender, EventArgs e)
|
||||
{
|
||||
button1.Select();
|
||||
}
|
||||
|
||||
private void frmChoice_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
if (e.CloseReason != CloseReason.None || DialogResult != DialogResult.OK)
|
||||
return;
|
||||
if (comboRelease.SelectedItem != null && comboRelease.SelectedItem is MusicBrainz.Release)
|
||||
CUE.FillFromMusicBrainz((MusicBrainz.Release)comboRelease.SelectedItem);
|
||||
else
|
||||
if (comboRelease.SelectedItem != null && comboRelease.SelectedItem is CDEntry)
|
||||
CUE.FillFromFreedb((CDEntry)comboRelease.SelectedItem);
|
||||
else
|
||||
return;
|
||||
frmProperties frm = new frmProperties();
|
||||
frm.CUE = CUE;
|
||||
if (frm.ShowDialog(this) != DialogResult.OK)
|
||||
e.Cancel = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
391
CUETools/frmSettings.Designer.cs
generated
391
CUETools/frmSettings.Designer.cs
generated
@@ -27,6 +27,7 @@ namespace JDP {
|
||||
System.Windows.Forms.Button btnCancel;
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmSettings));
|
||||
this.grpGeneral = new System.Windows.Forms.GroupBox();
|
||||
this.chkExtractLog = new System.Windows.Forms.CheckBox();
|
||||
this.chkReducePriority = new System.Windows.Forms.CheckBox();
|
||||
this.chkTruncateExtra4206Samples = new System.Windows.Forms.CheckBox();
|
||||
this.chkCreateCUEFileWhenEmbedded = new System.Windows.Forms.CheckBox();
|
||||
@@ -98,6 +99,7 @@ namespace JDP {
|
||||
this.tabPage4 = new System.Windows.Forms.TabPage();
|
||||
this.grpHDCD = new System.Windows.Forms.GroupBox();
|
||||
this.chkHDCDDetect = new System.Windows.Forms.CheckBox();
|
||||
this.chkOverwriteTags = new System.Windows.Forms.CheckBox();
|
||||
btnCancel = new System.Windows.Forms.Button();
|
||||
this.grpGeneral.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericWriteOffset)).BeginInit();
|
||||
@@ -125,22 +127,15 @@ namespace JDP {
|
||||
//
|
||||
// btnCancel
|
||||
//
|
||||
btnCancel.AccessibleDescription = null;
|
||||
btnCancel.AccessibleName = null;
|
||||
resources.ApplyResources(btnCancel, "btnCancel");
|
||||
btnCancel.BackgroundImage = null;
|
||||
btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
btnCancel.Font = null;
|
||||
resources.ApplyResources(btnCancel, "btnCancel");
|
||||
btnCancel.Name = "btnCancel";
|
||||
this.toolTip1.SetToolTip(btnCancel, resources.GetString("btnCancel.ToolTip"));
|
||||
btnCancel.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// grpGeneral
|
||||
//
|
||||
this.grpGeneral.AccessibleDescription = null;
|
||||
this.grpGeneral.AccessibleName = null;
|
||||
resources.ApplyResources(this.grpGeneral, "grpGeneral");
|
||||
this.grpGeneral.BackgroundImage = null;
|
||||
this.grpGeneral.Controls.Add(this.chkOverwriteTags);
|
||||
this.grpGeneral.Controls.Add(this.chkExtractLog);
|
||||
this.grpGeneral.Controls.Add(this.chkReducePriority);
|
||||
this.grpGeneral.Controls.Add(this.chkTruncateExtra4206Samples);
|
||||
this.grpGeneral.Controls.Add(this.chkCreateCUEFileWhenEmbedded);
|
||||
@@ -151,83 +146,58 @@ namespace JDP {
|
||||
this.grpGeneral.Controls.Add(this.chkAutoCorrectFilenames);
|
||||
this.grpGeneral.Controls.Add(this.chkPreserveHTOA);
|
||||
this.grpGeneral.Controls.Add(this.lblWriteOffset);
|
||||
this.grpGeneral.Font = null;
|
||||
resources.ApplyResources(this.grpGeneral, "grpGeneral");
|
||||
this.grpGeneral.Name = "grpGeneral";
|
||||
this.grpGeneral.TabStop = false;
|
||||
this.toolTip1.SetToolTip(this.grpGeneral, resources.GetString("grpGeneral.ToolTip"));
|
||||
//
|
||||
// chkExtractLog
|
||||
//
|
||||
resources.ApplyResources(this.chkExtractLog, "chkExtractLog");
|
||||
this.chkExtractLog.Name = "chkExtractLog";
|
||||
this.chkExtractLog.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// chkReducePriority
|
||||
//
|
||||
this.chkReducePriority.AccessibleDescription = null;
|
||||
this.chkReducePriority.AccessibleName = null;
|
||||
resources.ApplyResources(this.chkReducePriority, "chkReducePriority");
|
||||
this.chkReducePriority.BackgroundImage = null;
|
||||
this.chkReducePriority.Font = null;
|
||||
this.chkReducePriority.Name = "chkReducePriority";
|
||||
this.toolTip1.SetToolTip(this.chkReducePriority, resources.GetString("chkReducePriority.ToolTip"));
|
||||
this.chkReducePriority.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// chkTruncateExtra4206Samples
|
||||
//
|
||||
this.chkTruncateExtra4206Samples.AccessibleDescription = null;
|
||||
this.chkTruncateExtra4206Samples.AccessibleName = null;
|
||||
resources.ApplyResources(this.chkTruncateExtra4206Samples, "chkTruncateExtra4206Samples");
|
||||
this.chkTruncateExtra4206Samples.BackgroundImage = null;
|
||||
this.chkTruncateExtra4206Samples.Font = null;
|
||||
this.chkTruncateExtra4206Samples.Name = "chkTruncateExtra4206Samples";
|
||||
this.toolTip1.SetToolTip(this.chkTruncateExtra4206Samples, resources.GetString("chkTruncateExtra4206Samples.ToolTip"));
|
||||
this.chkTruncateExtra4206Samples.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// chkCreateCUEFileWhenEmbedded
|
||||
//
|
||||
this.chkCreateCUEFileWhenEmbedded.AccessibleDescription = null;
|
||||
this.chkCreateCUEFileWhenEmbedded.AccessibleName = null;
|
||||
resources.ApplyResources(this.chkCreateCUEFileWhenEmbedded, "chkCreateCUEFileWhenEmbedded");
|
||||
this.chkCreateCUEFileWhenEmbedded.BackgroundImage = null;
|
||||
this.chkCreateCUEFileWhenEmbedded.Font = null;
|
||||
this.chkCreateCUEFileWhenEmbedded.Name = "chkCreateCUEFileWhenEmbedded";
|
||||
this.toolTip1.SetToolTip(this.chkCreateCUEFileWhenEmbedded, resources.GetString("chkCreateCUEFileWhenEmbedded.ToolTip"));
|
||||
this.chkCreateCUEFileWhenEmbedded.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// chkCreateM3U
|
||||
//
|
||||
this.chkCreateM3U.AccessibleDescription = null;
|
||||
this.chkCreateM3U.AccessibleName = null;
|
||||
resources.ApplyResources(this.chkCreateM3U, "chkCreateM3U");
|
||||
this.chkCreateM3U.BackgroundImage = null;
|
||||
this.chkCreateM3U.Font = null;
|
||||
this.chkCreateM3U.Name = "chkCreateM3U";
|
||||
this.toolTip1.SetToolTip(this.chkCreateM3U, resources.GetString("chkCreateM3U.ToolTip"));
|
||||
this.chkCreateM3U.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// chkFillUpCUE
|
||||
//
|
||||
this.chkFillUpCUE.AccessibleDescription = null;
|
||||
this.chkFillUpCUE.AccessibleName = null;
|
||||
resources.ApplyResources(this.chkFillUpCUE, "chkFillUpCUE");
|
||||
this.chkFillUpCUE.BackgroundImage = null;
|
||||
this.chkFillUpCUE.Font = null;
|
||||
this.chkFillUpCUE.Name = "chkFillUpCUE";
|
||||
this.toolTip1.SetToolTip(this.chkFillUpCUE, resources.GetString("chkFillUpCUE.ToolTip"));
|
||||
this.chkFillUpCUE.UseVisualStyleBackColor = true;
|
||||
this.chkFillUpCUE.CheckedChanged += new System.EventHandler(this.chkFillUpCUE_CheckedChanged);
|
||||
//
|
||||
// chkEmbedLog
|
||||
//
|
||||
this.chkEmbedLog.AccessibleDescription = null;
|
||||
this.chkEmbedLog.AccessibleName = null;
|
||||
resources.ApplyResources(this.chkEmbedLog, "chkEmbedLog");
|
||||
this.chkEmbedLog.BackgroundImage = null;
|
||||
this.chkEmbedLog.Font = null;
|
||||
this.chkEmbedLog.Name = "chkEmbedLog";
|
||||
this.toolTip1.SetToolTip(this.chkEmbedLog, resources.GetString("chkEmbedLog.ToolTip"));
|
||||
this.chkEmbedLog.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// numericWriteOffset
|
||||
//
|
||||
this.numericWriteOffset.AccessibleDescription = null;
|
||||
this.numericWriteOffset.AccessibleName = null;
|
||||
resources.ApplyResources(this.numericWriteOffset, "numericWriteOffset");
|
||||
this.numericWriteOffset.Font = null;
|
||||
this.numericWriteOffset.Maximum = new decimal(new int[] {
|
||||
99999,
|
||||
0,
|
||||
@@ -239,66 +209,43 @@ namespace JDP {
|
||||
0,
|
||||
-2147483648});
|
||||
this.numericWriteOffset.Name = "numericWriteOffset";
|
||||
this.toolTip1.SetToolTip(this.numericWriteOffset, resources.GetString("numericWriteOffset.ToolTip"));
|
||||
//
|
||||
// chkAutoCorrectFilenames
|
||||
//
|
||||
this.chkAutoCorrectFilenames.AccessibleDescription = null;
|
||||
this.chkAutoCorrectFilenames.AccessibleName = null;
|
||||
resources.ApplyResources(this.chkAutoCorrectFilenames, "chkAutoCorrectFilenames");
|
||||
this.chkAutoCorrectFilenames.BackgroundImage = null;
|
||||
this.chkAutoCorrectFilenames.Font = null;
|
||||
this.chkAutoCorrectFilenames.Name = "chkAutoCorrectFilenames";
|
||||
this.toolTip1.SetToolTip(this.chkAutoCorrectFilenames, resources.GetString("chkAutoCorrectFilenames.ToolTip"));
|
||||
this.chkAutoCorrectFilenames.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// chkPreserveHTOA
|
||||
//
|
||||
this.chkPreserveHTOA.AccessibleDescription = null;
|
||||
this.chkPreserveHTOA.AccessibleName = null;
|
||||
resources.ApplyResources(this.chkPreserveHTOA, "chkPreserveHTOA");
|
||||
this.chkPreserveHTOA.BackgroundImage = null;
|
||||
this.chkPreserveHTOA.Font = null;
|
||||
this.chkPreserveHTOA.Name = "chkPreserveHTOA";
|
||||
this.toolTip1.SetToolTip(this.chkPreserveHTOA, resources.GetString("chkPreserveHTOA.ToolTip"));
|
||||
this.chkPreserveHTOA.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// lblWriteOffset
|
||||
//
|
||||
this.lblWriteOffset.AccessibleDescription = null;
|
||||
this.lblWriteOffset.AccessibleName = null;
|
||||
resources.ApplyResources(this.lblWriteOffset, "lblWriteOffset");
|
||||
this.lblWriteOffset.Font = null;
|
||||
this.lblWriteOffset.Name = "lblWriteOffset";
|
||||
this.toolTip1.SetToolTip(this.lblWriteOffset, resources.GetString("lblWriteOffset.ToolTip"));
|
||||
//
|
||||
// grpFLAC
|
||||
//
|
||||
this.grpFLAC.AccessibleDescription = null;
|
||||
this.grpFLAC.AccessibleName = null;
|
||||
resources.ApplyResources(this.grpFLAC, "grpFLAC");
|
||||
this.grpFLAC.BackgroundImage = null;
|
||||
this.grpFLAC.Controls.Add(this.numericFLACCompressionLevel);
|
||||
this.grpFLAC.Controls.Add(this.lblFLACCompressionLevel);
|
||||
this.grpFLAC.Controls.Add(this.chkFLACVerify);
|
||||
this.grpFLAC.Font = null;
|
||||
resources.ApplyResources(this.grpFLAC, "grpFLAC");
|
||||
this.grpFLAC.Name = "grpFLAC";
|
||||
this.grpFLAC.TabStop = false;
|
||||
this.toolTip1.SetToolTip(this.grpFLAC, resources.GetString("grpFLAC.ToolTip"));
|
||||
//
|
||||
// numericFLACCompressionLevel
|
||||
//
|
||||
this.numericFLACCompressionLevel.AccessibleDescription = null;
|
||||
this.numericFLACCompressionLevel.AccessibleName = null;
|
||||
resources.ApplyResources(this.numericFLACCompressionLevel, "numericFLACCompressionLevel");
|
||||
this.numericFLACCompressionLevel.Font = null;
|
||||
this.numericFLACCompressionLevel.Maximum = new decimal(new int[] {
|
||||
8,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.numericFLACCompressionLevel.Name = "numericFLACCompressionLevel";
|
||||
this.toolTip1.SetToolTip(this.numericFLACCompressionLevel, resources.GetString("numericFLACCompressionLevel.ToolTip"));
|
||||
this.numericFLACCompressionLevel.Value = new decimal(new int[] {
|
||||
5,
|
||||
0,
|
||||
@@ -307,43 +254,25 @@ namespace JDP {
|
||||
//
|
||||
// lblFLACCompressionLevel
|
||||
//
|
||||
this.lblFLACCompressionLevel.AccessibleDescription = null;
|
||||
this.lblFLACCompressionLevel.AccessibleName = null;
|
||||
resources.ApplyResources(this.lblFLACCompressionLevel, "lblFLACCompressionLevel");
|
||||
this.lblFLACCompressionLevel.Font = null;
|
||||
this.lblFLACCompressionLevel.Name = "lblFLACCompressionLevel";
|
||||
this.toolTip1.SetToolTip(this.lblFLACCompressionLevel, resources.GetString("lblFLACCompressionLevel.ToolTip"));
|
||||
//
|
||||
// chkFLACVerify
|
||||
//
|
||||
this.chkFLACVerify.AccessibleDescription = null;
|
||||
this.chkFLACVerify.AccessibleName = null;
|
||||
resources.ApplyResources(this.chkFLACVerify, "chkFLACVerify");
|
||||
this.chkFLACVerify.BackgroundImage = null;
|
||||
this.chkFLACVerify.Font = null;
|
||||
this.chkFLACVerify.Name = "chkFLACVerify";
|
||||
this.toolTip1.SetToolTip(this.chkFLACVerify, resources.GetString("chkFLACVerify.ToolTip"));
|
||||
this.chkFLACVerify.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// btnOK
|
||||
//
|
||||
this.btnOK.AccessibleDescription = null;
|
||||
this.btnOK.AccessibleName = null;
|
||||
resources.ApplyResources(this.btnOK, "btnOK");
|
||||
this.btnOK.BackgroundImage = null;
|
||||
this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.btnOK.Font = null;
|
||||
resources.ApplyResources(this.btnOK, "btnOK");
|
||||
this.btnOK.Name = "btnOK";
|
||||
this.toolTip1.SetToolTip(this.btnOK, resources.GetString("btnOK.ToolTip"));
|
||||
this.btnOK.UseVisualStyleBackColor = true;
|
||||
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
|
||||
//
|
||||
// grpWavPack
|
||||
//
|
||||
this.grpWavPack.AccessibleDescription = null;
|
||||
this.grpWavPack.AccessibleName = null;
|
||||
resources.ApplyResources(this.grpWavPack, "grpWavPack");
|
||||
this.grpWavPack.BackgroundImage = null;
|
||||
this.grpWavPack.Controls.Add(this.chkWVStoreMD5);
|
||||
this.grpWavPack.Controls.Add(this.numWVExtraMode);
|
||||
this.grpWavPack.Controls.Add(this.chkWVExtraMode);
|
||||
@@ -351,28 +280,19 @@ namespace JDP {
|
||||
this.grpWavPack.Controls.Add(this.rbWVHigh);
|
||||
this.grpWavPack.Controls.Add(this.rbWVNormal);
|
||||
this.grpWavPack.Controls.Add(this.rbWVFast);
|
||||
this.grpWavPack.Font = null;
|
||||
resources.ApplyResources(this.grpWavPack, "grpWavPack");
|
||||
this.grpWavPack.Name = "grpWavPack";
|
||||
this.grpWavPack.TabStop = false;
|
||||
this.toolTip1.SetToolTip(this.grpWavPack, resources.GetString("grpWavPack.ToolTip"));
|
||||
//
|
||||
// chkWVStoreMD5
|
||||
//
|
||||
this.chkWVStoreMD5.AccessibleDescription = null;
|
||||
this.chkWVStoreMD5.AccessibleName = null;
|
||||
resources.ApplyResources(this.chkWVStoreMD5, "chkWVStoreMD5");
|
||||
this.chkWVStoreMD5.BackgroundImage = null;
|
||||
this.chkWVStoreMD5.Font = null;
|
||||
this.chkWVStoreMD5.Name = "chkWVStoreMD5";
|
||||
this.toolTip1.SetToolTip(this.chkWVStoreMD5, resources.GetString("chkWVStoreMD5.ToolTip"));
|
||||
this.chkWVStoreMD5.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// numWVExtraMode
|
||||
//
|
||||
this.numWVExtraMode.AccessibleDescription = null;
|
||||
this.numWVExtraMode.AccessibleName = null;
|
||||
resources.ApplyResources(this.numWVExtraMode, "numWVExtraMode");
|
||||
this.numWVExtraMode.Font = null;
|
||||
this.numWVExtraMode.Maximum = new decimal(new int[] {
|
||||
6,
|
||||
0,
|
||||
@@ -384,7 +304,6 @@ namespace JDP {
|
||||
0,
|
||||
0});
|
||||
this.numWVExtraMode.Name = "numWVExtraMode";
|
||||
this.toolTip1.SetToolTip(this.numWVExtraMode, resources.GetString("numWVExtraMode.ToolTip"));
|
||||
this.numWVExtraMode.Value = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
@@ -393,68 +312,39 @@ namespace JDP {
|
||||
//
|
||||
// chkWVExtraMode
|
||||
//
|
||||
this.chkWVExtraMode.AccessibleDescription = null;
|
||||
this.chkWVExtraMode.AccessibleName = null;
|
||||
resources.ApplyResources(this.chkWVExtraMode, "chkWVExtraMode");
|
||||
this.chkWVExtraMode.BackgroundImage = null;
|
||||
this.chkWVExtraMode.Font = null;
|
||||
this.chkWVExtraMode.Name = "chkWVExtraMode";
|
||||
this.toolTip1.SetToolTip(this.chkWVExtraMode, resources.GetString("chkWVExtraMode.ToolTip"));
|
||||
this.chkWVExtraMode.UseVisualStyleBackColor = true;
|
||||
this.chkWVExtraMode.CheckedChanged += new System.EventHandler(this.chkWVExtraMode_CheckedChanged);
|
||||
//
|
||||
// rbWVVeryHigh
|
||||
//
|
||||
this.rbWVVeryHigh.AccessibleDescription = null;
|
||||
this.rbWVVeryHigh.AccessibleName = null;
|
||||
resources.ApplyResources(this.rbWVVeryHigh, "rbWVVeryHigh");
|
||||
this.rbWVVeryHigh.BackgroundImage = null;
|
||||
this.rbWVVeryHigh.Font = null;
|
||||
this.rbWVVeryHigh.Name = "rbWVVeryHigh";
|
||||
this.toolTip1.SetToolTip(this.rbWVVeryHigh, resources.GetString("rbWVVeryHigh.ToolTip"));
|
||||
this.rbWVVeryHigh.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// rbWVHigh
|
||||
//
|
||||
this.rbWVHigh.AccessibleDescription = null;
|
||||
this.rbWVHigh.AccessibleName = null;
|
||||
resources.ApplyResources(this.rbWVHigh, "rbWVHigh");
|
||||
this.rbWVHigh.BackgroundImage = null;
|
||||
this.rbWVHigh.Font = null;
|
||||
this.rbWVHigh.Name = "rbWVHigh";
|
||||
this.toolTip1.SetToolTip(this.rbWVHigh, resources.GetString("rbWVHigh.ToolTip"));
|
||||
this.rbWVHigh.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// rbWVNormal
|
||||
//
|
||||
this.rbWVNormal.AccessibleDescription = null;
|
||||
this.rbWVNormal.AccessibleName = null;
|
||||
resources.ApplyResources(this.rbWVNormal, "rbWVNormal");
|
||||
this.rbWVNormal.BackgroundImage = null;
|
||||
this.rbWVNormal.Checked = true;
|
||||
this.rbWVNormal.Font = null;
|
||||
this.rbWVNormal.Name = "rbWVNormal";
|
||||
this.rbWVNormal.TabStop = true;
|
||||
this.toolTip1.SetToolTip(this.rbWVNormal, resources.GetString("rbWVNormal.ToolTip"));
|
||||
this.rbWVNormal.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// rbWVFast
|
||||
//
|
||||
this.rbWVFast.AccessibleDescription = null;
|
||||
this.rbWVFast.AccessibleName = null;
|
||||
resources.ApplyResources(this.rbWVFast, "rbWVFast");
|
||||
this.rbWVFast.BackgroundImage = null;
|
||||
this.rbWVFast.Font = null;
|
||||
this.rbWVFast.Name = "rbWVFast";
|
||||
this.toolTip1.SetToolTip(this.rbWVFast, resources.GetString("rbWVFast.ToolTip"));
|
||||
this.rbWVFast.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.AccessibleDescription = null;
|
||||
this.groupBox1.AccessibleName = null;
|
||||
resources.ApplyResources(this.groupBox1, "groupBox1");
|
||||
this.groupBox1.BackgroundImage = null;
|
||||
this.groupBox1.Controls.Add(this.chkEncodeWhenZeroOffset);
|
||||
this.groupBox1.Controls.Add(this.chkArFixOffset);
|
||||
this.groupBox1.Controls.Add(this.chkWriteArLogOnConvert);
|
||||
@@ -468,89 +358,61 @@ namespace JDP {
|
||||
this.groupBox1.Controls.Add(this.numFixWhenConfidence);
|
||||
this.groupBox1.Controls.Add(this.labelFixWhenPercent);
|
||||
this.groupBox1.Controls.Add(this.numFixWhenPercent);
|
||||
this.groupBox1.Font = null;
|
||||
resources.ApplyResources(this.groupBox1, "groupBox1");
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.TabStop = false;
|
||||
this.toolTip1.SetToolTip(this.groupBox1, resources.GetString("groupBox1.ToolTip"));
|
||||
//
|
||||
// chkEncodeWhenZeroOffset
|
||||
//
|
||||
this.chkEncodeWhenZeroOffset.AccessibleDescription = null;
|
||||
this.chkEncodeWhenZeroOffset.AccessibleName = null;
|
||||
resources.ApplyResources(this.chkEncodeWhenZeroOffset, "chkEncodeWhenZeroOffset");
|
||||
this.chkEncodeWhenZeroOffset.BackgroundImage = null;
|
||||
this.chkEncodeWhenZeroOffset.Font = null;
|
||||
this.chkEncodeWhenZeroOffset.Name = "chkEncodeWhenZeroOffset";
|
||||
this.toolTip1.SetToolTip(this.chkEncodeWhenZeroOffset, resources.GetString("chkEncodeWhenZeroOffset.ToolTip"));
|
||||
this.chkEncodeWhenZeroOffset.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// chkArFixOffset
|
||||
//
|
||||
this.chkArFixOffset.AccessibleDescription = null;
|
||||
this.chkArFixOffset.AccessibleName = null;
|
||||
resources.ApplyResources(this.chkArFixOffset, "chkArFixOffset");
|
||||
this.chkArFixOffset.BackgroundImage = null;
|
||||
this.chkArFixOffset.Checked = true;
|
||||
this.chkArFixOffset.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.chkArFixOffset.Font = null;
|
||||
this.chkArFixOffset.Name = "chkArFixOffset";
|
||||
this.toolTip1.SetToolTip(this.chkArFixOffset, resources.GetString("chkArFixOffset.ToolTip"));
|
||||
this.chkArFixOffset.UseVisualStyleBackColor = true;
|
||||
this.chkArFixOffset.CheckedChanged += new System.EventHandler(this.chkArFixOffset_CheckedChanged);
|
||||
//
|
||||
// chkWriteArLogOnConvert
|
||||
//
|
||||
this.chkWriteArLogOnConvert.AccessibleDescription = null;
|
||||
this.chkWriteArLogOnConvert.AccessibleName = null;
|
||||
resources.ApplyResources(this.chkWriteArLogOnConvert, "chkWriteArLogOnConvert");
|
||||
this.chkWriteArLogOnConvert.BackgroundImage = null;
|
||||
this.chkWriteArLogOnConvert.Checked = true;
|
||||
this.chkWriteArLogOnConvert.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.chkWriteArLogOnConvert.Font = null;
|
||||
this.chkWriteArLogOnConvert.Name = "chkWriteArLogOnConvert";
|
||||
this.toolTip1.SetToolTip(this.chkWriteArLogOnConvert, resources.GetString("chkWriteArLogOnConvert.ToolTip"));
|
||||
this.chkWriteArLogOnConvert.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// chkWriteArTagsOnConvert
|
||||
//
|
||||
this.chkWriteArTagsOnConvert.AccessibleDescription = null;
|
||||
this.chkWriteArTagsOnConvert.AccessibleName = null;
|
||||
resources.ApplyResources(this.chkWriteArTagsOnConvert, "chkWriteArTagsOnConvert");
|
||||
this.chkWriteArTagsOnConvert.BackgroundImage = null;
|
||||
this.chkWriteArTagsOnConvert.Checked = true;
|
||||
this.chkWriteArTagsOnConvert.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.chkWriteArTagsOnConvert.Font = null;
|
||||
this.chkWriteArTagsOnConvert.Name = "chkWriteArTagsOnConvert";
|
||||
this.toolTip1.SetToolTip(this.chkWriteArTagsOnConvert, resources.GetString("chkWriteArTagsOnConvert.ToolTip"));
|
||||
this.chkWriteArTagsOnConvert.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// labelEncodeWhenPercent
|
||||
//
|
||||
this.labelEncodeWhenPercent.AccessibleDescription = null;
|
||||
this.labelEncodeWhenPercent.AccessibleName = null;
|
||||
resources.ApplyResources(this.labelEncodeWhenPercent, "labelEncodeWhenPercent");
|
||||
this.labelEncodeWhenPercent.Font = null;
|
||||
this.labelEncodeWhenPercent.Name = "labelEncodeWhenPercent";
|
||||
this.toolTip1.SetToolTip(this.labelEncodeWhenPercent, resources.GetString("labelEncodeWhenPercent.ToolTip"));
|
||||
//
|
||||
// numEncodeWhenPercent
|
||||
//
|
||||
this.numEncodeWhenPercent.AccessibleDescription = null;
|
||||
this.numEncodeWhenPercent.AccessibleName = null;
|
||||
resources.ApplyResources(this.numEncodeWhenPercent, "numEncodeWhenPercent");
|
||||
this.numEncodeWhenPercent.Font = null;
|
||||
this.numEncodeWhenPercent.Increment = new decimal(new int[] {
|
||||
5,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
resources.ApplyResources(this.numEncodeWhenPercent, "numEncodeWhenPercent");
|
||||
this.numEncodeWhenPercent.Minimum = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.numEncodeWhenPercent.Name = "numEncodeWhenPercent";
|
||||
this.toolTip1.SetToolTip(this.numEncodeWhenPercent, resources.GetString("numEncodeWhenPercent.ToolTip"));
|
||||
this.numEncodeWhenPercent.Value = new decimal(new int[] {
|
||||
100,
|
||||
0,
|
||||
@@ -559,26 +421,18 @@ namespace JDP {
|
||||
//
|
||||
// labelEncodeWhenConfidence
|
||||
//
|
||||
this.labelEncodeWhenConfidence.AccessibleDescription = null;
|
||||
this.labelEncodeWhenConfidence.AccessibleName = null;
|
||||
resources.ApplyResources(this.labelEncodeWhenConfidence, "labelEncodeWhenConfidence");
|
||||
this.labelEncodeWhenConfidence.Font = null;
|
||||
this.labelEncodeWhenConfidence.Name = "labelEncodeWhenConfidence";
|
||||
this.toolTip1.SetToolTip(this.labelEncodeWhenConfidence, resources.GetString("labelEncodeWhenConfidence.ToolTip"));
|
||||
//
|
||||
// numEncodeWhenConfidence
|
||||
//
|
||||
this.numEncodeWhenConfidence.AccessibleDescription = null;
|
||||
this.numEncodeWhenConfidence.AccessibleName = null;
|
||||
resources.ApplyResources(this.numEncodeWhenConfidence, "numEncodeWhenConfidence");
|
||||
this.numEncodeWhenConfidence.Font = null;
|
||||
this.numEncodeWhenConfidence.Minimum = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.numEncodeWhenConfidence.Name = "numEncodeWhenConfidence";
|
||||
this.toolTip1.SetToolTip(this.numEncodeWhenConfidence, resources.GetString("numEncodeWhenConfidence.ToolTip"));
|
||||
this.numEncodeWhenConfidence.Value = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
@@ -587,40 +441,27 @@ namespace JDP {
|
||||
//
|
||||
// chkArNoUnverifiedAudio
|
||||
//
|
||||
this.chkArNoUnverifiedAudio.AccessibleDescription = null;
|
||||
this.chkArNoUnverifiedAudio.AccessibleName = null;
|
||||
resources.ApplyResources(this.chkArNoUnverifiedAudio, "chkArNoUnverifiedAudio");
|
||||
this.chkArNoUnverifiedAudio.BackgroundImage = null;
|
||||
this.chkArNoUnverifiedAudio.Checked = true;
|
||||
this.chkArNoUnverifiedAudio.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.chkArNoUnverifiedAudio.Font = null;
|
||||
this.chkArNoUnverifiedAudio.Name = "chkArNoUnverifiedAudio";
|
||||
this.toolTip1.SetToolTip(this.chkArNoUnverifiedAudio, resources.GetString("chkArNoUnverifiedAudio.ToolTip"));
|
||||
this.chkArNoUnverifiedAudio.UseVisualStyleBackColor = true;
|
||||
this.chkArNoUnverifiedAudio.CheckedChanged += new System.EventHandler(this.chkArNoUnverifiedAudio_CheckedChanged);
|
||||
//
|
||||
// labelFixWhenConfidence
|
||||
//
|
||||
this.labelFixWhenConfidence.AccessibleDescription = null;
|
||||
this.labelFixWhenConfidence.AccessibleName = null;
|
||||
resources.ApplyResources(this.labelFixWhenConfidence, "labelFixWhenConfidence");
|
||||
this.labelFixWhenConfidence.Font = null;
|
||||
this.labelFixWhenConfidence.Name = "labelFixWhenConfidence";
|
||||
this.toolTip1.SetToolTip(this.labelFixWhenConfidence, resources.GetString("labelFixWhenConfidence.ToolTip"));
|
||||
//
|
||||
// numFixWhenConfidence
|
||||
//
|
||||
this.numFixWhenConfidence.AccessibleDescription = null;
|
||||
this.numFixWhenConfidence.AccessibleName = null;
|
||||
resources.ApplyResources(this.numFixWhenConfidence, "numFixWhenConfidence");
|
||||
this.numFixWhenConfidence.Font = null;
|
||||
this.numFixWhenConfidence.Minimum = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.numFixWhenConfidence.Name = "numFixWhenConfidence";
|
||||
this.toolTip1.SetToolTip(this.numFixWhenConfidence, resources.GetString("numFixWhenConfidence.ToolTip"));
|
||||
this.numFixWhenConfidence.Value = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
@@ -629,31 +470,23 @@ namespace JDP {
|
||||
//
|
||||
// labelFixWhenPercent
|
||||
//
|
||||
this.labelFixWhenPercent.AccessibleDescription = null;
|
||||
this.labelFixWhenPercent.AccessibleName = null;
|
||||
resources.ApplyResources(this.labelFixWhenPercent, "labelFixWhenPercent");
|
||||
this.labelFixWhenPercent.Font = null;
|
||||
this.labelFixWhenPercent.Name = "labelFixWhenPercent";
|
||||
this.toolTip1.SetToolTip(this.labelFixWhenPercent, resources.GetString("labelFixWhenPercent.ToolTip"));
|
||||
//
|
||||
// numFixWhenPercent
|
||||
//
|
||||
this.numFixWhenPercent.AccessibleDescription = null;
|
||||
this.numFixWhenPercent.AccessibleName = null;
|
||||
resources.ApplyResources(this.numFixWhenPercent, "numFixWhenPercent");
|
||||
this.numFixWhenPercent.Font = null;
|
||||
this.numFixWhenPercent.Increment = new decimal(new int[] {
|
||||
5,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
resources.ApplyResources(this.numFixWhenPercent, "numFixWhenPercent");
|
||||
this.numFixWhenPercent.Minimum = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.numFixWhenPercent.Name = "numFixWhenPercent";
|
||||
this.toolTip1.SetToolTip(this.numFixWhenPercent, resources.GetString("numFixWhenPercent.ToolTip"));
|
||||
this.numFixWhenPercent.Value = new decimal(new int[] {
|
||||
51,
|
||||
0,
|
||||
@@ -668,11 +501,7 @@ namespace JDP {
|
||||
//
|
||||
// chkFilenamesANSISafe
|
||||
//
|
||||
this.chkFilenamesANSISafe.AccessibleDescription = null;
|
||||
this.chkFilenamesANSISafe.AccessibleName = null;
|
||||
resources.ApplyResources(this.chkFilenamesANSISafe, "chkFilenamesANSISafe");
|
||||
this.chkFilenamesANSISafe.BackgroundImage = null;
|
||||
this.chkFilenamesANSISafe.Font = null;
|
||||
this.chkFilenamesANSISafe.Name = "chkFilenamesANSISafe";
|
||||
this.toolTip1.SetToolTip(this.chkFilenamesANSISafe, resources.GetString("chkFilenamesANSISafe.ToolTip"));
|
||||
this.chkFilenamesANSISafe.UseVisualStyleBackColor = true;
|
||||
@@ -680,24 +509,16 @@ namespace JDP {
|
||||
//
|
||||
// chkWriteARTagsOnVerify
|
||||
//
|
||||
this.chkWriteARTagsOnVerify.AccessibleDescription = null;
|
||||
this.chkWriteARTagsOnVerify.AccessibleName = null;
|
||||
resources.ApplyResources(this.chkWriteARTagsOnVerify, "chkWriteARTagsOnVerify");
|
||||
this.chkWriteARTagsOnVerify.BackgroundImage = null;
|
||||
this.chkWriteARTagsOnVerify.Checked = true;
|
||||
this.chkWriteARTagsOnVerify.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.chkWriteARTagsOnVerify.Font = null;
|
||||
this.chkWriteARTagsOnVerify.Name = "chkWriteARTagsOnVerify";
|
||||
this.toolTip1.SetToolTip(this.chkWriteARTagsOnVerify, resources.GetString("chkWriteARTagsOnVerify.ToolTip"));
|
||||
this.chkWriteARTagsOnVerify.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// chkHDCDDecode
|
||||
//
|
||||
this.chkHDCDDecode.AccessibleDescription = null;
|
||||
this.chkHDCDDecode.AccessibleName = null;
|
||||
resources.ApplyResources(this.chkHDCDDecode, "chkHDCDDecode");
|
||||
this.chkHDCDDecode.BackgroundImage = null;
|
||||
this.chkHDCDDecode.Font = null;
|
||||
this.chkHDCDDecode.Name = "chkHDCDDecode";
|
||||
this.toolTip1.SetToolTip(this.chkHDCDDecode, resources.GetString("chkHDCDDecode.ToolTip"));
|
||||
this.chkHDCDDecode.UseVisualStyleBackColor = true;
|
||||
@@ -705,43 +526,27 @@ namespace JDP {
|
||||
//
|
||||
// chkHDCDStopLooking
|
||||
//
|
||||
this.chkHDCDStopLooking.AccessibleDescription = null;
|
||||
this.chkHDCDStopLooking.AccessibleName = null;
|
||||
resources.ApplyResources(this.chkHDCDStopLooking, "chkHDCDStopLooking");
|
||||
this.chkHDCDStopLooking.BackgroundImage = null;
|
||||
this.chkHDCDStopLooking.Font = null;
|
||||
this.chkHDCDStopLooking.Name = "chkHDCDStopLooking";
|
||||
this.toolTip1.SetToolTip(this.chkHDCDStopLooking, resources.GetString("chkHDCDStopLooking.ToolTip"));
|
||||
this.chkHDCDStopLooking.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// chkHDCD24bit
|
||||
//
|
||||
this.chkHDCD24bit.AccessibleDescription = null;
|
||||
this.chkHDCD24bit.AccessibleName = null;
|
||||
resources.ApplyResources(this.chkHDCD24bit, "chkHDCD24bit");
|
||||
this.chkHDCD24bit.BackgroundImage = null;
|
||||
this.chkHDCD24bit.Font = null;
|
||||
this.chkHDCD24bit.Name = "chkHDCD24bit";
|
||||
this.toolTip1.SetToolTip(this.chkHDCD24bit, resources.GetString("chkHDCD24bit.ToolTip"));
|
||||
this.chkHDCD24bit.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// chkHDCDLW16
|
||||
//
|
||||
this.chkHDCDLW16.AccessibleDescription = null;
|
||||
this.chkHDCDLW16.AccessibleName = null;
|
||||
resources.ApplyResources(this.chkHDCDLW16, "chkHDCDLW16");
|
||||
this.chkHDCDLW16.BackgroundImage = null;
|
||||
this.chkHDCDLW16.Font = null;
|
||||
this.chkHDCDLW16.Name = "chkHDCDLW16";
|
||||
this.toolTip1.SetToolTip(this.chkHDCDLW16, resources.GetString("chkHDCDLW16.ToolTip"));
|
||||
this.chkHDCDLW16.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// grpAudioFilenames
|
||||
//
|
||||
this.grpAudioFilenames.AccessibleDescription = null;
|
||||
this.grpAudioFilenames.AccessibleName = null;
|
||||
resources.ApplyResources(this.grpAudioFilenames, "grpAudioFilenames");
|
||||
this.grpAudioFilenames.BackgroundImage = null;
|
||||
this.grpAudioFilenames.Controls.Add(this.chkFilenamesANSISafe);
|
||||
this.grpAudioFilenames.Controls.Add(this.chkKeepOriginalFilenames);
|
||||
this.grpAudioFilenames.Controls.Add(this.txtSpecialExceptions);
|
||||
@@ -751,285 +556,177 @@ namespace JDP {
|
||||
this.grpAudioFilenames.Controls.Add(this.lblTrackFilenameFormat);
|
||||
this.grpAudioFilenames.Controls.Add(this.lblSingleFilenameFormat);
|
||||
this.grpAudioFilenames.Controls.Add(this.txtSingleFilenameFormat);
|
||||
this.grpAudioFilenames.Font = null;
|
||||
resources.ApplyResources(this.grpAudioFilenames, "grpAudioFilenames");
|
||||
this.grpAudioFilenames.Name = "grpAudioFilenames";
|
||||
this.grpAudioFilenames.TabStop = false;
|
||||
this.toolTip1.SetToolTip(this.grpAudioFilenames, resources.GetString("grpAudioFilenames.ToolTip"));
|
||||
//
|
||||
// chkKeepOriginalFilenames
|
||||
//
|
||||
this.chkKeepOriginalFilenames.AccessibleDescription = null;
|
||||
this.chkKeepOriginalFilenames.AccessibleName = null;
|
||||
resources.ApplyResources(this.chkKeepOriginalFilenames, "chkKeepOriginalFilenames");
|
||||
this.chkKeepOriginalFilenames.BackgroundImage = null;
|
||||
this.chkKeepOriginalFilenames.Checked = true;
|
||||
this.chkKeepOriginalFilenames.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.chkKeepOriginalFilenames.Font = null;
|
||||
this.chkKeepOriginalFilenames.Name = "chkKeepOriginalFilenames";
|
||||
this.toolTip1.SetToolTip(this.chkKeepOriginalFilenames, resources.GetString("chkKeepOriginalFilenames.ToolTip"));
|
||||
this.chkKeepOriginalFilenames.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// txtSpecialExceptions
|
||||
//
|
||||
this.txtSpecialExceptions.AccessibleDescription = null;
|
||||
this.txtSpecialExceptions.AccessibleName = null;
|
||||
resources.ApplyResources(this.txtSpecialExceptions, "txtSpecialExceptions");
|
||||
this.txtSpecialExceptions.BackgroundImage = null;
|
||||
this.txtSpecialExceptions.Font = null;
|
||||
this.txtSpecialExceptions.Name = "txtSpecialExceptions";
|
||||
this.toolTip1.SetToolTip(this.txtSpecialExceptions, resources.GetString("txtSpecialExceptions.ToolTip"));
|
||||
//
|
||||
// chkRemoveSpecial
|
||||
//
|
||||
this.chkRemoveSpecial.AccessibleDescription = null;
|
||||
this.chkRemoveSpecial.AccessibleName = null;
|
||||
resources.ApplyResources(this.chkRemoveSpecial, "chkRemoveSpecial");
|
||||
this.chkRemoveSpecial.BackgroundImage = null;
|
||||
this.chkRemoveSpecial.Checked = true;
|
||||
this.chkRemoveSpecial.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.chkRemoveSpecial.Font = null;
|
||||
this.chkRemoveSpecial.Name = "chkRemoveSpecial";
|
||||
this.toolTip1.SetToolTip(this.chkRemoveSpecial, resources.GetString("chkRemoveSpecial.ToolTip"));
|
||||
this.chkRemoveSpecial.UseVisualStyleBackColor = true;
|
||||
this.chkRemoveSpecial.CheckedChanged += new System.EventHandler(this.chkRemoveSpecial_CheckedChanged);
|
||||
//
|
||||
// chkReplaceSpaces
|
||||
//
|
||||
this.chkReplaceSpaces.AccessibleDescription = null;
|
||||
this.chkReplaceSpaces.AccessibleName = null;
|
||||
resources.ApplyResources(this.chkReplaceSpaces, "chkReplaceSpaces");
|
||||
this.chkReplaceSpaces.BackgroundImage = null;
|
||||
this.chkReplaceSpaces.Checked = true;
|
||||
this.chkReplaceSpaces.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.chkReplaceSpaces.Font = null;
|
||||
this.chkReplaceSpaces.Name = "chkReplaceSpaces";
|
||||
this.toolTip1.SetToolTip(this.chkReplaceSpaces, resources.GetString("chkReplaceSpaces.ToolTip"));
|
||||
this.chkReplaceSpaces.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// txtTrackFilenameFormat
|
||||
//
|
||||
this.txtTrackFilenameFormat.AccessibleDescription = null;
|
||||
this.txtTrackFilenameFormat.AccessibleName = null;
|
||||
resources.ApplyResources(this.txtTrackFilenameFormat, "txtTrackFilenameFormat");
|
||||
this.txtTrackFilenameFormat.BackgroundImage = null;
|
||||
this.txtTrackFilenameFormat.Font = null;
|
||||
this.txtTrackFilenameFormat.Name = "txtTrackFilenameFormat";
|
||||
this.toolTip1.SetToolTip(this.txtTrackFilenameFormat, resources.GetString("txtTrackFilenameFormat.ToolTip"));
|
||||
//
|
||||
// lblTrackFilenameFormat
|
||||
//
|
||||
this.lblTrackFilenameFormat.AccessibleDescription = null;
|
||||
this.lblTrackFilenameFormat.AccessibleName = null;
|
||||
resources.ApplyResources(this.lblTrackFilenameFormat, "lblTrackFilenameFormat");
|
||||
this.lblTrackFilenameFormat.Font = null;
|
||||
this.lblTrackFilenameFormat.Name = "lblTrackFilenameFormat";
|
||||
this.toolTip1.SetToolTip(this.lblTrackFilenameFormat, resources.GetString("lblTrackFilenameFormat.ToolTip"));
|
||||
//
|
||||
// lblSingleFilenameFormat
|
||||
//
|
||||
this.lblSingleFilenameFormat.AccessibleDescription = null;
|
||||
this.lblSingleFilenameFormat.AccessibleName = null;
|
||||
resources.ApplyResources(this.lblSingleFilenameFormat, "lblSingleFilenameFormat");
|
||||
this.lblSingleFilenameFormat.Font = null;
|
||||
this.lblSingleFilenameFormat.Name = "lblSingleFilenameFormat";
|
||||
this.toolTip1.SetToolTip(this.lblSingleFilenameFormat, resources.GetString("lblSingleFilenameFormat.ToolTip"));
|
||||
//
|
||||
// txtSingleFilenameFormat
|
||||
//
|
||||
this.txtSingleFilenameFormat.AccessibleDescription = null;
|
||||
this.txtSingleFilenameFormat.AccessibleName = null;
|
||||
resources.ApplyResources(this.txtSingleFilenameFormat, "txtSingleFilenameFormat");
|
||||
this.txtSingleFilenameFormat.BackgroundImage = null;
|
||||
this.txtSingleFilenameFormat.Font = null;
|
||||
this.txtSingleFilenameFormat.Name = "txtSingleFilenameFormat";
|
||||
this.toolTip1.SetToolTip(this.txtSingleFilenameFormat, resources.GetString("txtSingleFilenameFormat.ToolTip"));
|
||||
//
|
||||
// groupBox2
|
||||
//
|
||||
this.groupBox2.AccessibleDescription = null;
|
||||
this.groupBox2.AccessibleName = null;
|
||||
resources.ApplyResources(this.groupBox2, "groupBox2");
|
||||
this.groupBox2.BackgroundImage = null;
|
||||
this.groupBox2.Controls.Add(this.rbAPEinsane);
|
||||
this.groupBox2.Controls.Add(this.rbAPEextrahigh);
|
||||
this.groupBox2.Controls.Add(this.rbAPEhigh);
|
||||
this.groupBox2.Controls.Add(this.rbAPEnormal);
|
||||
this.groupBox2.Controls.Add(this.rbAPEfast);
|
||||
this.groupBox2.Font = null;
|
||||
resources.ApplyResources(this.groupBox2, "groupBox2");
|
||||
this.groupBox2.Name = "groupBox2";
|
||||
this.groupBox2.TabStop = false;
|
||||
this.toolTip1.SetToolTip(this.groupBox2, resources.GetString("groupBox2.ToolTip"));
|
||||
//
|
||||
// rbAPEinsane
|
||||
//
|
||||
this.rbAPEinsane.AccessibleDescription = null;
|
||||
this.rbAPEinsane.AccessibleName = null;
|
||||
resources.ApplyResources(this.rbAPEinsane, "rbAPEinsane");
|
||||
this.rbAPEinsane.BackgroundImage = null;
|
||||
this.rbAPEinsane.Font = null;
|
||||
this.rbAPEinsane.Name = "rbAPEinsane";
|
||||
this.rbAPEinsane.TabStop = true;
|
||||
this.toolTip1.SetToolTip(this.rbAPEinsane, resources.GetString("rbAPEinsane.ToolTip"));
|
||||
this.rbAPEinsane.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// rbAPEextrahigh
|
||||
//
|
||||
this.rbAPEextrahigh.AccessibleDescription = null;
|
||||
this.rbAPEextrahigh.AccessibleName = null;
|
||||
resources.ApplyResources(this.rbAPEextrahigh, "rbAPEextrahigh");
|
||||
this.rbAPEextrahigh.BackgroundImage = null;
|
||||
this.rbAPEextrahigh.Font = null;
|
||||
this.rbAPEextrahigh.Name = "rbAPEextrahigh";
|
||||
this.rbAPEextrahigh.TabStop = true;
|
||||
this.toolTip1.SetToolTip(this.rbAPEextrahigh, resources.GetString("rbAPEextrahigh.ToolTip"));
|
||||
this.rbAPEextrahigh.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// rbAPEhigh
|
||||
//
|
||||
this.rbAPEhigh.AccessibleDescription = null;
|
||||
this.rbAPEhigh.AccessibleName = null;
|
||||
resources.ApplyResources(this.rbAPEhigh, "rbAPEhigh");
|
||||
this.rbAPEhigh.BackgroundImage = null;
|
||||
this.rbAPEhigh.Font = null;
|
||||
this.rbAPEhigh.Name = "rbAPEhigh";
|
||||
this.rbAPEhigh.TabStop = true;
|
||||
this.toolTip1.SetToolTip(this.rbAPEhigh, resources.GetString("rbAPEhigh.ToolTip"));
|
||||
this.rbAPEhigh.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// rbAPEnormal
|
||||
//
|
||||
this.rbAPEnormal.AccessibleDescription = null;
|
||||
this.rbAPEnormal.AccessibleName = null;
|
||||
resources.ApplyResources(this.rbAPEnormal, "rbAPEnormal");
|
||||
this.rbAPEnormal.BackgroundImage = null;
|
||||
this.rbAPEnormal.Font = null;
|
||||
this.rbAPEnormal.Name = "rbAPEnormal";
|
||||
this.rbAPEnormal.TabStop = true;
|
||||
this.toolTip1.SetToolTip(this.rbAPEnormal, resources.GetString("rbAPEnormal.ToolTip"));
|
||||
this.rbAPEnormal.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// rbAPEfast
|
||||
//
|
||||
this.rbAPEfast.AccessibleDescription = null;
|
||||
this.rbAPEfast.AccessibleName = null;
|
||||
resources.ApplyResources(this.rbAPEfast, "rbAPEfast");
|
||||
this.rbAPEfast.BackgroundImage = null;
|
||||
this.rbAPEfast.Font = null;
|
||||
this.rbAPEfast.Name = "rbAPEfast";
|
||||
this.rbAPEfast.TabStop = true;
|
||||
this.toolTip1.SetToolTip(this.rbAPEfast, resources.GetString("rbAPEfast.ToolTip"));
|
||||
this.rbAPEfast.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// tabControl1
|
||||
//
|
||||
this.tabControl1.AccessibleDescription = null;
|
||||
this.tabControl1.AccessibleName = null;
|
||||
resources.ApplyResources(this.tabControl1, "tabControl1");
|
||||
this.tabControl1.BackgroundImage = null;
|
||||
this.tabControl1.Controls.Add(this.tabPage1);
|
||||
this.tabControl1.Controls.Add(this.tabPage2);
|
||||
this.tabControl1.Controls.Add(this.tabPage3);
|
||||
this.tabControl1.Controls.Add(this.tabPage4);
|
||||
this.tabControl1.Font = null;
|
||||
this.tabControl1.HotTrack = true;
|
||||
this.tabControl1.Multiline = true;
|
||||
this.tabControl1.Name = "tabControl1";
|
||||
this.tabControl1.SelectedIndex = 0;
|
||||
this.toolTip1.SetToolTip(this.tabControl1, resources.GetString("tabControl1.ToolTip"));
|
||||
//
|
||||
// tabPage1
|
||||
//
|
||||
this.tabPage1.AccessibleDescription = null;
|
||||
this.tabPage1.AccessibleName = null;
|
||||
resources.ApplyResources(this.tabPage1, "tabPage1");
|
||||
this.tabPage1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.tabPage1.BackgroundImage = null;
|
||||
this.tabPage1.Controls.Add(this.grpGeneral);
|
||||
this.tabPage1.Controls.Add(this.grpAudioFilenames);
|
||||
this.tabPage1.Font = null;
|
||||
resources.ApplyResources(this.tabPage1, "tabPage1");
|
||||
this.tabPage1.Name = "tabPage1";
|
||||
this.toolTip1.SetToolTip(this.tabPage1, resources.GetString("tabPage1.ToolTip"));
|
||||
//
|
||||
// tabPage2
|
||||
//
|
||||
this.tabPage2.AccessibleDescription = null;
|
||||
this.tabPage2.AccessibleName = null;
|
||||
resources.ApplyResources(this.tabPage2, "tabPage2");
|
||||
this.tabPage2.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.tabPage2.BackgroundImage = null;
|
||||
this.tabPage2.Controls.Add(this.groupBox3);
|
||||
this.tabPage2.Controls.Add(this.groupBox1);
|
||||
this.tabPage2.Font = null;
|
||||
resources.ApplyResources(this.tabPage2, "tabPage2");
|
||||
this.tabPage2.Name = "tabPage2";
|
||||
this.toolTip1.SetToolTip(this.tabPage2, resources.GetString("tabPage2.ToolTip"));
|
||||
//
|
||||
// groupBox3
|
||||
//
|
||||
this.groupBox3.AccessibleDescription = null;
|
||||
this.groupBox3.AccessibleName = null;
|
||||
resources.ApplyResources(this.groupBox3, "groupBox3");
|
||||
this.groupBox3.BackgroundImage = null;
|
||||
this.groupBox3.Controls.Add(this.chkWriteARLogOnVerify);
|
||||
this.groupBox3.Controls.Add(this.chkWriteARTagsOnVerify);
|
||||
this.groupBox3.Font = null;
|
||||
resources.ApplyResources(this.groupBox3, "groupBox3");
|
||||
this.groupBox3.Name = "groupBox3";
|
||||
this.groupBox3.TabStop = false;
|
||||
this.toolTip1.SetToolTip(this.groupBox3, resources.GetString("groupBox3.ToolTip"));
|
||||
//
|
||||
// chkWriteARLogOnVerify
|
||||
//
|
||||
this.chkWriteARLogOnVerify.AccessibleDescription = null;
|
||||
this.chkWriteARLogOnVerify.AccessibleName = null;
|
||||
resources.ApplyResources(this.chkWriteARLogOnVerify, "chkWriteARLogOnVerify");
|
||||
this.chkWriteARLogOnVerify.BackgroundImage = null;
|
||||
this.chkWriteARLogOnVerify.Checked = true;
|
||||
this.chkWriteARLogOnVerify.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.chkWriteARLogOnVerify.Font = null;
|
||||
this.chkWriteARLogOnVerify.Name = "chkWriteARLogOnVerify";
|
||||
this.toolTip1.SetToolTip(this.chkWriteARLogOnVerify, resources.GetString("chkWriteARLogOnVerify.ToolTip"));
|
||||
this.chkWriteARLogOnVerify.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// tabPage3
|
||||
//
|
||||
this.tabPage3.AccessibleDescription = null;
|
||||
this.tabPage3.AccessibleName = null;
|
||||
resources.ApplyResources(this.tabPage3, "tabPage3");
|
||||
this.tabPage3.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.tabPage3.BackgroundImage = null;
|
||||
this.tabPage3.Controls.Add(this.groupBox4);
|
||||
this.tabPage3.Controls.Add(this.grpWavPack);
|
||||
this.tabPage3.Controls.Add(this.groupBox2);
|
||||
this.tabPage3.Controls.Add(this.grpFLAC);
|
||||
this.tabPage3.Font = null;
|
||||
resources.ApplyResources(this.tabPage3, "tabPage3");
|
||||
this.tabPage3.Name = "tabPage3";
|
||||
this.toolTip1.SetToolTip(this.tabPage3, resources.GetString("tabPage3.ToolTip"));
|
||||
//
|
||||
// groupBox4
|
||||
//
|
||||
this.groupBox4.AccessibleDescription = null;
|
||||
this.groupBox4.AccessibleName = null;
|
||||
resources.ApplyResources(this.groupBox4, "groupBox4");
|
||||
this.groupBox4.BackgroundImage = null;
|
||||
this.groupBox4.Controls.Add(this.numericLossyWAVQuality);
|
||||
this.groupBox4.Controls.Add(this.label1);
|
||||
this.groupBox4.Font = null;
|
||||
resources.ApplyResources(this.groupBox4, "groupBox4");
|
||||
this.groupBox4.Name = "groupBox4";
|
||||
this.groupBox4.TabStop = false;
|
||||
this.toolTip1.SetToolTip(this.groupBox4, resources.GetString("groupBox4.ToolTip"));
|
||||
//
|
||||
// numericLossyWAVQuality
|
||||
//
|
||||
this.numericLossyWAVQuality.AccessibleDescription = null;
|
||||
this.numericLossyWAVQuality.AccessibleName = null;
|
||||
resources.ApplyResources(this.numericLossyWAVQuality, "numericLossyWAVQuality");
|
||||
this.numericLossyWAVQuality.Font = null;
|
||||
this.numericLossyWAVQuality.Maximum = new decimal(new int[] {
|
||||
10,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.numericLossyWAVQuality.Name = "numericLossyWAVQuality";
|
||||
this.toolTip1.SetToolTip(this.numericLossyWAVQuality, resources.GetString("numericLossyWAVQuality.ToolTip"));
|
||||
this.numericLossyWAVQuality.Value = new decimal(new int[] {
|
||||
5,
|
||||
0,
|
||||
@@ -1038,74 +735,56 @@ namespace JDP {
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AccessibleDescription = null;
|
||||
this.label1.AccessibleName = null;
|
||||
resources.ApplyResources(this.label1, "label1");
|
||||
this.label1.Font = null;
|
||||
this.label1.Name = "label1";
|
||||
this.toolTip1.SetToolTip(this.label1, resources.GetString("label1.ToolTip"));
|
||||
//
|
||||
// tabPage4
|
||||
//
|
||||
this.tabPage4.AccessibleDescription = null;
|
||||
this.tabPage4.AccessibleName = null;
|
||||
resources.ApplyResources(this.tabPage4, "tabPage4");
|
||||
this.tabPage4.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.tabPage4.BackgroundImage = null;
|
||||
this.tabPage4.Controls.Add(this.grpHDCD);
|
||||
this.tabPage4.Controls.Add(this.chkHDCDDetect);
|
||||
this.tabPage4.Font = null;
|
||||
resources.ApplyResources(this.tabPage4, "tabPage4");
|
||||
this.tabPage4.Name = "tabPage4";
|
||||
this.toolTip1.SetToolTip(this.tabPage4, resources.GetString("tabPage4.ToolTip"));
|
||||
//
|
||||
// grpHDCD
|
||||
//
|
||||
this.grpHDCD.AccessibleDescription = null;
|
||||
this.grpHDCD.AccessibleName = null;
|
||||
resources.ApplyResources(this.grpHDCD, "grpHDCD");
|
||||
this.grpHDCD.BackgroundImage = null;
|
||||
this.grpHDCD.Controls.Add(this.chkHDCD24bit);
|
||||
this.grpHDCD.Controls.Add(this.chkHDCDLW16);
|
||||
this.grpHDCD.Controls.Add(this.chkHDCDStopLooking);
|
||||
this.grpHDCD.Controls.Add(this.chkHDCDDecode);
|
||||
this.grpHDCD.Font = null;
|
||||
resources.ApplyResources(this.grpHDCD, "grpHDCD");
|
||||
this.grpHDCD.Name = "grpHDCD";
|
||||
this.grpHDCD.TabStop = false;
|
||||
this.toolTip1.SetToolTip(this.grpHDCD, resources.GetString("grpHDCD.ToolTip"));
|
||||
//
|
||||
// chkHDCDDetect
|
||||
//
|
||||
this.chkHDCDDetect.AccessibleDescription = null;
|
||||
this.chkHDCDDetect.AccessibleName = null;
|
||||
resources.ApplyResources(this.chkHDCDDetect, "chkHDCDDetect");
|
||||
this.chkHDCDDetect.BackgroundImage = null;
|
||||
this.chkHDCDDetect.Font = null;
|
||||
this.chkHDCDDetect.Name = "chkHDCDDetect";
|
||||
this.toolTip1.SetToolTip(this.chkHDCDDetect, resources.GetString("chkHDCDDetect.ToolTip"));
|
||||
this.chkHDCDDetect.UseVisualStyleBackColor = true;
|
||||
this.chkHDCDDetect.CheckedChanged += new System.EventHandler(this.chkHDCDDetect_CheckedChanged);
|
||||
//
|
||||
// chkOverwriteTags
|
||||
//
|
||||
resources.ApplyResources(this.chkOverwriteTags, "chkOverwriteTags");
|
||||
this.chkOverwriteTags.Name = "chkOverwriteTags";
|
||||
this.chkOverwriteTags.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// frmSettings
|
||||
//
|
||||
this.AcceptButton = this.btnOK;
|
||||
this.AccessibleDescription = null;
|
||||
this.AccessibleName = null;
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackgroundImage = null;
|
||||
this.CancelButton = btnCancel;
|
||||
this.ControlBox = false;
|
||||
this.Controls.Add(this.tabControl1);
|
||||
this.Controls.Add(btnCancel);
|
||||
this.Controls.Add(this.btnOK);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.Icon = null;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "frmSettings";
|
||||
this.ShowIcon = false;
|
||||
this.ShowInTaskbar = false;
|
||||
this.toolTip1.SetToolTip(this, resources.GetString("$this.ToolTip"));
|
||||
this.Load += new System.EventHandler(this.frmSettings_Load);
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.frmSettings_FormClosing);
|
||||
this.grpGeneral.ResumeLayout(false);
|
||||
@@ -1218,6 +897,8 @@ namespace JDP {
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.CheckBox chkHDCDLW16;
|
||||
private System.Windows.Forms.CheckBox chkHDCD24bit;
|
||||
private System.Windows.Forms.CheckBox chkExtractLog;
|
||||
private System.Windows.Forms.CheckBox chkOverwriteTags;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -56,6 +56,7 @@ namespace JDP {
|
||||
chkArNoUnverifiedAudio.Checked = _config.noUnverifiedOutput;
|
||||
chkArFixOffset.Checked = _config.fixOffset;
|
||||
chkEmbedLog.Checked = _config.embedLog;
|
||||
chkExtractLog.Checked = _config.extractLog;
|
||||
chkFillUpCUE.Checked = _config.fillUpCUE;
|
||||
chkFilenamesANSISafe.Checked = _config.filenamesANSISafe;
|
||||
chkHDCDDetect.Checked = _config.detectHDCD;
|
||||
@@ -67,6 +68,7 @@ namespace JDP {
|
||||
numericLossyWAVQuality.Value = _config.lossyWAVQuality;
|
||||
chkHDCDLW16.Checked = _config.decodeHDCDtoLW16;
|
||||
chkHDCD24bit.Checked = _config.decodeHDCDto24bit;
|
||||
chkOverwriteTags.Checked = _config.overwriteCUEData;
|
||||
|
||||
EnableDisable();
|
||||
}
|
||||
@@ -133,6 +135,7 @@ namespace JDP {
|
||||
_config.noUnverifiedOutput = chkArNoUnverifiedAudio.Checked;
|
||||
_config.fixOffset = chkArFixOffset.Checked;
|
||||
_config.embedLog = chkEmbedLog.Checked;
|
||||
_config.extractLog = chkExtractLog.Checked;
|
||||
_config.fillUpCUE = chkFillUpCUE.Checked;
|
||||
_config.filenamesANSISafe = chkFilenamesANSISafe.Checked;
|
||||
_config.detectHDCD = chkHDCDDetect.Checked;
|
||||
@@ -143,6 +146,7 @@ namespace JDP {
|
||||
_config.truncate4608ExtraSamples = chkTruncateExtra4206Samples.Checked;
|
||||
_config.decodeHDCDtoLW16 = chkHDCDLW16.Checked;
|
||||
_config.decodeHDCDto24bit = chkHDCD24bit.Checked;
|
||||
_config.overwriteCUEData = chkOverwriteTags.Checked;
|
||||
}
|
||||
|
||||
private void EnableDisable()
|
||||
@@ -168,6 +172,8 @@ namespace JDP {
|
||||
txtSpecialExceptions.Enabled = chkRemoveSpecial.Checked;
|
||||
|
||||
numWVExtraMode.Enabled = chkWVExtraMode.Checked;
|
||||
|
||||
chkOverwriteTags.Enabled = chkFillUpCUE.Checked;
|
||||
}
|
||||
|
||||
private void chkArFixOffset_CheckedChanged(object sender, EventArgs e)
|
||||
@@ -199,5 +205,10 @@ namespace JDP {
|
||||
{
|
||||
EnableDisable();
|
||||
}
|
||||
|
||||
private void chkFillUpCUE_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
EnableDisable();
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -1,82 +1,82 @@
|
||||
// MusicBrainzObject.cs
|
||||
//
|
||||
// Copyright (c) 2008 Scott Peterson <lunchtimemama@gmail.com>
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Xml;
|
||||
|
||||
namespace MusicBrainz
|
||||
{
|
||||
public abstract class MusicBrainzObject
|
||||
{
|
||||
|
||||
#region Private Fields
|
||||
|
||||
static DateTime last_accessed;
|
||||
static readonly TimeSpan min_interval = new TimeSpan (0, 0, 1); // 1 second
|
||||
static readonly object server_mutex = new object ();
|
||||
static readonly string [] rels_params = new string [] {
|
||||
"artist-rels",
|
||||
"release-rels",
|
||||
"track-rels",
|
||||
"label-rels",
|
||||
"url-rels"
|
||||
};
|
||||
|
||||
bool all_data_loaded;
|
||||
bool all_rels_loaded;
|
||||
|
||||
string id;
|
||||
byte score;
|
||||
ReadOnlyCollection<Relation<Artist>> artist_rels;
|
||||
ReadOnlyCollection<Relation<Release>> release_rels;
|
||||
ReadOnlyCollection<Relation<Track>> track_rels;
|
||||
ReadOnlyCollection<Relation<Label>> label_rels;
|
||||
ReadOnlyCollection<UrlRelation> url_rels;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
internal MusicBrainzObject (string id, string parameters)
|
||||
{
|
||||
all_data_loaded = true;
|
||||
CreateFromId (id, parameters ?? CreateInc ());
|
||||
}
|
||||
|
||||
internal MusicBrainzObject (XmlReader reader, bool all_rels_loaded)
|
||||
{
|
||||
this.all_rels_loaded = all_rels_loaded;
|
||||
CreateFromXml (reader);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
// MusicBrainzObject.cs
|
||||
//
|
||||
// Copyright (c) 2008 Scott Peterson <lunchtimemama@gmail.com>
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Xml;
|
||||
|
||||
namespace MusicBrainz
|
||||
{
|
||||
public abstract class MusicBrainzObject
|
||||
{
|
||||
|
||||
#region Private Fields
|
||||
|
||||
static DateTime last_accessed;
|
||||
static readonly TimeSpan min_interval = new TimeSpan (1000000); // 0.1 second
|
||||
static readonly object server_mutex = new object ();
|
||||
static readonly string [] rels_params = new string [] {
|
||||
"artist-rels",
|
||||
"release-rels",
|
||||
"track-rels",
|
||||
"label-rels",
|
||||
"url-rels"
|
||||
};
|
||||
|
||||
bool all_data_loaded;
|
||||
bool all_rels_loaded;
|
||||
|
||||
string id;
|
||||
byte score;
|
||||
ReadOnlyCollection<Relation<Artist>> artist_rels;
|
||||
ReadOnlyCollection<Relation<Release>> release_rels;
|
||||
ReadOnlyCollection<Relation<Track>> track_rels;
|
||||
ReadOnlyCollection<Relation<Label>> label_rels;
|
||||
ReadOnlyCollection<UrlRelation> url_rels;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
internal MusicBrainzObject (string id, string parameters)
|
||||
{
|
||||
all_data_loaded = true;
|
||||
CreateFromId (id, parameters ?? CreateInc ());
|
||||
}
|
||||
|
||||
internal MusicBrainzObject (XmlReader reader, bool all_rels_loaded)
|
||||
{
|
||||
this.all_rels_loaded = all_rels_loaded;
|
||||
CreateFromXml (reader);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Methods
|
||||
|
||||
string CreateInc ()
|
||||
@@ -84,51 +84,51 @@ namespace MusicBrainz
|
||||
StringBuilder builder = new StringBuilder ();
|
||||
CreateIncCore (builder);
|
||||
return builder.ToString ();
|
||||
}
|
||||
|
||||
void CreateFromId (string id, string parameters)
|
||||
{
|
||||
XmlProcessingClosure (
|
||||
CreateUrl (UrlExtension, id, parameters),
|
||||
delegate (XmlReader reader) {
|
||||
reader.ReadToFollowing ("metadata");
|
||||
reader.Read ();
|
||||
CreateFromXml (reader.ReadSubtree ());
|
||||
reader.Close ();
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
void CreateFromXml (XmlReader reader)
|
||||
{
|
||||
reader.Read ();
|
||||
id = reader ["id"];
|
||||
byte.TryParse (reader ["ext:score"], out score);
|
||||
ProcessAttributes (reader);
|
||||
while (reader.Read () && reader.NodeType != XmlNodeType.EndElement) {
|
||||
if (reader.Name == "relation-list") {
|
||||
all_rels_loaded = true;
|
||||
switch (reader ["target-type"]) {
|
||||
case "Artist":
|
||||
artist_rels = CreateRelation<Artist> (reader.ReadSubtree ());
|
||||
break;
|
||||
case "Release":
|
||||
release_rels = CreateRelation<Release> (reader.ReadSubtree ());
|
||||
break;
|
||||
case "Track":
|
||||
track_rels = CreateRelation<Track> (reader.ReadSubtree ());
|
||||
break;
|
||||
case "Label":
|
||||
label_rels = CreateRelation<Label> (reader.ReadSubtree ());
|
||||
break;
|
||||
}
|
||||
|
||||
void CreateFromId (string id, string parameters)
|
||||
{
|
||||
XmlProcessingClosure (
|
||||
CreateUrl (UrlExtension, id, parameters),
|
||||
delegate (XmlReader reader) {
|
||||
reader.ReadToFollowing ("metadata");
|
||||
reader.Read ();
|
||||
CreateFromXml (reader.ReadSubtree ());
|
||||
reader.Close ();
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
void CreateFromXml (XmlReader reader)
|
||||
{
|
||||
reader.Read ();
|
||||
id = reader ["id"];
|
||||
byte.TryParse (reader ["ext:score"], out score);
|
||||
ProcessAttributes (reader);
|
||||
while (reader.Read () && reader.NodeType != XmlNodeType.EndElement) {
|
||||
if (reader.Name == "relation-list") {
|
||||
all_rels_loaded = true;
|
||||
switch (reader ["target-type"]) {
|
||||
case "Artist":
|
||||
artist_rels = CreateRelation<Artist> (reader.ReadSubtree ());
|
||||
break;
|
||||
case "Release":
|
||||
release_rels = CreateRelation<Release> (reader.ReadSubtree ());
|
||||
break;
|
||||
case "Track":
|
||||
track_rels = CreateRelation<Track> (reader.ReadSubtree ());
|
||||
break;
|
||||
case "Label":
|
||||
label_rels = CreateRelation<Label> (reader.ReadSubtree ());
|
||||
break;
|
||||
case "Url":
|
||||
url_rels = CreateUrlRelation (reader.ReadSubtree ());
|
||||
break;
|
||||
}
|
||||
} else
|
||||
ProcessXml (reader.ReadSubtree ());
|
||||
}
|
||||
reader.Close ();
|
||||
url_rels = CreateUrlRelation (reader.ReadSubtree ());
|
||||
break;
|
||||
}
|
||||
} else
|
||||
ProcessXml (reader.ReadSubtree ());
|
||||
}
|
||||
reader.Close ();
|
||||
}
|
||||
|
||||
void ProcessXml (XmlReader reader)
|
||||
@@ -136,92 +136,92 @@ namespace MusicBrainz
|
||||
reader.Read ();
|
||||
ProcessXmlCore (reader);
|
||||
reader.Close ();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Protected
|
||||
|
||||
internal bool AllDataLoaded {
|
||||
get { return all_data_loaded; }
|
||||
}
|
||||
|
||||
internal bool AllRelsLoaded {
|
||||
get { return all_rels_loaded; }
|
||||
set { all_rels_loaded = value; }
|
||||
}
|
||||
|
||||
internal virtual void CreateIncCore (StringBuilder builder)
|
||||
{
|
||||
if (!all_rels_loaded)
|
||||
AppendIncParameters (builder, rels_params);
|
||||
}
|
||||
|
||||
internal static void AppendIncParameters (StringBuilder builder, string parameter)
|
||||
{
|
||||
builder.Append (builder.Length == 0 ? "&inc=" : "+");
|
||||
builder.Append (parameter);
|
||||
}
|
||||
|
||||
internal static void AppendIncParameters (StringBuilder builder, string parameter1, string parameter2)
|
||||
{
|
||||
builder.Append (builder.Length == 0 ? "&inc=" : "+");
|
||||
builder.Append (parameter1);
|
||||
builder.Append ('+');
|
||||
builder.Append (parameter2);
|
||||
}
|
||||
|
||||
internal static void AppendIncParameters (StringBuilder builder, string [] parameters)
|
||||
{
|
||||
foreach (string parameter in parameters)
|
||||
AppendIncParameters (builder, parameter);
|
||||
}
|
||||
|
||||
internal void LoadMissingData ()
|
||||
{
|
||||
if (!all_data_loaded) {
|
||||
LoadMissingDataCore ();
|
||||
all_data_loaded = true;
|
||||
}
|
||||
}
|
||||
|
||||
internal void LoadMissingDataCore (MusicBrainzObject obj)
|
||||
{
|
||||
if (!all_rels_loaded) {
|
||||
artist_rels = obj.GetArtistRelations ();
|
||||
release_rels = obj.GetReleaseRelations ();
|
||||
track_rels = obj.GetTrackRelations ();
|
||||
label_rels = obj.GetLabelRelations ();
|
||||
url_rels = obj.GetUrlRelations ();
|
||||
}
|
||||
}
|
||||
|
||||
internal T GetPropertyOrNull<T> (ref T field_reference) where T : class
|
||||
{
|
||||
if (field_reference == null) LoadMissingData ();
|
||||
return field_reference;
|
||||
}
|
||||
|
||||
internal T GetPropertyOrDefault<T> (ref T? field_reference) where T : struct
|
||||
{
|
||||
return GetPropertyOrDefault (ref field_reference, default (T));
|
||||
}
|
||||
|
||||
internal T GetPropertyOrDefault<T> (ref T? field_reference, T default_value) where T : struct
|
||||
{
|
||||
if (field_reference == null) LoadMissingData ();
|
||||
return field_reference ?? default_value;
|
||||
}
|
||||
|
||||
internal ReadOnlyCollection<T> GetPropertyOrNew<T> (ref ReadOnlyCollection<T> field_reference)
|
||||
{
|
||||
return GetPropertyOrNew (ref field_reference, true);
|
||||
}
|
||||
|
||||
internal ReadOnlyCollection<T> GetPropertyOrNew<T> (ref ReadOnlyCollection<T> field_reference, bool condition)
|
||||
{
|
||||
if (field_reference == null && condition) LoadMissingData ();
|
||||
return field_reference ?? new ReadOnlyCollection<T> (new T [0]);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Protected
|
||||
|
||||
internal bool AllDataLoaded {
|
||||
get { return all_data_loaded; }
|
||||
}
|
||||
|
||||
internal bool AllRelsLoaded {
|
||||
get { return all_rels_loaded; }
|
||||
set { all_rels_loaded = value; }
|
||||
}
|
||||
|
||||
internal virtual void CreateIncCore (StringBuilder builder)
|
||||
{
|
||||
if (!all_rels_loaded)
|
||||
AppendIncParameters (builder, rels_params);
|
||||
}
|
||||
|
||||
internal static void AppendIncParameters (StringBuilder builder, string parameter)
|
||||
{
|
||||
builder.Append (builder.Length == 0 ? "&inc=" : "+");
|
||||
builder.Append (parameter);
|
||||
}
|
||||
|
||||
internal static void AppendIncParameters (StringBuilder builder, string parameter1, string parameter2)
|
||||
{
|
||||
builder.Append (builder.Length == 0 ? "&inc=" : "+");
|
||||
builder.Append (parameter1);
|
||||
builder.Append ('+');
|
||||
builder.Append (parameter2);
|
||||
}
|
||||
|
||||
internal static void AppendIncParameters (StringBuilder builder, string [] parameters)
|
||||
{
|
||||
foreach (string parameter in parameters)
|
||||
AppendIncParameters (builder, parameter);
|
||||
}
|
||||
|
||||
internal void LoadMissingData ()
|
||||
{
|
||||
if (!all_data_loaded) {
|
||||
LoadMissingDataCore ();
|
||||
all_data_loaded = true;
|
||||
}
|
||||
}
|
||||
|
||||
internal void LoadMissingDataCore (MusicBrainzObject obj)
|
||||
{
|
||||
if (!all_rels_loaded) {
|
||||
artist_rels = obj.GetArtistRelations ();
|
||||
release_rels = obj.GetReleaseRelations ();
|
||||
track_rels = obj.GetTrackRelations ();
|
||||
label_rels = obj.GetLabelRelations ();
|
||||
url_rels = obj.GetUrlRelations ();
|
||||
}
|
||||
}
|
||||
|
||||
internal T GetPropertyOrNull<T> (ref T field_reference) where T : class
|
||||
{
|
||||
if (field_reference == null) LoadMissingData ();
|
||||
return field_reference;
|
||||
}
|
||||
|
||||
internal T GetPropertyOrDefault<T> (ref T? field_reference) where T : struct
|
||||
{
|
||||
return GetPropertyOrDefault (ref field_reference, default (T));
|
||||
}
|
||||
|
||||
internal T GetPropertyOrDefault<T> (ref T? field_reference, T default_value) where T : struct
|
||||
{
|
||||
if (field_reference == null) LoadMissingData ();
|
||||
return field_reference ?? default_value;
|
||||
}
|
||||
|
||||
internal ReadOnlyCollection<T> GetPropertyOrNew<T> (ref ReadOnlyCollection<T> field_reference)
|
||||
{
|
||||
return GetPropertyOrNew (ref field_reference, true);
|
||||
}
|
||||
|
||||
internal ReadOnlyCollection<T> GetPropertyOrNew<T> (ref ReadOnlyCollection<T> field_reference, bool condition)
|
||||
{
|
||||
if (field_reference == null && condition) LoadMissingData ();
|
||||
return field_reference ?? new ReadOnlyCollection<T> (new T [0]);
|
||||
}
|
||||
|
||||
internal virtual void ProcessXmlCore (XmlReader reader)
|
||||
@@ -231,101 +231,101 @@ namespace MusicBrainz
|
||||
|
||||
internal virtual void ProcessAttributes (XmlReader reader)
|
||||
{
|
||||
}
|
||||
|
||||
internal abstract void LoadMissingDataCore ();
|
||||
internal abstract string UrlExtension { get; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public
|
||||
|
||||
public virtual string Id {
|
||||
get { return id; }
|
||||
}
|
||||
|
||||
public virtual byte Score {
|
||||
get { return score; }
|
||||
}
|
||||
|
||||
public virtual ReadOnlyCollection<Relation<Artist>> GetArtistRelations ()
|
||||
{
|
||||
return GetPropertyOrNew (ref artist_rels, !all_rels_loaded);
|
||||
}
|
||||
|
||||
public virtual ReadOnlyCollection<Relation<Release>> GetReleaseRelations ()
|
||||
{
|
||||
return GetPropertyOrNew (ref release_rels, !all_rels_loaded);
|
||||
}
|
||||
|
||||
public virtual ReadOnlyCollection<Relation<Track>> GetTrackRelations ()
|
||||
{
|
||||
return GetPropertyOrNew (ref track_rels, !all_rels_loaded);
|
||||
}
|
||||
|
||||
public virtual ReadOnlyCollection<Relation<Label>> GetLabelRelations ()
|
||||
{
|
||||
return GetPropertyOrNew (ref label_rels, !all_rels_loaded);
|
||||
}
|
||||
|
||||
public virtual ReadOnlyCollection<UrlRelation> GetUrlRelations ()
|
||||
{
|
||||
return GetPropertyOrNew (ref url_rels, !all_rels_loaded);
|
||||
}
|
||||
|
||||
public override bool Equals (object obj)
|
||||
{
|
||||
return this == obj as MusicBrainzObject;
|
||||
}
|
||||
|
||||
public static bool operator ==(MusicBrainzObject obj1, MusicBrainzObject obj2)
|
||||
}
|
||||
|
||||
internal abstract void LoadMissingDataCore ();
|
||||
internal abstract string UrlExtension { get; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public
|
||||
|
||||
public virtual string Id {
|
||||
get { return id; }
|
||||
}
|
||||
|
||||
public virtual byte Score {
|
||||
get { return score; }
|
||||
}
|
||||
|
||||
public virtual ReadOnlyCollection<Relation<Artist>> GetArtistRelations ()
|
||||
{
|
||||
return GetPropertyOrNew (ref artist_rels, !all_rels_loaded);
|
||||
}
|
||||
|
||||
public virtual ReadOnlyCollection<Relation<Release>> GetReleaseRelations ()
|
||||
{
|
||||
return GetPropertyOrNew (ref release_rels, !all_rels_loaded);
|
||||
}
|
||||
|
||||
public virtual ReadOnlyCollection<Relation<Track>> GetTrackRelations ()
|
||||
{
|
||||
return GetPropertyOrNew (ref track_rels, !all_rels_loaded);
|
||||
}
|
||||
|
||||
public virtual ReadOnlyCollection<Relation<Label>> GetLabelRelations ()
|
||||
{
|
||||
return GetPropertyOrNew (ref label_rels, !all_rels_loaded);
|
||||
}
|
||||
|
||||
public virtual ReadOnlyCollection<UrlRelation> GetUrlRelations ()
|
||||
{
|
||||
return GetPropertyOrNew (ref url_rels, !all_rels_loaded);
|
||||
}
|
||||
|
||||
public override bool Equals (object obj)
|
||||
{
|
||||
return this == obj as MusicBrainzObject;
|
||||
}
|
||||
|
||||
public static bool operator ==(MusicBrainzObject obj1, MusicBrainzObject obj2)
|
||||
{
|
||||
if (Object.ReferenceEquals (obj1, null)) {
|
||||
return Object.ReferenceEquals (obj2, null);
|
||||
}
|
||||
return !Object.ReferenceEquals (obj2, null) && obj1.GetType () == obj2.GetType () && obj1.Id == obj2.Id;
|
||||
}
|
||||
|
||||
public static bool operator !=(MusicBrainzObject obj1, MusicBrainzObject obj2)
|
||||
{
|
||||
return !(obj1 == obj2);
|
||||
}
|
||||
|
||||
public override int GetHashCode ()
|
||||
{
|
||||
return (GetType ().Name + Id).GetHashCode ();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Static
|
||||
|
||||
static ReadOnlyCollection<Relation<T>> CreateRelation<T> (XmlReader reader) where T : MusicBrainzObject
|
||||
{
|
||||
List<Relation<T>> relations = new List<Relation<T>> ();
|
||||
while (reader.ReadToFollowing ("relation")) {
|
||||
string type = reader ["type"];
|
||||
RelationDirection direction = RelationDirection.Forward;
|
||||
string direction_string = reader ["direction"];
|
||||
if (direction_string != null && direction_string == "backward")
|
||||
direction = RelationDirection.Backward;
|
||||
string begin = reader ["begin"];
|
||||
string end = reader ["end"];
|
||||
string attributes_string = reader ["attributes"];
|
||||
string [] attributes = attributes_string == null
|
||||
? null : attributes_string.Split (' ');
|
||||
|
||||
reader.Read ();
|
||||
relations.Add (new Relation<T> (
|
||||
type,
|
||||
ConstructMusicBrainzObjectFromXml<T> (reader.ReadSubtree ()),
|
||||
direction,
|
||||
begin,
|
||||
end,
|
||||
attributes));
|
||||
}
|
||||
reader.Close ();
|
||||
return relations.AsReadOnly ();
|
||||
}
|
||||
return !Object.ReferenceEquals (obj2, null) && obj1.GetType () == obj2.GetType () && obj1.Id == obj2.Id;
|
||||
}
|
||||
|
||||
public static bool operator !=(MusicBrainzObject obj1, MusicBrainzObject obj2)
|
||||
{
|
||||
return !(obj1 == obj2);
|
||||
}
|
||||
|
||||
public override int GetHashCode ()
|
||||
{
|
||||
return (GetType ().Name + Id).GetHashCode ();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Static
|
||||
|
||||
static ReadOnlyCollection<Relation<T>> CreateRelation<T> (XmlReader reader) where T : MusicBrainzObject
|
||||
{
|
||||
List<Relation<T>> relations = new List<Relation<T>> ();
|
||||
while (reader.ReadToFollowing ("relation")) {
|
||||
string type = reader ["type"];
|
||||
RelationDirection direction = RelationDirection.Forward;
|
||||
string direction_string = reader ["direction"];
|
||||
if (direction_string != null && direction_string == "backward")
|
||||
direction = RelationDirection.Backward;
|
||||
string begin = reader ["begin"];
|
||||
string end = reader ["end"];
|
||||
string attributes_string = reader ["attributes"];
|
||||
string [] attributes = attributes_string == null
|
||||
? null : attributes_string.Split (' ');
|
||||
|
||||
reader.Read ();
|
||||
relations.Add (new Relation<T> (
|
||||
type,
|
||||
ConstructMusicBrainzObjectFromXml<T> (reader.ReadSubtree ()),
|
||||
direction,
|
||||
begin,
|
||||
end,
|
||||
attributes));
|
||||
}
|
||||
reader.Close ();
|
||||
return relations.AsReadOnly ();
|
||||
}
|
||||
|
||||
static ReadOnlyCollection<UrlRelation> CreateUrlRelation (XmlReader reader)
|
||||
@@ -348,138 +348,141 @@ namespace MusicBrainz
|
||||
attributes));
|
||||
}
|
||||
return url_rels.AsReadOnly ();
|
||||
}
|
||||
|
||||
static string CreateUrl (string url_extension, int limit, int offset, string parameters)
|
||||
{
|
||||
StringBuilder builder = new StringBuilder ();
|
||||
if (limit != 25) {
|
||||
builder.Append ("&limit=");
|
||||
builder.Append (limit);
|
||||
}
|
||||
if (offset != 0) {
|
||||
builder.Append ("&offset=");
|
||||
builder.Append (offset);
|
||||
}
|
||||
builder.Append (parameters);
|
||||
return CreateUrl (url_extension, string.Empty, builder.ToString ());
|
||||
}
|
||||
|
||||
static string CreateUrl (string url_extension, string id, string parameters)
|
||||
{
|
||||
StringBuilder builder = new StringBuilder (
|
||||
MusicBrainzService.ServiceUrl.AbsoluteUri.Length + id.Length + parameters.Length + 9);
|
||||
builder.Append (MusicBrainzService.ServiceUrl.AbsoluteUri);
|
||||
builder.Append (url_extension);
|
||||
builder.Append ('/');
|
||||
builder.Append (id);
|
||||
builder.Append ("?type=xml");
|
||||
builder.Append (parameters);
|
||||
return builder.ToString ();
|
||||
}
|
||||
|
||||
static void XmlProcessingClosure (string url, XmlProcessingDelegate code)
|
||||
{
|
||||
Monitor.Enter (server_mutex);
|
||||
|
||||
// Don't access the MB server twice within a second
|
||||
TimeSpan time = DateTime.Now - last_accessed;
|
||||
if (min_interval > time)
|
||||
Thread.Sleep ((min_interval - time).Milliseconds);
|
||||
}
|
||||
|
||||
static string CreateUrl (string url_extension, int limit, int offset, string parameters)
|
||||
{
|
||||
StringBuilder builder = new StringBuilder ();
|
||||
if (limit != 25) {
|
||||
builder.Append ("&limit=");
|
||||
builder.Append (limit);
|
||||
}
|
||||
if (offset != 0) {
|
||||
builder.Append ("&offset=");
|
||||
builder.Append (offset);
|
||||
}
|
||||
builder.Append (parameters);
|
||||
return CreateUrl (url_extension, string.Empty, builder.ToString ());
|
||||
}
|
||||
|
||||
static string CreateUrl (string url_extension, string id, string parameters)
|
||||
{
|
||||
StringBuilder builder = new StringBuilder (
|
||||
MusicBrainzService.ServiceUrl.AbsoluteUri.Length + id.Length + parameters.Length + 9);
|
||||
builder.Append (MusicBrainzService.ServiceUrl.AbsoluteUri);
|
||||
builder.Append (url_extension);
|
||||
builder.Append ('/');
|
||||
builder.Append (id);
|
||||
builder.Append ("?type=xml");
|
||||
builder.Append (parameters);
|
||||
return builder.ToString ();
|
||||
}
|
||||
|
||||
static void XmlProcessingClosure (string url, XmlProcessingDelegate code)
|
||||
{
|
||||
Monitor.Enter (server_mutex);
|
||||
|
||||
// Don't access the MB server twice within a second
|
||||
if (last_accessed != null)
|
||||
{
|
||||
TimeSpan time = DateTime.Now - last_accessed;
|
||||
if (min_interval > time)
|
||||
Thread.Sleep((min_interval - time).Milliseconds);
|
||||
}
|
||||
|
||||
WebRequest request = WebRequest.Create (url);
|
||||
bool cache_implemented = false;
|
||||
|
||||
try {
|
||||
request.CachePolicy = MusicBrainzService.CachePolicy;
|
||||
cache_implemented = true;
|
||||
} catch (NotImplementedException) {}
|
||||
|
||||
HttpWebResponse response = null;
|
||||
|
||||
try {
|
||||
response = (HttpWebResponse)request.GetResponse ();
|
||||
} catch (WebException e) {
|
||||
response = (HttpWebResponse)e.Response;
|
||||
}
|
||||
|
||||
if (response == null) throw new MusicBrainzNotFoundException ();
|
||||
|
||||
switch (response.StatusCode) {
|
||||
case HttpStatusCode.BadRequest:
|
||||
Monitor.Exit (server_mutex);
|
||||
throw new MusicBrainzInvalidParameterException ();
|
||||
case HttpStatusCode.Unauthorized:
|
||||
Monitor.Exit (server_mutex);
|
||||
throw new MusicBrainzUnauthorizedException ();
|
||||
case HttpStatusCode.NotFound:
|
||||
Monitor.Exit (server_mutex);
|
||||
throw new MusicBrainzNotFoundException ();
|
||||
}
|
||||
|
||||
WebRequest request = WebRequest.Create (url);
|
||||
bool cache_implemented = false;
|
||||
|
||||
try {
|
||||
request.CachePolicy = MusicBrainzService.CachePolicy;
|
||||
cache_implemented = true;
|
||||
} catch (NotImplementedException) {}
|
||||
|
||||
HttpWebResponse response = null;
|
||||
|
||||
try {
|
||||
response = (HttpWebResponse)request.GetResponse ();
|
||||
} catch (WebException e) {
|
||||
response = (HttpWebResponse)e.Response;
|
||||
}
|
||||
|
||||
if (response == null) throw new MusicBrainzNotFoundException ();
|
||||
|
||||
switch (response.StatusCode) {
|
||||
case HttpStatusCode.BadRequest:
|
||||
Monitor.Exit (server_mutex);
|
||||
throw new MusicBrainzInvalidParameterException ();
|
||||
case HttpStatusCode.Unauthorized:
|
||||
Monitor.Exit (server_mutex);
|
||||
throw new MusicBrainzUnauthorizedException ();
|
||||
case HttpStatusCode.NotFound:
|
||||
Monitor.Exit (server_mutex);
|
||||
throw new MusicBrainzNotFoundException ();
|
||||
}
|
||||
|
||||
bool from_cache = cache_implemented && response.IsFromCache;
|
||||
|
||||
if (from_cache) Monitor.Exit (server_mutex);
|
||||
|
||||
MusicBrainzService.OnXmlRequest (url, from_cache);
|
||||
|
||||
// Should we read the stream into a memory stream and run the XmlReader off of that?
|
||||
code (new XmlTextReader (response.GetResponseStream ()));
|
||||
response.Close ();
|
||||
|
||||
if (!from_cache) {
|
||||
last_accessed = DateTime.Now;
|
||||
Monitor.Exit (server_mutex);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Query
|
||||
|
||||
internal static string CreateLuceneParameter (string query)
|
||||
{
|
||||
StringBuilder builder = new StringBuilder (query.Length + 7);
|
||||
builder.Append ("&query=");
|
||||
Utils.PercentEncode (builder, query);
|
||||
return builder.ToString ();
|
||||
}
|
||||
|
||||
internal static List<T> Query<T> (string url_extension,
|
||||
int limit, int offset,
|
||||
string parameters,
|
||||
out int? count) where T : MusicBrainzObject
|
||||
{
|
||||
int count_value = 0;
|
||||
List<T> results = new List<T> ();
|
||||
XmlProcessingClosure (
|
||||
CreateUrl (url_extension, limit, offset, parameters),
|
||||
delegate (XmlReader reader) {
|
||||
reader.ReadToFollowing ("metadata");
|
||||
reader.Read ();
|
||||
int.TryParse (reader ["count"], out count_value);
|
||||
while (reader.Read () && reader.NodeType == XmlNodeType.Element)
|
||||
results.Add (ConstructMusicBrainzObjectFromXml<T> (reader.ReadSubtree ()));
|
||||
reader.Close ();
|
||||
}
|
||||
);
|
||||
count = count_value == 0 ? results.Count : count_value;
|
||||
return results;
|
||||
}
|
||||
|
||||
static T ConstructMusicBrainzObjectFromXml<T> (XmlReader reader) where T : MusicBrainzObject
|
||||
{
|
||||
ConstructorInfo constructor = typeof (T).GetConstructor (
|
||||
BindingFlags.NonPublic | BindingFlags.Instance,
|
||||
null,
|
||||
new Type [] { typeof (XmlReader) },
|
||||
null);
|
||||
return (T)constructor.Invoke (new object [] {reader});
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
internal delegate void XmlProcessingDelegate (XmlReader reader);
|
||||
}
|
||||
if (from_cache) Monitor.Exit (server_mutex);
|
||||
|
||||
MusicBrainzService.OnXmlRequest (url, from_cache);
|
||||
|
||||
// Should we read the stream into a memory stream and run the XmlReader off of that?
|
||||
code (new XmlTextReader (response.GetResponseStream ()));
|
||||
response.Close ();
|
||||
|
||||
if (!from_cache) {
|
||||
last_accessed = DateTime.Now;
|
||||
Monitor.Exit (server_mutex);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Query
|
||||
|
||||
internal static string CreateLuceneParameter (string query)
|
||||
{
|
||||
StringBuilder builder = new StringBuilder (query.Length + 7);
|
||||
builder.Append ("&query=");
|
||||
Utils.PercentEncode (builder, query);
|
||||
return builder.ToString ();
|
||||
}
|
||||
|
||||
internal static List<T> Query<T> (string url_extension,
|
||||
int limit, int offset,
|
||||
string parameters,
|
||||
out int? count) where T : MusicBrainzObject
|
||||
{
|
||||
int count_value = 0;
|
||||
List<T> results = new List<T> ();
|
||||
XmlProcessingClosure (
|
||||
CreateUrl (url_extension, limit, offset, parameters),
|
||||
delegate (XmlReader reader) {
|
||||
reader.ReadToFollowing ("metadata");
|
||||
reader.Read ();
|
||||
int.TryParse (reader ["count"], out count_value);
|
||||
while (reader.Read () && reader.NodeType == XmlNodeType.Element)
|
||||
results.Add (ConstructMusicBrainzObjectFromXml<T> (reader.ReadSubtree ()));
|
||||
reader.Close ();
|
||||
}
|
||||
);
|
||||
count = count_value == 0 ? results.Count : count_value;
|
||||
return results;
|
||||
}
|
||||
|
||||
static T ConstructMusicBrainzObjectFromXml<T> (XmlReader reader) where T : MusicBrainzObject
|
||||
{
|
||||
ConstructorInfo constructor = typeof (T).GetConstructor (
|
||||
BindingFlags.NonPublic | BindingFlags.Instance,
|
||||
null,
|
||||
new Type [] { typeof (XmlReader) },
|
||||
null);
|
||||
return (T)constructor.Invoke (new object [] {reader});
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
internal delegate void XmlProcessingDelegate (XmlReader reader);
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;FLAC__NO_DLL;DEBUG"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
@@ -65,7 +65,6 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="..\..\..\..\obj\release\lib\ogg_static.lib"
|
||||
LinkIncremental="2"
|
||||
IgnoreDefaultLibraryNames="uuid.lib"
|
||||
GenerateDebugInformation="true"
|
||||
@@ -97,6 +96,85 @@
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|x64"
|
||||
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..\..\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;FLAC__NO_DLL;DEBUG"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="0"
|
||||
DisableSpecificWarnings="4267;4996"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="2"
|
||||
IgnoreDefaultLibraryNames="uuid.lib"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="..\..\..\..\obj\release\bin"
|
||||
@@ -181,86 +259,6 @@
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|x64"
|
||||
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..\..\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;FLAC__NO_DLL;DEBUG"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="0"
|
||||
DisableSpecificWarnings="4267;4996"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="..\..\..\..\obj\release\lib\ogg_static.lib"
|
||||
LinkIncremental="2"
|
||||
IgnoreDefaultLibraryNames="uuid.lib"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|x64"
|
||||
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
@@ -291,7 +289,7 @@
|
||||
WholeProgramOptimization="true"
|
||||
AdditionalIncludeDirectories="..\..\..\..\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;FLAC__NO_DLL"
|
||||
RuntimeLibrary="0"
|
||||
RuntimeLibrary="2"
|
||||
BufferSecurityCheck="false"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
@@ -311,7 +309,6 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="..\..\..\..\obj\release\lib\ogg_static.lib"
|
||||
LinkIncremental="1"
|
||||
IgnoreDefaultLibraryNames="uuid.lib"
|
||||
GenerateDebugInformation="true"
|
||||
|
||||
@@ -88,7 +88,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
ok &= FLAC__stream_encoder_set_verify(encoder, true);
|
||||
ok &= FLAC__stream_encoder_set_compression_level(encoder, 5);
|
||||
ok &= FLAC__stream_encoder_set_compression_level(encoder, 7);
|
||||
ok &= FLAC__stream_encoder_set_channels(encoder, channels);
|
||||
ok &= FLAC__stream_encoder_set_bits_per_sample(encoder, bps);
|
||||
ok &= FLAC__stream_encoder_set_sample_rate(encoder, sample_rate);
|
||||
|
||||
@@ -154,10 +154,19 @@ static const unsigned FLAC__CPUINFO_IA32_CPUID_EXTENDED_AMD_EXTMMX = 0x00400000;
|
||||
|
||||
void FLAC__cpu_info(FLAC__CPUInfo *info)
|
||||
{
|
||||
/*
|
||||
* IA64-specific
|
||||
*/
|
||||
#if defined FLAC__CPU_IA64
|
||||
info->type = FLAC__CPUINFO_TYPE_IA64;
|
||||
#if !defined FLAC__NO_ASM && defined FLAC__HAS_NASM
|
||||
info->use_asm = true;
|
||||
#endif
|
||||
|
||||
#elif defined FLAC__CPU_IA32
|
||||
/*
|
||||
* IA32-specific
|
||||
*/
|
||||
#ifdef FLAC__CPU_IA32
|
||||
info->type = FLAC__CPUINFO_TYPE_IA32;
|
||||
#if !defined FLAC__NO_ASM && defined FLAC__HAS_NASM
|
||||
info->use_asm = true; /* we assume a minimum of 80386 with FLAC__CPU_IA32 */
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
FLAC__CPUINFO_TYPE_IA64,
|
||||
FLAC__CPUINFO_TYPE_IA32,
|
||||
FLAC__CPUINFO_TYPE_PPC,
|
||||
FLAC__CPUINFO_TYPE_UNKNOWN
|
||||
|
||||
@@ -77,6 +77,13 @@ void FLAC__lpc_compute_autocorrelation_asm_ia32_sse_lag_12(const FLAC__real data
|
||||
void FLAC__lpc_compute_autocorrelation_asm_ia32_3dnow(const FLAC__real data[], unsigned data_len, unsigned lag, FLAC__real autoc[]);
|
||||
# endif
|
||||
# endif
|
||||
# ifdef FLAC__CPU_IA64
|
||||
# ifdef FLAC__HAS_NASM
|
||||
void FLAC__lpc_compute_autocorrelation_asm_ia64_sse_lag_4(const FLAC__real data[], unsigned data_len, unsigned lag, FLAC__real autoc[]);
|
||||
void FLAC__lpc_compute_autocorrelation_asm_ia64_sse_lag_8(const FLAC__real data[], unsigned data_len, unsigned lag, FLAC__real autoc[]);
|
||||
void FLAC__lpc_compute_autocorrelation_asm_ia64_sse_lag_12(const FLAC__real data[], unsigned data_len, unsigned lag, FLAC__real autoc[]);
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
@@ -109,10 +109,12 @@
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=".\include;..\..\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;FLAC__CPU_IA64;FLAC__HAS_NASM;FLAC__USE_3DNOW;VERSION=\"1.2.0\";FLAC__NO_DLL;DEBUG;FLAC__OVERFLOW_DETECT"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
MinimalRebuild="false"
|
||||
ExceptionHandling="2"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
BrowseInformation="1"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
@@ -290,11 +292,11 @@
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\include\private\all.h"
|
||||
RelativePath=".\include\protected\all.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\protected\all.h"
|
||||
RelativePath=".\include\private\all.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
@@ -746,6 +748,52 @@
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ia64\lpc_asm.nasm"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
CommandLine="nasmw.exe -f win64 -d OBJ_FORMAT_win64 -i ia64/ ia32/lpc_asm.nasm -o ia64/lpc_asm.obj"
|
||||
AdditionalDependencies="ia64/lpc_asm.nasm;ia64/nasm.h"
|
||||
Outputs="ia64/lpc_asm.obj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|x64"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
CommandLine="nasmw.exe -f win64 -d OBJ_FORMAT_win64 -i ia64/ ia64/lpc_asm.nasm -o ia64/lpc_asm.obj"
|
||||
AdditionalDependencies="ia64/lpc_asm.nasm;ia64/nasm.h"
|
||||
Outputs="ia64/lpc_asm.obj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
CommandLine="nasmw.exe -f win64 -d OBJ_FORMAT_win64 -i ia64/ ia32/lpc_asm.nasm -o ia64/lpc_asm.obj"
|
||||
AdditionalDependencies="ia64/lpc_asm.nasm;ia64/nasm.h"
|
||||
Outputs="ia64/lpc_asm.obj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|x64"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
CommandLine="nasmw.exe -f win64 -d OBJ_FORMAT_win64 -i ia64/ ia64/lpc_asm.nasm -o ia64/lpc_asm.obj"
|
||||
AdditionalDependencies="ia64/lpc_asm.nasm;ia64/nasm.h"
|
||||
Outputs="ia64/lpc_asm.obj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ia32\lpc_asm.nasm"
|
||||
>
|
||||
|
||||
@@ -935,6 +935,17 @@ static FLAC__StreamEncoderInitStatus init_stream_internal_(
|
||||
encoder->private_->local_fixed_compute_best_predictor = FLAC__fixed_compute_best_predictor_asm_ia32_mmx_cmov;
|
||||
# endif /* FLAC__HAS_NASM */
|
||||
# endif /* FLAC__CPU_IA32 */
|
||||
# ifdef FLAC__CPU_IA64
|
||||
FLAC__ASSERT(encoder->private_->cpuinfo.type == FLAC__CPUINFO_TYPE_IA64);
|
||||
# ifdef FLAC__HAS_NASM
|
||||
if(encoder->protected_->max_lpc_order < 4)
|
||||
encoder->private_->local_lpc_compute_autocorrelation = FLAC__lpc_compute_autocorrelation_asm_ia64_sse_lag_4;
|
||||
else if(encoder->protected_->max_lpc_order < 8)
|
||||
encoder->private_->local_lpc_compute_autocorrelation = FLAC__lpc_compute_autocorrelation_asm_ia64_sse_lag_8;
|
||||
//else if(encoder->protected_->max_lpc_order < 12)
|
||||
// encoder->private_->local_lpc_compute_autocorrelation = FLAC__lpc_compute_autocorrelation_asm_ia64_sse_lag_12;
|
||||
# endif /* FLAC__HAS_NASM */
|
||||
# endif /* FLAC__CPU_IA64 */
|
||||
}
|
||||
# endif /* !FLAC__NO_ASM */
|
||||
#endif /* !FLAC__INTEGER_ONLY_LIBRARY */
|
||||
|
||||
@@ -1,208 +1,416 @@
|
||||
/* flac_mac - wedge utility to add FLAC support to Monkey's Audio
|
||||
|
||||
* Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007,2008 Josh Coalson
|
||||
|
||||
*
|
||||
|
||||
* 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 2
|
||||
|
||||
* 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, write to the Free Software
|
||||
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
* This program can be used to allow FLAC to masquerade as one of the other
|
||||
|
||||
* supported lossless codecs in Monkey's Audio. See the documentation for
|
||||
|
||||
* how to do this.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
|
||||
# include <config.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#include<stdio.h>
|
||||
|
||||
#include<stdlib.h>
|
||||
|
||||
#include<string.h>
|
||||
|
||||
#include<wtypes.h>
|
||||
|
||||
#include<process.h>
|
||||
|
||||
#include<winbase.h>
|
||||
|
||||
|
||||
|
||||
static int execit(char *prog, char *args);
|
||||
|
||||
static int forkit(char *prog, char *args);
|
||||
|
||||
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
|
||||
{
|
||||
|
||||
int flac_return_val = 0, opt_arg = 1, from_arg = -1, to_arg = -1, flac_level = 5, i;
|
||||
|
||||
char prog[MAX_PATH], cmdline[MAX_PATH*2], from[MAX_PATH], to[MAX_PATH], macdir[MAX_PATH], options[256], *p;
|
||||
|
||||
enum { WAVPACK, RKAU, SHORTEN } codec;
|
||||
|
||||
|
||||
|
||||
/* get the directory where MAC external codecs reside */
|
||||
|
||||
if(0 != (p = strrchr(argv[0],'\\'))) {
|
||||
|
||||
strcpy(macdir, argv[0]);
|
||||
|
||||
*(strrchr(macdir,'\\')+1) = '\0';
|
||||
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
strcpy(macdir, "");
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* determine which codec we were called as and parse the options */
|
||||
|
||||
if(p == 0)
|
||||
|
||||
p = argv[0];
|
||||
|
||||
else
|
||||
|
||||
p++;
|
||||
|
||||
if(0 == strnicmp(p, "short", 5)) {
|
||||
|
||||
codec = SHORTEN;
|
||||
|
||||
}
|
||||
|
||||
else if(0 == strnicmp(p, "rkau", 4)) {
|
||||
|
||||
codec = RKAU;
|
||||
|
||||
if(argv[1][0] == '-' && argv[1][1] == 'l') {
|
||||
|
||||
opt_arg = 2;
|
||||
|
||||
switch(argv[1][2]) {
|
||||
|
||||
case '1': flac_level = 1; break;
|
||||
|
||||
case '2': flac_level = 5; break;
|
||||
|
||||
case '3': flac_level = 8; break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
else if(0 == strnicmp(p, "wavpack", 7)) {
|
||||
|
||||
codec = WAVPACK;
|
||||
|
||||
if(argv[1][0] == '-') {
|
||||
|
||||
opt_arg = 2;
|
||||
|
||||
switch(argv[1][1]) {
|
||||
|
||||
case 'f': flac_level = 1; break;
|
||||
|
||||
case 'h': flac_level = 8; break;
|
||||
|
||||
default: opt_arg = 1;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
return -5;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* figure out which arguments are the source and destination files */
|
||||
|
||||
for(i = 1; i < argc; i++)
|
||||
|
||||
if(argv[i][0] != '-') {
|
||||
|
||||
from_arg = i++;
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
for( ; i < argc; i++)
|
||||
|
||||
if(argv[i][0] != '-') {
|
||||
|
||||
to_arg = i++;
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
if(to_arg < 0)
|
||||
|
||||
return -4;
|
||||
|
||||
|
||||
|
||||
/* build the command to call flac with */
|
||||
|
||||
sprintf(prog, "%sflac.exe", macdir);
|
||||
|
||||
sprintf(options, "-%d", flac_level);
|
||||
|
||||
/* flac_mac - wedge utility to add FLAC support to Monkey's Audio
|
||||
|
||||
* Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007,2008 Josh Coalson
|
||||
|
||||
*
|
||||
|
||||
* 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 2
|
||||
|
||||
* 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, write to the Free Software
|
||||
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
* This program can be used to allow FLAC to masquerade as one of the other
|
||||
|
||||
* supported lossless codecs in Monkey's Audio. See the documentation for
|
||||
|
||||
* how to do this.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
|
||||
# include <config.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#include<stdio.h>
|
||||
|
||||
#include<stdlib.h>
|
||||
|
||||
#include<string.h>
|
||||
|
||||
#include<wtypes.h>
|
||||
|
||||
#include<process.h>
|
||||
|
||||
#include<winbase.h>
|
||||
|
||||
|
||||
|
||||
static int execit(char *prog, char *args);
|
||||
|
||||
static int forkit(char *prog, char *args);
|
||||
|
||||
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
|
||||
{
|
||||
|
||||
int flac_return_val = 0, opt_arg = 1, from_arg = -1, to_arg = -1, flac_level = 5, i;
|
||||
|
||||
char prog[MAX_PATH], cmdline[MAX_PATH*2], from[MAX_PATH], to[MAX_PATH], macdir[MAX_PATH], options[256], *p;
|
||||
|
||||
enum { WAVPACK, RKAU, SHORTEN } codec;
|
||||
|
||||
|
||||
|
||||
/* get the directory where MAC external codecs reside */
|
||||
|
||||
if(0 != (p = strrchr(argv[0],'\\'))) {
|
||||
|
||||
strcpy(macdir, argv[0]);
|
||||
|
||||
*(strrchr(macdir,'\\')+1) = '\0';
|
||||
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
strcpy(macdir, "");
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* determine which codec we were called as and parse the options */
|
||||
|
||||
if(p == 0)
|
||||
|
||||
p = argv[0];
|
||||
|
||||
else
|
||||
|
||||
p++;
|
||||
|
||||
if(0 == strnicmp(p, "short", 5)) {
|
||||
|
||||
codec = SHORTEN;
|
||||
|
||||
}
|
||||
|
||||
else if(0 == strnicmp(p, "rkau", 4)) {
|
||||
|
||||
codec = RKAU;
|
||||
|
||||
if(argv[1][0] == '-' && argv[1][1] == 'l') {
|
||||
|
||||
opt_arg = 2;
|
||||
|
||||
switch(argv[1][2]) {
|
||||
|
||||
case '1': flac_level = 1; break;
|
||||
|
||||
case '2': flac_level = 5; break;
|
||||
|
||||
case '3': flac_level = 8; break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
else if(0 == strnicmp(p, "wavpack", 7)) {
|
||||
|
||||
codec = WAVPACK;
|
||||
|
||||
if(argv[1][0] == '-') {
|
||||
|
||||
opt_arg = 2;
|
||||
|
||||
switch(argv[1][1]) {
|
||||
|
||||
case 'f': flac_level = 1; break;
|
||||
|
||||
case 'h': flac_level = 8; break;
|
||||
|
||||
default: opt_arg = 1;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
return -5;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* figure out which arguments are the source and destination files */
|
||||
|
||||
for(i = 1; i < argc; i++)
|
||||
|
||||
if(argv[i][0] != '-') {
|
||||
|
||||
from_arg = i++;
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
for( ; i < argc; i++)
|
||||
|
||||
if(argv[i][0] != '-') {
|
||||
|
||||
to_arg = i++;
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
if(to_arg < 0)
|
||||
|
||||
return -4;
|
||||
|
||||
|
||||
|
||||
/* build the command to call flac with */
|
||||
|
||||
sprintf(prog, "%sflac.exe", macdir);
|
||||
|
||||
sprintf(options, "-%d", flac_level);
|
||||
|
||||
for(i = opt_arg; i < argc; i++)
|
||||
|
||||
if(argv[i][0] == '-') {
|
||||
|
||||
strcat(options, " ");
|
||||
|
||||
strcat(options, argv[i]);
|
||||
|
||||
}
|
||||
|
||||
sprintf(cmdline, "\"%s\" %s -o \"%s\" \"%s\"", prog, options, argv[to_arg], argv[from_arg]);
|
||||
|
||||
|
||||
|
||||
flac_return_val = execit(prog, cmdline);
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
* Now that flac has finished, we need to fork a process that will rename
|
||||
|
||||
* the resulting file with the correct extension once MAC has moved it to
|
||||
|
||||
* it's final resting place.
|
||||
|
||||
*/
|
||||
|
||||
if(0 == flac_return_val) {
|
||||
|
||||
/* get the destination directory, if any */
|
||||
|
||||
if(0 != (p = strchr(argv[to_arg],'\\'))) {
|
||||
|
||||
strcpy(from, argv[to_arg]);
|
||||
|
||||
*(strrchr(from,'\\')+1) = '\0';
|
||||
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
strcpy(from, "");
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* for the full 'from' and 'to' paths for the renamer process */
|
||||
|
||||
p = strrchr(argv[from_arg],'\\');
|
||||
|
||||
strcat(from, p? p+1 : argv[from_arg]);
|
||||
|
||||
strcpy(to, from);
|
||||
|
||||
if(0 == strchr(from,'.'))
|
||||
|
||||
return -3;
|
||||
|
||||
switch(codec) {
|
||||
|
||||
case SHORTEN: strcpy(strrchr(from,'.'), ".shn"); break;
|
||||
|
||||
case WAVPACK: strcpy(strrchr(from,'.'), ".wv"); break;
|
||||
|
||||
case RKAU: strcpy(strrchr(from,'.'), ".rka"); break;
|
||||
|
||||
}
|
||||
|
||||
strcpy(strrchr(to,'.'), ".flac");
|
||||
|
||||
|
||||
|
||||
sprintf(prog, "%sflac_ren.exe", macdir);
|
||||
|
||||
sprintf(cmdline, "\"%s\" \"%s\" \"%s\"", prog, from, to);
|
||||
|
||||
|
||||
|
||||
flac_return_val = forkit(prog, cmdline);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
return flac_return_val;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
int execit(char *prog, char *args)
|
||||
|
||||
{
|
||||
|
||||
BOOL ok;
|
||||
|
||||
STARTUPINFO startup_info;
|
||||
|
||||
PROCESS_INFORMATION proc_info;
|
||||
|
||||
|
||||
|
||||
GetStartupInfo(&startup_info);
|
||||
|
||||
|
||||
|
||||
ok = CreateProcess(
|
||||
|
||||
prog,
|
||||
|
||||
args,
|
||||
|
||||
0, /*process security attributes*/
|
||||
|
||||
0, /*thread security attributes*/
|
||||
|
||||
FALSE,
|
||||
|
||||
0, /*dwCreationFlags*/
|
||||
|
||||
0, /*environment*/
|
||||
|
||||
0, /*lpCurrentDirectory*/
|
||||
|
||||
&startup_info,
|
||||
|
||||
&proc_info
|
||||
|
||||
);
|
||||
|
||||
if(ok) {
|
||||
|
||||
DWORD dw;
|
||||
|
||||
dw = WaitForSingleObject(proc_info.hProcess, INFINITE);
|
||||
|
||||
ok = (dw != 0xFFFFFFFF);
|
||||
|
||||
CloseHandle(proc_info.hThread);
|
||||
|
||||
CloseHandle(proc_info.hProcess);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
return ok? 0 : -1;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
int forkit(char *prog, char *args)
|
||||
|
||||
{
|
||||
|
||||
BOOL ok;
|
||||
|
||||
STARTUPINFO startup_info;
|
||||
|
||||
PROCESS_INFORMATION proc_info;
|
||||
|
||||
|
||||
|
||||
GetStartupInfo(&startup_info);
|
||||
|
||||
|
||||
|
||||
ok = CreateProcess(
|
||||
|
||||
prog,
|
||||
|
||||
args,
|
||||
|
||||
0, /*process security attributes*/
|
||||
|
||||
0, /*thread security attributes*/
|
||||
|
||||
FALSE,
|
||||
|
||||
DETACHED_PROCESS, /*dwCreationFlags*/
|
||||
|
||||
0, /*environment*/
|
||||
|
||||
0, /*lpCurrentDirectory*/
|
||||
|
||||
&startup_info,
|
||||
|
||||
&proc_info
|
||||
|
||||
);
|
||||
|
||||
if(ok) {
|
||||
|
||||
CloseHandle(proc_info.hThread);
|
||||
|
||||
CloseHandle(proc_info.hProcess);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
return ok? 0 : -2;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,39 +1,78 @@
|
||||
/* flac_ren - renamer part of utility to add FLAC support to Monkey's Audio
|
||||
|
||||
* Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007,2008 Josh Coalson
|
||||
|
||||
*
|
||||
|
||||
* 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 2
|
||||
|
||||
* 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, write to the Free Software
|
||||
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
|
||||
# include <config.h>
|
||||
/* flac_ren - renamer part of utility to add FLAC support to Monkey's Audio
|
||||
|
||||
* Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007,2008 Josh Coalson
|
||||
|
||||
*
|
||||
|
||||
* 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 2
|
||||
|
||||
* 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, write to the Free Software
|
||||
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
|
||||
# include <config.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#include <io.h>
|
||||
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <wtypes.h>
|
||||
|
||||
#include <winbase.h>
|
||||
|
||||
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
|
||||
{
|
||||
|
||||
struct stat s;
|
||||
|
||||
|
||||
|
||||
/* wait till the 'from' file has reached its final destination */
|
||||
|
||||
do {
|
||||
|
||||
Sleep(2000);
|
||||
|
||||
} while(stat(argv[1], &s) < 0);
|
||||
|
||||
|
||||
|
||||
/* now rename it */
|
||||
|
||||
return rename(argv[1], argv[2]);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
*/
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "BitWriter.h"
|
||||
#include "TTAError.h"
|
||||
#include "TTAWriter.h"
|
||||
#include "filters3.h"
|
||||
|
||||
|
||||
@@ -28,8 +28,6 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "BitWriter.h"
|
||||
#include "TTAError.h"
|
||||
#include "TTACommon.h"
|
||||
|
||||
#define WAVE_FORMAT_PCM 1
|
||||
@@ -37,6 +35,8 @@
|
||||
|
||||
namespace TTALib
|
||||
{
|
||||
class BitWriter;
|
||||
|
||||
class TTAWriter
|
||||
{
|
||||
HANDLE hOutFile;
|
||||
|
||||
Reference in New Issue
Block a user