From 769a85f827e5160085ca86d9889b9a2f148635b6 Mon Sep 17 00:00:00 2001 From: chudov Date: Tue, 18 May 2010 17:18:37 +0000 Subject: [PATCH] 2.0.9 release --- CUEControls/ImgComboBox.cs | 4 +- CUEControls/Properties/AssemblyInfo.cs | 4 +- CUEPlayer/Properties/AssemblyInfo.cs | 4 +- CUEPlayer/frmCUEPlayer.Designer.cs | 2 +- CUERipper/CUERipper.csproj | 2 +- CUERipper/frmCUERipper.Designer.cs | 7 +- CUERipper/frmCUERipper.cs | 6 +- CUERipper/frmCUERipper.de-DE.resx | 2 +- CUERipper/frmCUERipper.resx | 47 +- CUERipper/frmFreedbSubmit.Designer.cs | 166 ++ CUERipper/frmFreedbSubmit.cs | 36 + CUERipper/frmFreedbSubmit.resx | 428 ++++ CUETools.ALACEnc/Program.cs | 4 +- CUETools.ARCUE/Properties/AssemblyInfo.cs | 4 +- CUETools.AccurateRip/AccurateRip.cs | 123 +- CUETools.AccurateRip/CDRepair.cs | 15 +- .../Properties/AssemblyInfo.cs | 4 +- CUETools.CDImage/Properties/AssemblyInfo.cs | 4 +- CUETools.CTDB/CUEToolsDB.cs | 16 + CUETools.Codecs.ALAC/ALACWriter.cs | 71 +- .../Properties/AssemblyInfo.cs | 4 +- CUETools.Codecs.APE/CUETools.Codecs.APE.cpp | 22 +- CUETools.Codecs.CoreAudio/WasapiOut.cs | 15 +- CUETools.Codecs.FLAC/CUETools.Codecs.FLAC.cpp | 131 +- .../CUETools.Codecs.FLAKE.csproj | 12 + CUETools.Codecs.FLAKE/FlakeWriter.cs | 97 +- .../Properties/AssemblyInfo.cs | 4 +- .../Properties/Resources.Designer.cs | 99 + .../Properties/Resources.resx | 132 ++ .../Properties/Resources.ru-RU.resx | 132 ++ .../CUETools.Codecs.FlaCuda.csproj | 10 + CUETools.Codecs.FlaCuda/FlaCudaWriter.cs | 157 +- .../Properties/AssemblyInfo.cs | 4 +- .../Properties/Resources.Designer.cs | 117 + .../Properties/Resources.resx | 138 ++ .../Properties/Resources.ru-RU.resx | 138 ++ CUETools.Codecs.HDCD/HDCDDotNet.cs | 8 +- CUETools.Codecs.Icecast/IcecastWriter.cs | 34 +- CUETools.Codecs.LAME/Encoder.cs | 101 +- CUETools.Codecs.LossyWAV/LossyWAV.cs | 15 +- CUETools.Codecs.TTA/CUETools.Codecs.TTA.cpp | 19 +- .../CUETools.Codecs.WavPack.cpp | 147 +- CUETools.Codecs/CUETools.Codecs.csproj | 1 + CUETools.Codecs/Codecs.cs | 61 +- CUETools.Codecs/Properties/AssemblyInfo.cs | 4 +- .../Properties/AssemblyInfo.cs | 4 +- .../Properties/AssemblyInfo.cs | 4 +- .../Properties/AssemblyInfo.cs | 4 +- CUETools.DSP.Mixer/Mixer.cs | 15 +- CUETools.FlaCudaExe/Program.cs | 10 +- .../Properties/AssemblyInfo.cs | 4 +- CUETools.Flake/Program.cs | 6 +- CUETools.Processor/AudioReadWrite.cs | 31 +- CUETools.Processor/Processor.cs | 520 +++-- CUETools.Processor/Properties/AssemblyInfo.cs | 4 +- CUETools.Ripper.Console/Program.cs | 4 +- .../Properties/AssemblyInfo.cs | 4 +- CUETools.Ripper.SCSI/SCSIDrive.cs | 2 +- CUETools.Ripper/Properties/AssemblyInfo.cs | 4 +- .../CUETools.TestCodecs/ALACWriterTest.cs | 4 +- .../CUETools.TestCodecs.csproj | 30 + .../CUETools.TestCodecs/FlakeWriterTest.cs | 4 +- .../CUETools.TestParity/CDRepairDecodeTest.cs | 40 +- .../CUETools.TestParity/CDRepairEncodeTest.cs | 2 +- CUETools/CUETools.TestParity/CDRepairTest.cs | 6 +- .../CUETools.TestProcessor.csproj | 23 +- .../FileGroupInfoTest.cs | 82 + CUETools/CUETools.sln | 15 + CUETools/Properties/AssemblyInfo.cs | 4 +- CUETools/Resources/more/card--pencil.png | Bin 0 -> 573 bytes .../Resources/more/icons/edit-list-order.png | Bin 0 -> 433 bytes .../more/icons/sticky-note--arrow.png | Bin 0 -> 519 bytes CUETools/Resources/more/icons/sticky-note.png | Bin 0 -> 374 bytes .../more/icons/sticky-notes-stack.png | Bin 0 -> 463 bytes .../more/icons/text_list_numbers.png | Bin 0 -> 357 bytes CUETools/frmCUETools.Designer.cs | 56 +- CUETools/frmCUETools.cs | 52 +- CUETools/frmCUETools.resx | 1971 +++++++---------- CUETools/frmSettings.Designer.cs | 134 +- CUETools/frmSettings.cs | 24 +- CUETools/frmSettings.resx | 482 +--- CUETools/localtestrun.testrunconfig | 14 + 82 files changed, 3593 insertions(+), 2517 deletions(-) create mode 100644 CUERipper/frmFreedbSubmit.Designer.cs create mode 100644 CUERipper/frmFreedbSubmit.cs create mode 100644 CUERipper/frmFreedbSubmit.resx create mode 100644 CUETools.Codecs.FLAKE/Properties/Resources.Designer.cs create mode 100644 CUETools.Codecs.FLAKE/Properties/Resources.resx create mode 100644 CUETools.Codecs.FLAKE/Properties/Resources.ru-RU.resx create mode 100644 CUETools.Codecs.FlaCuda/Properties/Resources.Designer.cs create mode 100644 CUETools.Codecs.FlaCuda/Properties/Resources.resx create mode 100644 CUETools.Codecs.FlaCuda/Properties/Resources.ru-RU.resx create mode 100644 CUETools/CUETools.TestProcessor/FileGroupInfoTest.cs create mode 100644 CUETools/Resources/more/card--pencil.png create mode 100644 CUETools/Resources/more/icons/edit-list-order.png create mode 100644 CUETools/Resources/more/icons/sticky-note--arrow.png create mode 100644 CUETools/Resources/more/icons/sticky-note.png create mode 100644 CUETools/Resources/more/icons/sticky-notes-stack.png create mode 100644 CUETools/Resources/more/icons/text_list_numbers.png create mode 100644 CUETools/localtestrun.testrunconfig diff --git a/CUEControls/ImgComboBox.cs b/CUEControls/ImgComboBox.cs index dcde0ed..1b72b7e 100644 --- a/CUEControls/ImgComboBox.cs +++ b/CUEControls/ImgComboBox.cs @@ -124,9 +124,9 @@ namespace CUEControls rectTextBounds.Height = ClientRectangle.Height - 8; rectBtn.X = ClientRectangle.Width - 18; - rectBtn.Y = ClientRectangle.Top + 4; + rectBtn.Y = ClientRectangle.Top; rectBtn.Width = 18; - rectBtn.Height = ClientRectangle.Height - 8; + rectBtn.Height = ClientRectangle.Height; rectContent.X = ClientRectangle.Left; rectContent.Y = ClientRectangle.Top; diff --git a/CUEControls/Properties/AssemblyInfo.cs b/CUEControls/Properties/AssemblyInfo.cs index f4273f5..8689bb2 100644 --- a/CUEControls/Properties/AssemblyInfo.cs +++ b/CUEControls/Properties/AssemblyInfo.cs @@ -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("2.0.8.0")] -[assembly: AssemblyFileVersion("2.0.8.0")] +[assembly: AssemblyVersion("2.0.9.0")] +[assembly: AssemblyFileVersion("2.0.9.0")] diff --git a/CUEPlayer/Properties/AssemblyInfo.cs b/CUEPlayer/Properties/AssemblyInfo.cs index 33de2e5..d0ccf2a 100644 --- a/CUEPlayer/Properties/AssemblyInfo.cs +++ b/CUEPlayer/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.0.8.0")] -[assembly: AssemblyFileVersion("2.0.8.0")] +[assembly: AssemblyVersion("2.0.9.0")] +[assembly: AssemblyFileVersion("2.0.9.0")] diff --git a/CUEPlayer/frmCUEPlayer.Designer.cs b/CUEPlayer/frmCUEPlayer.Designer.cs index 1ca0a2b..972272e 100644 --- a/CUEPlayer/frmCUEPlayer.Designer.cs +++ b/CUEPlayer/frmCUEPlayer.Designer.cs @@ -68,7 +68,7 @@ this.IsMdiContainer = true; this.MainMenuStrip = this.menuStrip1; this.Name = "frmCUEPlayer"; - this.Text = "CUEPlayer 2.0.8"; + this.Text = "CUEPlayer 2.0.9"; this.Load += new System.EventHandler(this.frmCUEPlayer_Load); this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.frmCUEPlayer_FormClosing); this.menuStrip1.ResumeLayout(false); diff --git a/CUERipper/CUERipper.csproj b/CUERipper/CUERipper.csproj index be1e8bd..edcc698 100644 --- a/CUERipper/CUERipper.csproj +++ b/CUERipper/CUERipper.csproj @@ -40,7 +40,7 @@ true index.html 2 - 2.0.8.0 + 2.0.9.0 false true true diff --git a/CUERipper/frmCUERipper.Designer.cs b/CUERipper/frmCUERipper.Designer.cs index 0601a34..b4f6e67 100644 --- a/CUERipper/frmCUERipper.Designer.cs +++ b/CUERipper/frmCUERipper.Designer.cs @@ -569,8 +569,9 @@ namespace CUERipper // // bnComboBoxOutputFormat // - this.bnComboBoxOutputFormat.BackColor = System.Drawing.SystemColors.Window; - this.bnComboBoxOutputFormat.ForeColor = System.Drawing.SystemColors.ControlText; + this.bnComboBoxOutputFormat.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; + this.bnComboBoxOutputFormat.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; + this.bnComboBoxOutputFormat.BackColor = System.Drawing.Color.Transparent; this.bnComboBoxOutputFormat.ImageList = null; resources.ApplyResources(this.bnComboBoxOutputFormat, "bnComboBoxOutputFormat"); this.bnComboBoxOutputFormat.MinimumSize = new System.Drawing.Size(40, 0); @@ -683,7 +684,6 @@ namespace CUERipper this.Controls.Add(this.buttonTrackMetadata); this.Controls.Add(this.buttonVA); this.Controls.Add(this.bnComboBoxRelease); - this.Controls.Add(this.txtOutputPath); this.Controls.Add(this.bnComboBoxDrives); this.Controls.Add(this.progressBarErrors); this.Controls.Add(this.bnComboBoxOutputFormat); @@ -695,6 +695,7 @@ namespace CUERipper this.Controls.Add(this.buttonAbort); this.Controls.Add(this.buttonPause); this.Controls.Add(this.listMetadata); + this.Controls.Add(this.txtOutputPath); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.KeyPreview = true; this.MaximizeBox = false; diff --git a/CUERipper/frmCUERipper.cs b/CUERipper/frmCUERipper.cs index 8e26b3f..6342c56 100644 --- a/CUERipper/frmCUERipper.cs +++ b/CUERipper/frmCUERipper.cs @@ -642,7 +642,7 @@ namespace CUERipper cueSheet.Action = CUEAction.Encode; this.BeginInvoke((MethodInvoker)delegate() { toolStripStatusLabel1.Text = Properties.Resources.LookingUpVia + " CTDB..."; }); - cueSheet.UseCUEToolsDB(true, "CUERipper 2.0.8: " + selectedDriveInfo.drive.ARName); + cueSheet.UseCUEToolsDB(true, "CUERipper " + CUESheet.CUEToolsVersion + ": " + selectedDriveInfo.drive.ARName); cueSheet.CTDB.UploadHelper.onProgress += new EventHandler(UploadProgress); this.BeginInvoke((MethodInvoker)delegate() { toolStripStatusLabel1.Text = Properties.Resources.LookingUpVia + " AccurateRip..."; }); cueSheet.UseAccurateRip(); @@ -698,7 +698,7 @@ namespace CUERipper m_freedb.UserName = _config.advanced.FreedbUser; m_freedb.Hostname = _config.advanced.FreedbDomain; m_freedb.ClientName = "CUERipper"; - m_freedb.Version = "2.0.8"; + m_freedb.Version = CUESheet.CUEToolsVersion; m_freedb.SetDefaultSiteAddress(Properties.Settings.Default.MAIN_FREEDB_SITEADDRESS); QueryResult queryResult; @@ -1337,7 +1337,7 @@ namespace CUERipper m_freedb.UserName = _config.advanced.FreedbUser; m_freedb.Hostname = _config.advanced.FreedbDomain; m_freedb.ClientName = "CUERipper"; - m_freedb.Version = "2.0.8"; + m_freedb.Version = CUESheet.CUEToolsVersion; //try //{ // string code = m_freedb.GetCategories(out tmp); diff --git a/CUERipper/frmCUERipper.de-DE.resx b/CUERipper/frmCUERipper.de-DE.resx index ab6d1ce..1c6fd32 100644 --- a/CUERipper/frmCUERipper.de-DE.resx +++ b/CUERipper/frmCUERipper.de-DE.resx @@ -208,6 +208,6 @@ Senden - CUERipper 2.0.8 + CUERipper 2.0.9 \ No newline at end of file diff --git a/CUERipper/frmCUERipper.resx b/CUERipper/frmCUERipper.resx index 31fc72a..e8b88ef 100644 --- a/CUERipper/frmCUERipper.resx +++ b/CUERipper/frmCUERipper.resx @@ -197,7 +197,7 @@ $this - 16 + 15 @@ -264,7 +264,7 @@ $this - 14 + 13 Top, Left, Right @@ -294,7 +294,7 @@ $this - 15 + 14 Top, Left, Right @@ -327,7 +327,7 @@ $this - 17 + 16 Top, Left, Right @@ -360,7 +360,7 @@ $this - 18 + 17 310, 15 @@ -468,7 +468,7 @@ bnComboBoxLosslessOrNot - CUEControls.ImgComboBox, CUEControls, Version=2.0.8.0, Culture=neutral, PublicKeyToken=null + CUEControls.ImgComboBox, CUEControls, Version=2.0.9.0, Culture=neutral, PublicKeyToken=null groupBoxSettings @@ -495,7 +495,7 @@ bnComboBoxEncoder - CUEControls.ImgComboBox, CUEControls, Version=2.0.8.0, Culture=neutral, PublicKeyToken=null + CUEControls.ImgComboBox, CUEControls, Version=2.0.9.0, Culture=neutral, PublicKeyToken=null groupBoxSettings @@ -549,7 +549,7 @@ bnComboBoxFormat - CUEControls.ImgComboBox, CUEControls, Version=2.0.8.0, Culture=neutral, PublicKeyToken=null + CUEControls.ImgComboBox, CUEControls, Version=2.0.9.0, Culture=neutral, PublicKeyToken=null groupBoxSettings @@ -615,7 +615,7 @@ bnComboBoxImage - CUEControls.ImgComboBox, CUEControls, Version=2.0.8.0, Culture=neutral, PublicKeyToken=null + CUEControls.ImgComboBox, CUEControls, Version=2.0.9.0, Culture=neutral, PublicKeyToken=null groupBoxSettings @@ -768,7 +768,7 @@ $this - 13 + 12 998, 56 @@ -861,7 +861,7 @@ $this - 10 + 9 382, 392 @@ -888,10 +888,10 @@ $this - 12 + 11 - 6, 314 + 5, 312 552, 20 @@ -912,7 +912,7 @@ $this - 8 + 19 708, 56 @@ -1005,7 +1005,7 @@ bnComboBoxRelease - CUEControls.ImgComboBox, CUEControls, Version=2.0.8.0, Culture=neutral, PublicKeyToken=null + CUEControls.ImgComboBox, CUEControls, Version=2.0.9.0, Culture=neutral, PublicKeyToken=null $this @@ -1029,16 +1029,16 @@ bnComboBoxDrives - CUEControls.ImgComboBox, CUEControls, Version=2.0.8.0, Culture=neutral, PublicKeyToken=null + CUEControls.ImgComboBox, CUEControls, Version=2.0.9.0, Culture=neutral, PublicKeyToken=null $this - 9 + 8 - 5, 313 + 5, 312 552, 21 @@ -1046,17 +1046,20 @@ 9 + + 0 + bnComboBoxOutputFormat - CUEControls.ImgComboBox, CUEControls, Version=2.0.8.0, Culture=neutral, PublicKeyToken=null + CUEControls.ImgComboBox, CUEControls, Version=2.0.9.0, Culture=neutral, PublicKeyToken=null $this - 11 + 10 1 @@ -1098,7 +1101,7 @@ $this - 19 + 18 Flat @@ -1726,7 +1729,7 @@ CenterScreen - CUERipper 2.0.8 + CUERipper 2.0.9 toolStripStatusLabel1 diff --git a/CUERipper/frmFreedbSubmit.Designer.cs b/CUERipper/frmFreedbSubmit.Designer.cs new file mode 100644 index 0000000..43b1014 --- /dev/null +++ b/CUERipper/frmFreedbSubmit.Designer.cs @@ -0,0 +1,166 @@ +namespace CUERipper +{ + partial class frmFreedbSubmit + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmFreedbSubmit)); + CUEControls.RectRadius rectRadius1 = new CUEControls.RectRadius(); + this.imgComboBoxCategory = new CUEControls.ImgComboBox(); + this.frmFreedbSubmitDataBindingSource = new System.Windows.Forms.BindingSource(this.components); + this.categoriesBindingSource = new System.Windows.Forms.BindingSource(this.components); + this.buttonCancel = new System.Windows.Forms.Button(); + this.buttonOk = new System.Windows.Forms.Button(); + this.labelCategory = new System.Windows.Forms.Label(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.labelAT = new System.Windows.Forms.Label(); + this.labelEmail = new System.Windows.Forms.Label(); + this.textBoxDomain = new System.Windows.Forms.TextBox(); + this.textBoxUser = new System.Windows.Forms.TextBox(); + ((System.ComponentModel.ISupportInitialize)(this.frmFreedbSubmitDataBindingSource)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.categoriesBindingSource)).BeginInit(); + this.groupBox1.SuspendLayout(); + this.SuspendLayout(); + // + // imgComboBoxCategory + // + this.imgComboBoxCategory.BackColor = System.Drawing.Color.Transparent; + this.imgComboBoxCategory.DataBindings.Add(new System.Windows.Forms.Binding("SelectedItem", this.frmFreedbSubmitDataBindingSource, "Category", true)); + this.imgComboBoxCategory.DataSource = this.categoriesBindingSource; + this.imgComboBoxCategory.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.imgComboBoxCategory.FormattingEnabled = true; + this.imgComboBoxCategory.ImageList = null; + resources.ApplyResources(this.imgComboBoxCategory, "imgComboBoxCategory"); + this.imgComboBoxCategory.Name = "imgComboBoxCategory"; + rectRadius1.BottomLeft = 2; + rectRadius1.BottomRight = 2; + rectRadius1.TopLeft = 2; + rectRadius1.TopRight = 6; + this.imgComboBoxCategory.Radius = rectRadius1; + this.imgComboBoxCategory.Text = null; + // + // frmFreedbSubmitDataBindingSource + // + this.frmFreedbSubmitDataBindingSource.DataSource = typeof(CUERipper.frmFreedbSubmitData); + // + // categoriesBindingSource + // + this.categoriesBindingSource.DataMember = "Categories"; + this.categoriesBindingSource.DataSource = this.frmFreedbSubmitDataBindingSource; + // + // buttonCancel + // + this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + resources.ApplyResources(this.buttonCancel, "buttonCancel"); + this.buttonCancel.Name = "buttonCancel"; + this.buttonCancel.UseVisualStyleBackColor = true; + // + // buttonOk + // + this.buttonOk.DialogResult = System.Windows.Forms.DialogResult.OK; + resources.ApplyResources(this.buttonOk, "buttonOk"); + this.buttonOk.Name = "buttonOk"; + this.buttonOk.UseVisualStyleBackColor = true; + // + // labelCategory + // + resources.ApplyResources(this.labelCategory, "labelCategory"); + this.labelCategory.Name = "labelCategory"; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.labelAT); + this.groupBox1.Controls.Add(this.labelEmail); + this.groupBox1.Controls.Add(this.textBoxDomain); + this.groupBox1.Controls.Add(this.textBoxUser); + this.groupBox1.Controls.Add(this.labelCategory); + this.groupBox1.Controls.Add(this.imgComboBoxCategory); + resources.ApplyResources(this.groupBox1, "groupBox1"); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.TabStop = false; + // + // labelAT + // + resources.ApplyResources(this.labelAT, "labelAT"); + this.labelAT.BackColor = System.Drawing.Color.Transparent; + this.labelAT.Name = "labelAT"; + // + // labelEmail + // + resources.ApplyResources(this.labelEmail, "labelEmail"); + this.labelEmail.Name = "labelEmail"; + // + // textBoxDomain + // + this.textBoxDomain.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.frmFreedbSubmitDataBindingSource, "Domain", true)); + resources.ApplyResources(this.textBoxDomain, "textBoxDomain"); + this.textBoxDomain.Name = "textBoxDomain"; + // + // textBoxUser + // + this.textBoxUser.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.frmFreedbSubmitDataBindingSource, "User", true)); + resources.ApplyResources(this.textBoxUser, "textBoxUser"); + this.textBoxUser.Name = "textBoxUser"; + // + // frmFreedbSubmit + // + this.AcceptButton = this.buttonOk; + resources.ApplyResources(this, "$this"); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.buttonCancel; + this.Controls.Add(this.groupBox1); + this.Controls.Add(this.buttonOk); + this.Controls.Add(this.buttonCancel); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "frmFreedbSubmit"; + this.Load += new System.EventHandler(this.frmFreedbSubmit_Load); + ((System.ComponentModel.ISupportInitialize)(this.frmFreedbSubmitDataBindingSource)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.categoriesBindingSource)).EndInit(); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private CUEControls.ImgComboBox imgComboBoxCategory; + private System.Windows.Forms.Button buttonCancel; + private System.Windows.Forms.Button buttonOk; + private System.Windows.Forms.Label labelCategory; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.TextBox textBoxDomain; + private System.Windows.Forms.TextBox textBoxUser; + private System.Windows.Forms.Label labelEmail; + private System.Windows.Forms.BindingSource frmFreedbSubmitDataBindingSource; + private System.Windows.Forms.BindingSource categoriesBindingSource; + private System.Windows.Forms.Label labelAT; + } +} \ No newline at end of file diff --git a/CUERipper/frmFreedbSubmit.cs b/CUERipper/frmFreedbSubmit.cs new file mode 100644 index 0000000..2f07cfe --- /dev/null +++ b/CUERipper/frmFreedbSubmit.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.Collections.Specialized; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; + +namespace CUERipper +{ + public partial class frmFreedbSubmit : Form + { + public frmFreedbSubmit() + { + InitializeComponent(); + Data = new frmFreedbSubmitData(); + } + + public frmFreedbSubmitData Data { get; set; } + + private void frmFreedbSubmit_Load(object sender, EventArgs e) + { + frmFreedbSubmitDataBindingSource.DataSource = Data; + } + } + + public class frmFreedbSubmitData + { + public frmFreedbSubmitData() { Categories = new BindingList(); } + public BindingList Categories { get; set; } + public string Category { get; set; } + public string User { get; set; } + public string Domain { get; set; } + } +} diff --git a/CUERipper/frmFreedbSubmit.resx b/CUERipper/frmFreedbSubmit.resx new file mode 100644 index 0000000..07ed5ff --- /dev/null +++ b/CUERipper/frmFreedbSubmit.resx @@ -0,0 +1,428 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + 268, 17 + + + + 91, 19 + + + 224, 21 + + + + 0 + + + imgComboBoxCategory + + + CUEControls.ImgComboBox, CUEControls, Version=2.0.9.0, Culture=neutral, PublicKeyToken=null + + + groupBox1 + + + 5 + + + 171, 159 + + + 75, 23 + + + 1 + + + Cancel + + + buttonCancel + + + System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 2 + + + 252, 159 + + + 75, 23 + + + 2 + + + Ok + + + buttonOk + + + System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 1 + + + True + + + 6, 22 + + + 49, 13 + + + 3 + + + Category + + + labelCategory + + + System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 4 + + + True + + + + NoControl + + + 180, 49 + + + 18, 13 + + + 7 + + + @ + + + labelAT + + + System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 0 + + + True + + + 6, 49 + + + 73, 13 + + + 6 + + + EMail address + + + labelEmail + + + System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 1 + + + 198, 46 + + + 117, 20 + + + 5 + + + textBoxDomain + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 2 + + + 91, 46 + + + 89, 20 + + + 4 + + + textBoxUser + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 3 + + + 12, 12 + + + 321, 128 + + + 4 + + + Settings + + + groupBox1 + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 0 + + + True + + + 6, 13 + + + 345, 201 + + + + AAABAAIAEBAAAAEACABoBQAAJgAAABAQAAABACAAaAQAAI4FAAAoAAAAEAAAACAAAAABAAgAAAAAAAAB + AAAAAAAAAAAAAAAAAAAAAAAAAAAAADsAAAA6AAEAPgAAAD4AAQBAAAEARAYGAEsQEABvAAIAdAACAHUA + AgB5AQMAegACAH8BAwB9CAoAfX19AIQCBACDCQsAiAoMAIMUFgCJFRcAjhYYAJEdHwCVJykAgICAAIKC + ggCmjIwAv4WGAL+/vwDAgoMAwoKDAMOFhgDq6uoA7OzsAPb29gD39/cA/Pz8AP///wAaAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAsSZN2AAAAAAAA1gDI+YMFAQAAAMAI + qAAGAMgDKv8AABwJqAAA3P1+YgBkACDkgwUBAAAAwPmDBeQIqABs8vp2ADb6dgAAAAAAAAAAAAAAAAA2 + +nZgCagAUkiTdgAAAAACEAAADAuoAAEAAAAYAAAAAAAAAEgJqABCAAAAAAAAACwJqAAAAAAAAAAAAAAA + AAAAAAAADAAAAAIAAAABAQAAAAAAAAAAAAAAAAAAAgAAAGoAGgLI+YMFd7QiAAAAAADI+YMFBQAAAIQJ + qAAqLJN24AUAAAAAAMCI+vp2g2NwdgAAOgMAAAAArAE6A6wJqAA+0zgAFQCwAEaFAAD9A/p2kSWTduAF + AAAAAAAAAAAAAAAAAADYCagA0NFMA3UM/3UDtfE9IDfvxv91EP//////ccf/xcngOAC5eTee8pmvmpmv + mvKa8pmvIAAAAK+a8pnJ4DgAJAqoAByDOwAMCqgAseA4ABgAAAABAAAA8pmvmpmvmvKvmvKZmvKZr/KZ + r5qZr5rymvKZr6+a8pkmAAAAJgAAAAwLqACICqgAh+E4AMBrPgAmAAAADAuoACYAAAAAADYAAAA2AAAA + NgBE/2EBRP9hAUT/YQFE/2EBMP9hAcz+YQHM/mEBMP9hAahiPgAgIzgAqGA+AAEAAACvmvKZrAqoALw9 + TQDgBQAA0NFMAyYAAAC4CqgAAAAAABoHBgUFBQUFBQUFBQUEAiYbEw4LCyAgIAsgICALCQgBHRQRDSIN + DSINIg0NIgwKAx4VEhAlEBAlECUQECUNCwUeFRIQECUlJRAlJSUQDQsFHhUSEBAQECUQJRAQEA0LBR4V + EhAQEBAlECUQEBANCwUeFRIQEBAQEBAQEBAQDQsFJSUlJSUlJSUlJSUlJSIgDyUVJSUQJSUlEBAlJSUN + Cw8lFSUlECUlECUlJSUQIiAPJRUlJRAlJRAQEBAlEA0LBSUVEiUQJSUQJSUQJRAiIAUlFiUlEhIlJRIS + JSUlEQ4YJRclJSUlJSUlJSUlJSMhGSUlHyUlJSUlJSUlJSUkIxwAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKAAAABAAAAAgAAAAAQAgAAAA + AABABAAAAAAAAAAAAAAAAAAAAAAAAKaMjP9LEBD/RAYG/0AAAf9AAAH/QAAB/0AAAf9AAAH/QAAB/0AA + Af9AAAH/QAAB/0AAAf8+AAH/OgAB/xoAAP+/hYb/gxQW/30ICv95AQP/eQED/+rq6v/q6ur/6urq/3kB + A//q6ur/6urq/+rq6v95AQP/dAAC/28AAv87AAD/wIKD/4kVF/+DCQv/fwED//b29v9/AQP/fwED//b2 + 9v9/AQP/9vb2/38BA/9/AQP/9vb2/3oAAv91AAL/PgAA/8KCg/+OFhj/iAoM/4QCBP//////hAIE/4QC + BP//////hAIE//////+EAgT/hAIE//////9/AQP/eQED/0AAAf/CgoP/jhYY/4gKDP+EAgT/hAIE//// + /////////////4QCBP////////////////+EAgT/fwED/3kBA/9AAAH/woKD/44WGP+ICgz/hAIE/4QC + BP+EAgT/hAIE//////+EAgT//////4QCBP+EAgT/hAIE/38BA/95AQP/QAAB/8KCg/+OFhj/iAoM/4QC + BP+EAgT/hAIE/4QCBP//////hAIE//////+EAgT/hAIE/4QCBP9/AQP/eQED/0AAAf/CgoP/jhYY/4gK + DP+EAgT/hAIE/4QCBP+EAgT/hAIE/4QCBP+EAgT/hAIE/4QCBP+EAgT/fwED/3kBA/9AAAH///////// + //////////////////////////////////////////////////////////////b29v/q6ur/fX19//// + //+OFhj///////////+EAgT/////////////////hAIE/4QCBP////////////////9/AQP/eQED/319 + ff//////jhYY////////////hAIE////////////hAIE//////////////////////+EAgT/9vb2/+rq + 6v99fX3//////44WGP///////////4QCBP///////////4QCBP+EAgT/hAIE/4QCBP//////hAIE/38B + A/95AQP/QAAB//////+OFhj/iAoM//////+EAgT///////////+EAgT///////////+EAgT//////4QC + BP/29vb/6urq/0AAAf//////kR0f////////////iAoM/4gKDP///////////4gKDP+ICgz///////// + ////////gwkL/30ICv+AgID//////5UnKf////////////////////////////////////////////// + //////////////f39//s7Oz/goKC////////////w4WG//////////////////////////////////// + ///////////////////8/Pz/9/f3/7+/v/8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + + + + CenterParent + + + Submit to freedb + + + frmFreedbSubmitDataBindingSource + + + System.Windows.Forms.BindingSource, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + categoriesBindingSource + + + System.Windows.Forms.BindingSource, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + frmFreedbSubmit + + + System.Windows.Forms.Form, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/CUETools.ALACEnc/Program.cs b/CUETools.ALACEnc/Program.cs index 165a80e..381212f 100644 --- a/CUETools.ALACEnc/Program.cs +++ b/CUETools.ALACEnc/Program.cs @@ -203,11 +203,11 @@ namespace CUETools.ALACEnc if (estimation_depth >= 0) alac.EstimationDepth = estimation_depth; if (padding >= 0) - alac.PaddingLength = padding; + alac.Padding = padding; if (adaptive_passes >= 0) alac.AdaptivePasses = adaptive_passes; alac.DoSeekTable = do_seektable; - alac.DoVerify = do_verify; + (alac.Settings as ALACWriterSettings).DoVerify = do_verify; } catch (Exception ex) { diff --git a/CUETools.ARCUE/Properties/AssemblyInfo.cs b/CUETools.ARCUE/Properties/AssemblyInfo.cs index 1f56ed1..132549b 100644 --- a/CUETools.ARCUE/Properties/AssemblyInfo.cs +++ b/CUETools.ARCUE/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("2.0.8.0")] -[assembly: AssemblyFileVersion("2.0.8.0")] +[assembly: AssemblyVersion("2.0.9.0")] +[assembly: AssemblyFileVersion("2.0.9.0")] diff --git a/CUETools.AccurateRip/AccurateRip.cs b/CUETools.AccurateRip/AccurateRip.cs index 220adce..96caf7c 100644 --- a/CUETools.AccurateRip/AccurateRip.cs +++ b/CUETools.AccurateRip/AccurateRip.cs @@ -35,23 +35,23 @@ namespace CUETools.AccurateRip public uint WorstTotal() { - uint worstTotal = 0; + uint worstTotal = 0xffff; for (int iTrack = 0; iTrack < _toc.AudioTracks; iTrack++) { uint sumTotal = Total(iTrack); - if (iTrack == 0 || worstTotal > sumTotal) + if (worstTotal > sumTotal && sumTotal != 0) worstTotal = sumTotal; } - return worstTotal; + return worstTotal == 0xffff ? 0 : worstTotal; } public uint WorstConfidence() { - uint worstConfidence = 0; + uint worstConfidence = 0xffff; for (int iTrack = 0; iTrack < _toc.AudioTracks; iTrack++) { uint sumConfidence = SumConfidence(iTrack); - if (iTrack == 0 || worstConfidence > sumConfidence) + if (worstConfidence > sumConfidence && (Total(iTrack) != 0 || CRC(iTrack) != 0)) worstConfidence = sumConfidence; } return worstConfidence; @@ -688,6 +688,7 @@ namespace CUETools.AccurateRip string[] n = accurateRipId.Split('-'); if (n.Length != 3) { + ExceptionStatus = WebExceptionStatus.RequestCanceled; throw new Exception("Invalid accurateRipId."); } discId1 = UInt32.Parse(n[0], NumberStyles.HexNumber); @@ -703,13 +704,15 @@ namespace CUETools.AccurateRip try { - HttpWebResponse resp = (HttpWebResponse)req.GetResponse(); - _accResult = resp.StatusCode; - - if (_accResult == HttpStatusCode.OK) + HttpWebResponse response = (HttpWebResponse)req.GetResponse(); + ExceptionStatus = WebExceptionStatus.ProtocolError; + ResponseStatus = response.StatusCode; + if (ResponseStatus == HttpStatusCode.OK) { + ExceptionStatus = WebExceptionStatus.Success; + // Retrieve response stream and wrap in StreamReader - Stream respStream = resp.GetResponseStream(); + Stream respStream = response.GetResponseStream(); // Allocate byte buffer to hold stream contents byte[] urlData = new byte[13]; @@ -728,7 +731,7 @@ namespace CUETools.AccurateRip break; if (urlDataLen < 13) { - _accResult = HttpStatusCode.PartialContent; + ExceptionStatus = WebExceptionStatus.ReceiveFailure; return; } AccDisk dsk = new AccDisk(); @@ -744,7 +747,7 @@ namespace CUETools.AccurateRip bytesRead = respStream.Read(urlData, urlDataLen, 9 - urlDataLen); if (0 == bytesRead) { - _accResult = HttpStatusCode.PartialContent; + ExceptionStatus = WebExceptionStatus.ReceiveFailure; return; } } @@ -761,10 +764,10 @@ namespace CUETools.AccurateRip } catch (WebException ex) { - if (ex.Status == WebExceptionStatus.ProtocolError) - _accResult = ((HttpWebResponse)ex.Response).StatusCode; - else - _accResult = HttpStatusCode.BadRequest; + ExceptionStatus = ex.Status; + ExceptionMessage = ex.Message; + if (ExceptionStatus == WebExceptionStatus.ProtocolError) + ResponseStatus = (ex.Response as HttpWebResponse).StatusCode; } } @@ -785,15 +788,24 @@ namespace CUETools.AccurateRip set { } } - public string Options + public object Settings { + get + { + return null; + } set { - if (value == null || value == "") return; - throw new Exception("Unsupported options " + value); + if (value != null && value.GetType() != typeof(object)) + throw new Exception("Unsupported options " + value); } } + public long Padding + { + set { } + } + public AudioPCMConfig PCM { get { return AudioPCMConfig.RedBook; } @@ -824,6 +836,11 @@ namespace CUETools.AccurateRip public void GenerateLog(TextWriter sw, int oi) { + uint maxTotal = 0; + for (int iTrack = 0; iTrack < _toc.AudioTracks; iTrack++) + maxTotal = Math.Max(maxTotal, Total(iTrack)); + string ifmt = maxTotal < 10 ? ":0" : maxTotal < 100 ? ":00" : ":000"; + //string ifmt = maxTotal < 10 ? ",1" : maxTotal < 100 ? ",2" : ",3"; for (int iTrack = 0; iTrack < _toc.AudioTracks; iTrack++) { uint count = 0; @@ -842,34 +859,23 @@ namespace CUETools.AccurateRip && 0 != AccDisks[di].tracks[trno].Frame450CRC) partials += AccDisks[di].tracks[trno].count; } - if (conf > 0) - sw.WriteLine(String.Format(" {0:00}\t[{1:x8}] ({3:00}/{2:00}) Accurately ripped", iTrack + 1, CRC(iTrack, oi), count, conf)); + if (conf > 0 || (count == 0 && CRC(iTrack, oi) == 0)) + sw.WriteLine(String.Format(" {0:00} [{1:x8}] ({3" + ifmt + "}/{2" + ifmt + "}) Accurately ripped", iTrack + 1, CRC(iTrack, oi), count, conf)); else if (partials > 0) - sw.WriteLine(String.Format(" {0:00}\t[{1:x8}] ({3:00}/{2:00}) No match but offset", iTrack + 1, CRC(iTrack, oi), count, partials)); + sw.WriteLine(String.Format(" {0:00} [{1:x8}] ({3" + ifmt + "}/{2" + ifmt + "}) No match but offset", iTrack + 1, CRC(iTrack, oi), count, partials)); else - sw.WriteLine(String.Format(" {0:00}\t[{1:x8}] (00/{2:00}) No match", iTrack + 1, CRC(iTrack, oi), count)); + sw.WriteLine(String.Format(" {0:00} [{1:x8}] ({3" + ifmt + "}/{2" + ifmt + "}) No match", iTrack + 1, CRC(iTrack, oi), count, 0)); } } - public void GenerateFullLog(TextWriter sw, bool verbose) + public void GenerateFullLog(TextWriter sw, bool verbose, string id) { - if (AccResult == HttpStatusCode.NotFound) - { - sw.WriteLine("Disk not present in database."); - //for (iTrack = 0; iTrack < TrackCount; iTrack++) - // sw.WriteLine(String.Format(" {0:00}\t[{1:x8}] Disk not present in database", iTrack + 1, _tracks[iTrack].CRC)); - } - else if (AccResult != HttpStatusCode.OK) - { - sw.WriteLine("Database access error: " + AccResult.ToString()); - //for (iTrack = 0; iTrack < TrackCount; iTrack++) - // sw.WriteLine(String.Format(" {0:00}\t[{1:x8}] Database access error {2}", iTrack + 1, _tracks[iTrack].CRC, accResult.ToString())); - } - else + sw.WriteLine("[AccurateRip ID: {0}] {1}.", id, ARStatus ?? "found"); + if (ExceptionStatus == WebExceptionStatus.Success) { if (verbose) { - sw.WriteLine("Track\t[ CRC ] Status"); + sw.WriteLine("Track [ CRC ] Status"); GenerateLog(sw, 0); uint offsets_match = 0; for (int oi = -_arOffsetRange; oi <= _arOffsetRange; oi++) @@ -879,8 +885,8 @@ namespace CUETools.AccurateRip { int trno = iTrack + _toc.FirstAudio - 1; for (int di = 0; di < (int)AccDisks.Count; di++) - if (trno < AccDisks[di].tracks.Count - && (CRC(iTrack, oi) == AccDisks[di].tracks[trno].CRC + if (trno < AccDisks[di].tracks.Count + && (CRC(iTrack, oi) == AccDisks[di].tracks[trno].CRC && AccDisks[di].tracks[trno].CRC != 0)) { matches++; @@ -907,14 +913,14 @@ namespace CUETools.AccurateRip { int trno = iTrack + _toc.FirstAudio - 1; if (trno < AccDisks[di].tracks.Count - && (CRC(iTrack, oi) == AccDisks[di].tracks[trno].CRC + && (CRC(iTrack, oi) == AccDisks[di].tracks[trno].CRC && AccDisks[di].tracks[trno].CRC != 0)) { matches++; break; } if (trno < AccDisks[di].tracks.Count - && (CRC450(iTrack, oi) == AccDisks[di].tracks[trno].Frame450CRC + && (CRC450(iTrack, oi) == AccDisks[di].tracks[trno].Frame450CRC && AccDisks[di].tracks[trno].Frame450CRC != 0)) partials++; } @@ -932,7 +938,7 @@ namespace CUETools.AccurateRip } else { - sw.WriteLine("Track\t Status"); + sw.WriteLine("Track Status"); for (int iTrack = 0; iTrack < _toc.AudioTracks; iTrack++) { uint total = Total(iTrack); @@ -944,7 +950,7 @@ namespace CUETools.AccurateRip { int trno = iTrack + _toc.FirstAudio - 1; if (trno < AccDisks[iDisk].tracks.Count - && CRC(iTrack, oi) == AccDisks[iDisk].tracks[trno].CRC + && CRC(iTrack, oi) == AccDisks[iDisk].tracks[trno].CRC && (AccDisks[iDisk].tracks[trno].CRC != 0 || oi == 0)) { conf += AccDisks[iDisk].tracks[trno].count; @@ -954,15 +960,15 @@ namespace CUETools.AccurateRip } } if (conf > 0 && zeroOffset && pressings.Length == 0) - sw.WriteLine(String.Format(" {0:00}\t ({2:00}/{1:00}) Accurately ripped", iTrack + 1, total, conf)); + sw.WriteLine(String.Format(" {0:00} ({2:00}/{1:00}) Accurately ripped", iTrack + 1, total, conf)); else if (conf > 0 && zeroOffset) - sw.WriteLine(String.Format(" {0:00}\t ({2:00}/{1:00}) Accurately ripped, all offset(s) {3}", iTrack + 1, total, conf, pressings)); + sw.WriteLine(String.Format(" {0:00} ({2:00}/{1:00}) Accurately ripped, all offset(s) {3}", iTrack + 1, total, conf, pressings)); else if (conf > 0) - sw.WriteLine(String.Format(" {0:00}\t ({2:00}/{1:00}) Accurately ripped with offset(s) {3}", iTrack + 1, total, conf, pressings)); + sw.WriteLine(String.Format(" {0:00} ({2:00}/{1:00}) Accurately ripped with offset(s) {3}", iTrack + 1, total, conf, pressings)); else if (total > 0) - sw.WriteLine(String.Format(" {0:00}\t (00/{1:00}) NOT ACCURATE", iTrack + 1, total)); + sw.WriteLine(String.Format(" {0:00} (00/{1:00}) NOT ACCURATE", iTrack + 1, total)); else - sw.WriteLine(String.Format(" {0:00}\t (00/00) Track not present in database", iTrack + 1)); + sw.WriteLine(String.Format(" {0:00} (00/00) Track not present in database", iTrack + 1)); } } } @@ -1150,21 +1156,17 @@ namespace CUETools.AccurateRip } } - public HttpStatusCode AccResult - { - get - { - return _accResult; - } - } - + private string ExceptionMessage; + public HttpStatusCode ResponseStatus { get; set; } + public WebExceptionStatus ExceptionStatus { get; set; } public string ARStatus { get { - return _accResult == HttpStatusCode.NotFound ? "disk not present in database" : - _accResult == HttpStatusCode.OK ? null - : _accResult.ToString(); + return ExceptionStatus == WebExceptionStatus.Success ? null : + ExceptionStatus != WebExceptionStatus.ProtocolError ? ("database access error: " + (ExceptionMessage ?? ExceptionStatus.ToString())) : + ResponseStatus != HttpStatusCode.NotFound ? "database access error: " + ResponseStatus.ToString() : + "disk not present in database"; } } @@ -1172,7 +1174,6 @@ namespace CUETools.AccurateRip long _sampleCount, _finalSampleCount; int _currentTrack; private List _accDisks; - private HttpStatusCode _accResult; internal uint[,] _CRCAR; internal uint[,] _CRCSM; internal uint[,] _CRC32; diff --git a/CUETools.AccurateRip/CDRepair.cs b/CUETools.AccurateRip/CDRepair.cs index 079fb97..c483b99 100644 --- a/CUETools.AccurateRip/CDRepair.cs +++ b/CUETools.AccurateRip/CDRepair.cs @@ -615,15 +615,24 @@ namespace CUETools.AccurateRip set { } } - public string Options + public object Settings { + get + { + return null; + } set { - if (value == null || value == "") return; - throw new Exception("Unsupported options " + value); + if (value != null && value.GetType() != typeof(object)) + throw new Exception("Unsupported options " + value); } } + public long Padding + { + set { } + } + public AudioPCMConfig PCM { get { return AudioPCMConfig.RedBook; } diff --git a/CUETools.AccurateRip/Properties/AssemblyInfo.cs b/CUETools.AccurateRip/Properties/AssemblyInfo.cs index 2070ac8..299631f 100644 --- a/CUETools.AccurateRip/Properties/AssemblyInfo.cs +++ b/CUETools.AccurateRip/Properties/AssemblyInfo.cs @@ -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("2.0.8.0")] -[assembly: AssemblyFileVersion("2.0.8.0")] +[assembly: AssemblyVersion("2.0.9.0")] +[assembly: AssemblyFileVersion("2.0.9.0")] diff --git a/CUETools.CDImage/Properties/AssemblyInfo.cs b/CUETools.CDImage/Properties/AssemblyInfo.cs index a0ad9ac..e5ce9a1 100644 --- a/CUETools.CDImage/Properties/AssemblyInfo.cs +++ b/CUETools.CDImage/Properties/AssemblyInfo.cs @@ -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("2.0.8.0")] -[assembly: AssemblyFileVersion("2.0.8.0")] +[assembly: AssemblyVersion("2.0.9.0")] +[assembly: AssemblyFileVersion("2.0.9.0")] diff --git a/CUETools.CTDB/CUEToolsDB.cs b/CUETools.CTDB/CUEToolsDB.cs index 4cb7301..8ac27d9 100644 --- a/CUETools.CTDB/CUEToolsDB.cs +++ b/CUETools.CTDB/CUEToolsDB.cs @@ -372,6 +372,18 @@ namespace CUETools.CTDB verify = new CDRepairEncode(ar, 10 * 588 * 2, npar, entries.Count > 0, encode); } + public CDImageLayout TOC + { + get + { + return toc; + } + set + { + toc = value; + } + } + public int Total { get @@ -402,6 +414,10 @@ namespace CUETools.CTDB { return subResult; } + set + { + subResult = value; + } } public string DBStatus diff --git a/CUETools.Codecs.ALAC/ALACWriter.cs b/CUETools.Codecs.ALAC/ALACWriter.cs index 5db38fd..2e24dd0 100644 --- a/CUETools.Codecs.ALAC/ALACWriter.cs +++ b/CUETools.Codecs.ALAC/ALACWriter.cs @@ -22,6 +22,7 @@ #define INTEROP using System; +using System.ComponentModel; using System.Text; using System.IO; using System.Collections.Generic; @@ -32,7 +33,16 @@ using CUETools.Codecs; namespace CUETools.Codecs.ALAC { - [AudioEncoderClass("libALAC", "m4a", true, "0 1 2 3 4 5 6 7 8 9 10", "3", 1)] + public class ALACWriterSettings + { + public ALACWriterSettings() { DoVerify = false; } + [DefaultValue(false)] + [DisplayName("Verify")] + [Description("Decode each frame and compare with original")] + public bool DoVerify { get; set; } + } + + [AudioEncoderClass("libALAC", "m4a", true, "0 1 2 3 4 5 6 7 8 9 10", "3", 1, typeof(ALACWriterSettings))] public class ALACWriter : IAudioDest { Stream _IO = null; @@ -128,18 +138,6 @@ namespace CUETools.Codecs.ALAC } } - public int PaddingLength - { - get - { - return eparams.padding_size; - } - set - { - eparams.padding_size = value; - } - } - public int CompressionLevel { get @@ -155,26 +153,31 @@ namespace CUETools.Codecs.ALAC } } - public string Options + ALACWriterSettings _settings = new ALACWriterSettings(); + + public object Settings { + get + { + return _settings; + } set { - if (value == null || value == "") return; - string[] args = value.Split(); - for (int i = 0; i < args.Length; i++) - { - if (args[i] == "--padding-length" && (++i) < args.Length) - { - PaddingLength = int.Parse(args[i]); - continue; - } - if (args[i] == "--verify") - { - DoVerify = true; - continue; - } + if (value as ALACWriterSettings == null) throw new Exception("Unsupported options " + value); - } + _settings = value as ALACWriterSettings; + } + } + + public long Padding + { + get + { + return eparams.padding_size; + } + set + { + eparams.padding_size = (int)value; } } @@ -333,12 +336,6 @@ namespace CUETools.Codecs.ALAC set { eparams.window_function = value; } } - public bool DoVerify - { - get { return eparams.do_verify; } - set { eparams.do_verify = value; } - } - public bool DoSeekTable { get { return eparams.do_seektable; } @@ -1625,7 +1622,7 @@ namespace CUETools.Codecs.ALAC frame_buffer = new byte[max_frame_size]; _sample_byte_size = new uint[Math.Max(0x100, sample_count / eparams.block_size + 1)]; - if (eparams.do_verify) + if (_settings.DoVerify) { verify = new ALACReader(_pcm, history_mult, initial_history, k_modifier, eparams.block_size); verifyBuffer = new int[Alac.MAX_BLOCKSIZE * _pcm.ChannelCount]; @@ -1721,7 +1718,6 @@ namespace CUETools.Codecs.ALAC public WindowFunction window_function; - public bool do_verify; public bool do_seektable; public int set_defaults(int lvl) @@ -1746,7 +1742,6 @@ namespace CUETools.Codecs.ALAC max_prediction_order = 12; estimation_depth = 1; adaptive_passes = 0; - do_verify = false; do_seektable = false; chunk_size = 5; diff --git a/CUETools.Codecs.ALAC/Properties/AssemblyInfo.cs b/CUETools.Codecs.ALAC/Properties/AssemblyInfo.cs index e6ee527..c330398 100644 --- a/CUETools.Codecs.ALAC/Properties/AssemblyInfo.cs +++ b/CUETools.Codecs.ALAC/Properties/AssemblyInfo.cs @@ -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("2.0.8.0")] -[assembly: AssemblyFileVersion("2.0.8.0")] +[assembly: AssemblyVersion("2.0.9.0")] +[assembly: AssemblyFileVersion("2.0.9.0")] diff --git a/CUETools.Codecs.APE/CUETools.Codecs.APE.cpp b/CUETools.Codecs.APE/CUETools.Codecs.APE.cpp index 9d5606f..09fd21e 100644 --- a/CUETools.Codecs.APE/CUETools.Codecs.APE.cpp +++ b/CUETools.Codecs.APE/CUETools.Codecs.APE.cpp @@ -252,7 +252,7 @@ namespace CUETools { namespace Codecs { namespace APE { } }; - [AudioEncoderClass("MAC_SDK", "ape", true, "fast normal high extra insane", "high", 1)] + [AudioEncoderClass("MAC_SDK", "ape", true, "fast normal high extra insane", "high", 1, Object::typeid)] public ref class APEWriter : IAudioDest { public: @@ -366,18 +366,28 @@ namespace CUETools { namespace Codecs { namespace APE { return _compressionLevel / 1000 - 1; } void set(Int32 value) { - if ((value < 0) || (value > 4)) { + if (value < 0 || value > 4) throw gcnew Exception("Invalid compression mode."); - } _compressionLevel = (value + 1) * 1000; } } - virtual property String^ Options + virtual property __int64 Padding { - void set(String^ value) + void set(__int64 value) { + } + } + + virtual property Object^ Settings + { + Object^ get() { - if (value == nullptr || value == "") return; + return nullptr; + } + + void set(Object^ value) + { + if (value != nullptr && value->GetType() != Object::typeid) throw gcnew Exception(String::Format("Unsupported options: {0}", value)); } } diff --git a/CUETools.Codecs.CoreAudio/WasapiOut.cs b/CUETools.Codecs.CoreAudio/WasapiOut.cs index cbc4d20..71a2792 100644 --- a/CUETools.Codecs.CoreAudio/WasapiOut.cs +++ b/CUETools.Codecs.CoreAudio/WasapiOut.cs @@ -500,15 +500,24 @@ namespace CUETools.Codecs.CoreAudio set { } } - public string Options + public object Settings { + get + { + return null; + } set { - if (value == null || value == "") return; - throw new Exception("Unsupported options " + value); + if (value != null && value.GetType() != typeof(object)) + throw new Exception("Unsupported options " + value); } } + public long Padding + { + set { } + } + public AudioPCMConfig PCM { get { return pcm; } diff --git a/CUETools.Codecs.FLAC/CUETools.Codecs.FLAC.cpp b/CUETools.Codecs.FLAC/CUETools.Codecs.FLAC.cpp index b9cdc7f..4241c77 100644 --- a/CUETools.Codecs.FLAC/CUETools.Codecs.FLAC.cpp +++ b/CUETools.Codecs.FLAC/CUETools.Codecs.FLAC.cpp @@ -30,6 +30,7 @@ // **************************************************************************** using namespace System; +using namespace System::ComponentModel; using namespace System::Text; using namespace System::IO; using namespace System::Collections::Generic; @@ -49,6 +50,10 @@ struct FLAC__Metadata_Chain int dummy; }; +extern "C" { + FLAC_API FLAC__bool FLAC__stream_encoder_set_do_md5(FLAC__StreamEncoder *encoder, FLAC__bool value); +} + namespace CUETools { namespace Codecs { namespace FLAC { [UnmanagedFunctionPointer(CallingConvention::Cdecl)] public delegate FLAC__StreamDecoderWriteStatus DecoderWriteDelegate(const FLAC__StreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *client_data); @@ -440,7 +445,57 @@ namespace CUETools { namespace Codecs { namespace FLAC { } }; - [AudioEncoderClass("libFLAC", "flac", true, "0 1 2 3 4 5 6 7 8", "5", 1)] + public ref class FLACWriterSettings + { + public: + FLACWriterSettings() + { + _md5Sum = true; + _verify = false; + _disableAsm = false; + } + + [DefaultValue(false)] + [DisplayName("Verify")] + [Description("Decode each frame and compare with original")] + property bool Verify { + bool get() { + return _verify; + } + void set(bool value) { + _verify = value; + } + } + + [DefaultValue(true)] + [DisplayName("MD5")] + [Description("Calculate MD5 hash for audio stream")] + property bool MD5Sum { + bool get() { + return _md5Sum; + } + void set(bool value) { + _md5Sum = value; + } + } + + [DefaultValue(false)] + [DisplayName("Disable ASM")] + [Description("Disable MMX/SSE optimizations")] + property bool DisableAsm { + bool get() { + return _disableAsm; + } + void set(bool value) { + _disableAsm = value; + } + } + + private: + bool _md5Sum, _verify, _disableAsm; + }; + + [AudioEncoderClass("libFLAC", "flac", true, "0 1 2 3 4 5 6 7 8", "5", 2, FLACWriterSettings::typeid)] public ref class FLACWriter : IAudioDest { public: @@ -448,17 +503,17 @@ namespace CUETools { namespace Codecs { namespace FLAC { { _pcm = pcm; + _settings = gcnew FLACWriterSettings(); + if (_pcm->BitsPerSample < 16 || _pcm->BitsPerSample > 24) throw gcnew Exception("bits per sample must be 16..24"); _initialized = false; - _disableAsm = false; _path = path; _finalSampleCount = 0; _samplesWritten = 0; _compressionLevel = 5; _paddingLength = 8192; - _verify = false; _blockSize = 0; _encoder = FLAC__stream_encoder_new(); @@ -561,57 +616,26 @@ namespace CUETools { namespace Codecs { namespace FLAC { } } - virtual property String^ Options + virtual property Object^ Settings { - void set(String^ value) + Object^ get() { - if (value == nullptr || value == "") return; - cli::array^ args = value->Split(); - for (int i = 0; i < args->Length; i++) - { - if (args[i] == "--padding-length" && (++i) < args->Length) - { - PaddingLength = Int32::Parse(args[i]); - continue; - } - if (args[i] == "--disable-asm") - { - DisableAsm = true; - continue; - } - if (args[i] == "--verify") - { - Verify = true; - continue; - } - throw gcnew Exception(String::Format("unsupported options: {0}", value)); - } + return _settings; + } + + void set(Object^ value) + { + if (value == nullptr || value->GetType() != FLACWriterSettings::typeid) + throw gcnew Exception(String::Format("Unsupported options: {0}", value)); + _settings = (FLACWriterSettings^)value; } } - property Boolean Verify { - Boolean get() { - return _verify; - } - void set(Boolean value) { - _verify = value; - } - } - - property Boolean DisableAsm { - Boolean get() { - return _disableAsm; - } - void set(Boolean value) { - _disableAsm = value; - } - } - - property Int32 PaddingLength { - Int32 get() { + virtual property __int64 Padding { + __int64 get() { return _paddingLength; } - void set(Int32 value) { + void set(__int64 value) { if (value < 0) throw gcnew Exception("invalid padding length"); _paddingLength = value; @@ -619,17 +643,16 @@ namespace CUETools { namespace Codecs { namespace FLAC { } private: + FLACWriterSettings^ _settings; FLAC__StreamEncoder *_encoder; bool _initialized; String^ _path; Int64 _finalSampleCount, _samplesWritten, _blockSize; AudioPCMConfig^ _pcm; Int32 _compressionLevel; - Int32 _paddingLength; - Boolean _verify; + __int64 _paddingLength; FLAC__StreamMetadata **_metadataList; int _metadataCount; - bool _disableAsm; void Initialize() { FLAC__StreamMetadata *padding, *seektable, *vorbiscomment; @@ -684,15 +707,17 @@ namespace CUETools { namespace Codecs { namespace FLAC { if (_paddingLength != 0) { padding = FLAC__metadata_object_new(FLAC__METADATA_TYPE_PADDING); - padding->length = _paddingLength; + padding->length = (int)_paddingLength; _metadataList[_metadataCount++] = padding; } FLAC__stream_encoder_set_metadata(_encoder, _metadataList, _metadataCount); - FLAC__stream_encoder_set_verify(_encoder, _verify); + FLAC__stream_encoder_set_verify(_encoder, _settings->Verify); - FLAC__stream_encoder_set_disable_asm(_encoder, _disableAsm); + FLAC__stream_encoder_set_do_md5(_encoder, _settings->MD5Sum); + + FLAC__stream_encoder_set_disable_asm(_encoder, _settings->DisableAsm); if (_finalSampleCount != 0) { FLAC__stream_encoder_set_total_samples_estimate(_encoder, _finalSampleCount); diff --git a/CUETools.Codecs.FLAKE/CUETools.Codecs.FLAKE.csproj b/CUETools.Codecs.FLAKE/CUETools.Codecs.FLAKE.csproj index ab048e4..bda4aaf 100644 --- a/CUETools.Codecs.FLAKE/CUETools.Codecs.FLAKE.csproj +++ b/CUETools.Codecs.FLAKE/CUETools.Codecs.FLAKE.csproj @@ -44,6 +44,11 @@ + + True + True + Resources.resx + @@ -52,6 +57,13 @@ False + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Calculate MD5 hash for audio stream + + + Decode each frame and compare with original + + + Samples written differs from the expected sample count + + + Validation failed + + \ No newline at end of file diff --git a/CUETools.Codecs.FLAKE/Properties/Resources.ru-RU.resx b/CUETools.Codecs.FLAKE/Properties/Resources.ru-RU.resx new file mode 100644 index 0000000..53a8fcd --- /dev/null +++ b/CUETools.Codecs.FLAKE/Properties/Resources.ru-RU.resx @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Вычислять MD5-хеш аудиопотока + + + Декодировать каждый блок и сравнивать с оригиналом + + + Количество записанных сэмплов отличается от ожидавшегося + + + Ошибка верификации + + \ No newline at end of file diff --git a/CUETools.Codecs.FlaCuda/CUETools.Codecs.FlaCuda.csproj b/CUETools.Codecs.FlaCuda/CUETools.Codecs.FlaCuda.csproj index 62199c0..c15817d 100644 --- a/CUETools.Codecs.FlaCuda/CUETools.Codecs.FlaCuda.csproj +++ b/CUETools.Codecs.FlaCuda/CUETools.Codecs.FlaCuda.csproj @@ -46,6 +46,11 @@ + + True + True + Resources.resx + @@ -64,6 +69,11 @@ + + ResXFileCodeGenerator + Resources.Designer.cs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Use additional CPU threads + + + Use GPU on all stages + + + Calculate MD5 hash for audio stream + + + Decode each frame and compare with original + + + Samples written differs from the expected sample count + + + Validation failed + + \ No newline at end of file diff --git a/CUETools.Codecs.FlaCuda/Properties/Resources.ru-RU.resx b/CUETools.Codecs.FlaCuda/Properties/Resources.ru-RU.resx new file mode 100644 index 0000000..5f87a8e --- /dev/null +++ b/CUETools.Codecs.FlaCuda/Properties/Resources.ru-RU.resx @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Использовать дополнительные потоки + + + Использовать GPU на всех стадиях + + + Вычислять MD5-хеш аудиопотока + + + Декодировать каждый блок и сравнивать с оригиналом + + + Количество записанных сэмплов отличается от ожидавшегося + + + Ошибка верификации + + \ No newline at end of file diff --git a/CUETools.Codecs.HDCD/HDCDDotNet.cs b/CUETools.Codecs.HDCD/HDCDDotNet.cs index fb53412..aeaed15 100644 --- a/CUETools.Codecs.HDCD/HDCDDotNet.cs +++ b/CUETools.Codecs.HDCD/HDCDDotNet.cs @@ -99,11 +99,17 @@ namespace HDCDDotNet get { throw new Exception("unsupported"); } } - public string Options + public long Padding { set { throw new Exception("unsupported"); } } + public object Settings + { + get { throw new Exception("unsupported"); } + set { throw new Exception("unsupported"); } + } + public int CompressionLevel { get { throw new Exception("unsupported"); } diff --git a/CUETools.Codecs.Icecast/IcecastWriter.cs b/CUETools.Codecs.Icecast/IcecastWriter.cs index a93522d..3ec247b 100644 --- a/CUETools.Codecs.Icecast/IcecastWriter.cs +++ b/CUETools.Codecs.Icecast/IcecastWriter.cs @@ -81,7 +81,9 @@ namespace CUETools.Codecs.Icecast if (resp.StatusCode == HttpStatusCode.OK) { encoder = new CUETools.Codecs.LAME.LAMEEncoderCBR("", reqStream, AudioPCMConfig.RedBook); - encoder.Options = settings.MP3Options; + (encoder.Settings as CUETools.Codecs.LAME.LAMEEncoderCBRSettings).StereoMode = settings.JointStereo ? + CUETools.Codecs.LAME.MpegMode.JOINT_STEREO : CUETools.Codecs.LAME.MpegMode.STEREO; + (encoder.Settings as CUETools.Codecs.LAME.LAMEEncoderCBRSettings).CustomBitrate = settings.Bitrate; } } catch (WebException ex) @@ -214,14 +216,24 @@ namespace CUETools.Codecs.Icecast set { } } - public string Options + public object Settings { + get + { + return null; + } set { - if (value == null || value == "") return; - throw new Exception("Unsupported options " + value); + if (value != null && value.GetType() != typeof(object)) + throw new Exception("Unsupported options " + value); } } + + public long Padding + { + set { } + } + public AudioPCMConfig PCM { get { return pcm; } @@ -241,24 +253,30 @@ namespace CUETools.Codecs.Icecast public class IcecastSettingsData { + public IcecastSettingsData() + { + Port = "8000"; + Bitrate = 192; + JointStereo = true; + } + private string server; - private string port = "8000"; private string password; private string mount; private string name; private string description; private string url; private string genre; - private string mp3Options = "-m j -b 192"; public string Server { get { return server; } set { server = value; } } - public string Port { get { return port; } set { port = value; } } + public string Port { get; set; } public string Password { get { return password; } set { password = value; } } public string Mount { get { return mount; } set { mount = value; } } public string Name { get { return name; } set { name = value; } } public string Desctiption { get { return description; } set { description = value; } } public string Url { get { return url; } set { url = value; } } public string Genre { get { return genre; } set { genre = value; } } - public string MP3Options { get { return mp3Options; } set { mp3Options = value; } } + public int Bitrate { get; set; } + public bool JointStereo { get; set; } } } diff --git a/CUETools.Codecs.LAME/Encoder.cs b/CUETools.Codecs.LAME/Encoder.cs index a608d6d..9b80105 100644 --- a/CUETools.Codecs.LAME/Encoder.cs +++ b/CUETools.Codecs.LAME/Encoder.cs @@ -1,4 +1,5 @@ using System; +using System.ComponentModel; using System.Collections.Generic; using System.Text; using System.IO; @@ -210,15 +211,24 @@ namespace CUETools.Codecs.LAME } } - public virtual string Options + public object Settings { + get + { + return null; + } set { - if (value == null || value == "") return; - throw new Exception("Unsupported options " + value); + if (value != null && value.GetType() != typeof(object)) + throw new Exception("Unsupported options " + value); } } + public long Padding + { + set { } + } + public long Position { get @@ -255,7 +265,12 @@ namespace CUETools.Codecs.LAME } - [AudioEncoderClass("lame VBR", "mp3", false, "V9 V8 V7 V6 V5 V4 V3 V2 V1 V0", "V2", 2)] + public class LAMEEncoderVBRSettings + { + public LAMEEncoderVBRSettings() { } + } + + [AudioEncoderClass("lame VBR", "mp3", false, "V9 V8 V7 V6 V5 V4 V3 V2 V1 V0", "V2", 2, typeof(LAMEEncoderVBRSettings))] public class LAMEEncoderVBR : LAMEEncoder { private int quality = 0; @@ -295,36 +310,41 @@ namespace CUETools.Codecs.LAME } } - public override string Options + LAMEEncoderVBRSettings _settings = new LAMEEncoderVBRSettings(); + + public object Settings { + get + { + return _settings; + } set { - if (value == null || value == "") return; - string[] args = value.Split(); - for (int i = 0; i < args.Length; i++) - { - //if (args[i] == "--padding-length" && (++i) < args.Length) - //{ - // PaddingLength = int.Parse(args[i]); - // continue; - //} - //if (args[i] == "--verify") - //{ - // DoVerify = true; - // continue; - //} + if (value as LAMEEncoderVBRSettings == null) throw new Exception("Unsupported options " + value); - } + _settings = value as LAMEEncoderVBRSettings; } } } - [AudioEncoderClass("lame CBR", "mp3", false, "96 128 192 256 320", "256", 2)] + public class LAMEEncoderCBRSettings + { + public LAMEEncoderCBRSettings() { + // Iterate through each property and call ResetValue() + foreach (PropertyDescriptor property in TypeDescriptor.GetProperties(this)) + property.ResetValue(this); + } + [DefaultValue(0)] + public int CustomBitrate { get; set; } + [DefaultValue(MpegMode.STEREO)] + public MpegMode StereoMode { get; set; } + } + + [AudioEncoderClass("lame CBR", "mp3", false, "96 128 192 256 320", "256", 2, typeof(LAMEEncoderCBRSettings))] public class LAMEEncoderCBR : LAMEEncoder { private uint bps; private static readonly uint[] bps_table = new uint[] {96, 128, 192, 256, 320}; - private MpegMode stereo = MpegMode.STEREO; public LAMEEncoderCBR(string path, Stream IO, AudioPCMConfig pcm) : base(path, IO, pcm) @@ -353,42 +373,27 @@ namespace CUETools.Codecs.LAME } } - public override string Options + LAMEEncoderCBRSettings _settings = new LAMEEncoderCBRSettings(); + + public object Settings { + get + { + return _settings; + } set { - if (value == null || value == "") return; - string[] args = value.Split(); - for (int i = 0; i < args.Length; i++) - { - if (args[i] == "-b" && (++i) < args.Length) - { - bps = uint.Parse(args[i]); - continue; - } - if (args[i] == "-m" && (++i) < args.Length) - { - switch (args[i]) - { - case "s": stereo = MpegMode.STEREO; break; - case "j": stereo = MpegMode.JOINT_STEREO; break; - case "d": stereo = MpegMode.DUAL_CHANNEL; break; - case "m": stereo = MpegMode.MONO; break; - default: - throw new Exception("Unsupported options " + value); - } - continue; - } + if (value as LAMEEncoderCBRSettings == null) throw new Exception("Unsupported options " + value); - } + _settings = value as LAMEEncoderCBRSettings; } } protected override BE_CONFIG MakeConfig() { - BE_CONFIG Mp3Config = new BE_CONFIG(PCM, bps); + BE_CONFIG Mp3Config = new BE_CONFIG(PCM, _settings.CustomBitrate > 0 ? (uint)_settings.CustomBitrate : bps); Mp3Config.format.lhv1.bWriteVBRHeader = 1; - Mp3Config.format.lhv1.nMode = stereo; + Mp3Config.format.lhv1.nMode = _settings.StereoMode; //Mp3Config.format.lhv1.nVbrMethod = VBRMETHOD.VBR_METHOD_NONE; // --cbr //Mp3Config.format.lhv1.nPreset = LAME_QUALITY_PRESET.LQP_NORMAL_QUALITY; return Mp3Config; diff --git a/CUETools.Codecs.LossyWAV/LossyWAV.cs b/CUETools.Codecs.LossyWAV/LossyWAV.cs index a443a6a..9f141de 100644 --- a/CUETools.Codecs.LossyWAV/LossyWAV.cs +++ b/CUETools.Codecs.LossyWAV/LossyWAV.cs @@ -148,15 +148,24 @@ namespace CUETools.Codecs.LossyWAV set { } } - public string Options + public object Settings { + get + { + return null; + } set { - if (value == null || value == "") return; - throw new Exception("Unsupported options " + value); + if (value != null && value.GetType() != typeof(object)) + throw new Exception("Unsupported options " + value); } } + public long Padding + { + set { } + } + public AudioPCMConfig PCM { get { return _pcm; } diff --git a/CUETools.Codecs.TTA/CUETools.Codecs.TTA.cpp b/CUETools.Codecs.TTA/CUETools.Codecs.TTA.cpp index d7c970f..dc7aeee 100644 --- a/CUETools.Codecs.TTA/CUETools.Codecs.TTA.cpp +++ b/CUETools.Codecs.TTA/CUETools.Codecs.TTA.cpp @@ -205,7 +205,7 @@ namespace TTA { } }; - [AudioEncoderClass("ttalib", "tta", true, "", "", 1)] + [AudioEncoderClass("ttalib", "tta", true, "", "", 1, Object::typeid)] public ref class TTAWriter : public IAudioDest { public: @@ -327,11 +327,22 @@ namespace TTA { } } - virtual property String^ Options + virtual property __int64 Padding { - void set(String^ value) + void set(__int64 value) { + } + } + + virtual property Object^ Settings + { + Object^ get() { - if (value == nullptr || value == "") return; + return nullptr; + } + + void set(Object^ value) + { + if (value != nullptr && value->GetType() != Object::typeid) throw gcnew Exception(String::Format("Unsupported options: {0}", value)); } } diff --git a/CUETools.Codecs.WavPack/CUETools.Codecs.WavPack.cpp b/CUETools.Codecs.WavPack/CUETools.Codecs.WavPack.cpp index 5943e99..26cced3 100644 --- a/CUETools.Codecs.WavPack/CUETools.Codecs.WavPack.cpp +++ b/CUETools.Codecs.WavPack/CUETools.Codecs.WavPack.cpp @@ -30,6 +30,7 @@ // **************************************************************************** using namespace System; +using namespace System::ComponentModel; using namespace System::Runtime::InteropServices; using namespace System::Security::Cryptography; using namespace System::IO; @@ -290,7 +291,47 @@ namespace CUETools { namespace Codecs { namespace WavPack { } }; - [AudioEncoderClass("libwavpack", "wv", true, "fast normal high high+", "normal", 1)] + public ref class WavPackWriterSettings + { + public: + WavPackWriterSettings() + { + _md5Sum = false; + _extraMode = 0; + } + + [DefaultValue(0)] + [DisplayName("ExtraMode")] + property Int32 ExtraMode { + Int32 get() { + return _extraMode; + } + void set(Int32 value) { + if ((value < 0) || (value > 6)) { + throw gcnew Exception("Invalid extra mode."); + } + _extraMode = value; + } + } + + [DefaultValue(false)] + [DisplayName("MD5")] + [Description("Calculate MD5 hash for audio stream")] + property bool MD5Sum { + bool get() { + return _md5Sum; + } + void set(bool value) { + _md5Sum = value; + } + } + + private: + bool _md5Sum; + Int32 _extraMode; + }; + + [AudioEncoderClass("libwavpack", "wv", true, "fast normal high high+", "normal", 1, WavPackWriterSettings::typeid)] public ref class WavPackWriter : IAudioDest { public: @@ -306,7 +347,6 @@ namespace CUETools { namespace Codecs { namespace WavPack { _path = path; _compressionMode = 1; - _extraMode = 0; _blockSize = 0; IntPtr pathChars = Marshal::StringToHGlobalUni(path); @@ -319,19 +359,19 @@ namespace CUETools { namespace Codecs { namespace WavPack { virtual void Close() { - if (_md5Sum) - { - _md5hasher->TransformFinalBlock (gcnew array(1), 0, 0); - pin_ptr md5_digest = &_md5hasher->Hash[0]; - WavpackStoreMD5Sum (_wpc, md5_digest); - } + if (_settings->MD5Sum) + { + _md5hasher->TransformFinalBlock (gcnew array(1), 0, 0); + pin_ptr md5_digest = &_md5hasher->Hash[0]; + WavpackStoreMD5Sum (_wpc, md5_digest); + } - WavpackFlushSamples(_wpc); - _wpc = WavpackCloseFile(_wpc); - fclose(_hFile); + WavpackFlushSamples(_wpc); + _wpc = WavpackCloseFile(_wpc); + fclose(_hFile); - if ((_finalSampleCount != 0) && (_samplesWritten != _finalSampleCount)) - throw gcnew Exception("Samples written differs from the expected sample count."); + if ((_finalSampleCount != 0) && (_samplesWritten != _finalSampleCount)) + throw gcnew Exception("Samples written differs from the expected sample count."); } virtual void Delete() @@ -376,7 +416,7 @@ namespace CUETools { namespace Codecs { namespace WavPack { sampleBuffer->Prepare(this); - if (MD5Sum) + if (_settings->MD5Sum) UpdateHash(sampleBuffer->Bytes, sampleBuffer->ByteLength); if ((_pcm->BitsPerSample & 7) != 0) @@ -408,7 +448,8 @@ namespace CUETools { namespace Codecs { namespace WavPack { } } - virtual property int CompressionLevel { + virtual property int CompressionLevel + { int get() { return _compressionMode; } @@ -420,47 +461,24 @@ namespace CUETools { namespace Codecs { namespace WavPack { } } - virtual property String^ Options + virtual property __int64 Padding { - void set(String^ value) + void set(__int64 value) { + } + } + + virtual property Object^ Settings + { + Object^ get() { - if (value == nullptr || value == "") return; - cli::array^ args = value->Split(); - for (int i = 0; i < args->Length; i++) - { - if (args[i] == "--extra-mode" && (++i) < args->Length) - { - ExtraMode = Int32::Parse(args[i]); - continue; - } - if (args[i] == "--md5") - { - MD5Sum = true; - continue; - } - throw gcnew Exception(String::Format("Unsupported options: {0}", value)); - } + return _settings; } - } - - property Int32 ExtraMode { - Int32 get() { - return _extraMode; - } - void set(Int32 value) { - if ((value < 0) || (value > 6)) { - throw gcnew Exception("Invalid extra mode."); - } - _extraMode = value; - } - } - - property bool MD5Sum { - bool get() { - return _md5Sum; - } - void set(bool value) { - _md5Sum = value; + + void set(Object^ value) + { + if (value == nullptr || value->GetType() != WavPackWriterSettings::typeid) + throw gcnew Exception(String::Format("Unsupported options: {0}", value)); + _settings = (WavPackWriterSettings^)value; } } @@ -468,7 +486,7 @@ namespace CUETools { namespace Codecs { namespace WavPack { { if (!_initialized) Initialize(); - if (!_md5Sum || !_md5hasher) + if (!_settings->MD5Sum || !_md5hasher) throw gcnew Exception("MD5 not enabled."); _md5hasher->TransformBlock (buff, 0, len, buff, 0); } @@ -478,14 +496,16 @@ namespace CUETools { namespace Codecs { namespace WavPack { bool _initialized; WavpackContext *_wpc; Int32 _finalSampleCount, _samplesWritten; - Int32 _compressionMode, _extraMode, _blockSize; + Int32 _compressionMode, _blockSize; String^ _path; - bool _md5Sum; MD5^ _md5hasher; array^ _shiftedSampleBuffer; AudioPCMConfig^ _pcm; + WavPackWriterSettings^ _settings; void Initialize() { + _settings = gcnew WavPackWriterSettings(); + WavpackConfig config; _wpc = WavpackOpenFileOutput(write_block, _hFile, NULL); @@ -502,14 +522,15 @@ namespace CUETools { namespace Codecs { namespace WavPack { if (_compressionMode == 0) config.flags |= CONFIG_FAST_FLAG; if (_compressionMode == 2) config.flags |= CONFIG_HIGH_FLAG; if (_compressionMode == 3) config.flags |= CONFIG_HIGH_FLAG | CONFIG_VERY_HIGH_FLAG; - if (_extraMode != 0) { - config.flags |= CONFIG_EXTRA_MODE; - config.xmode = _extraMode; - } - if (_md5Sum) + if (_settings->ExtraMode != 0) { - _md5hasher = gcnew MD5CryptoServiceProvider (); - config.flags |= CONFIG_MD5_CHECKSUM; + config.flags |= CONFIG_EXTRA_MODE; + config.xmode = _settings->ExtraMode; + } + if (_settings->MD5Sum) + { + _md5hasher = gcnew MD5CryptoServiceProvider (); + config.flags |= CONFIG_MD5_CHECKSUM; } config.block_samples = (int)_blockSize; if (_blockSize > 0 && _blockSize < 2048) diff --git a/CUETools.Codecs/CUETools.Codecs.csproj b/CUETools.Codecs/CUETools.Codecs.csproj index 5d4b6ee..deb42dc 100644 --- a/CUETools.Codecs/CUETools.Codecs.csproj +++ b/CUETools.Codecs/CUETools.Codecs.csproj @@ -50,6 +50,7 @@ + diff --git a/CUETools.Codecs/Codecs.cs b/CUETools.Codecs/Codecs.cs index a1b7c65..69c492b 100644 --- a/CUETools.Codecs/Codecs.cs +++ b/CUETools.Codecs/Codecs.cs @@ -49,9 +49,10 @@ namespace CUETools.Codecs string Path { get; } int CompressionLevel { get; set; } - string Options { set; } + object Settings { get; set; } long FinalSampleCount { set; } long BlockSize { set; } + long Padding { set; } } public interface IAudioFilter @@ -75,14 +76,15 @@ namespace CUETools.Codecs /// ... ///} /// - [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] + [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)] public sealed class AudioEncoderClass : Attribute { private string _encoderName, _extension, _supportedModes, _defaultMode; bool _lossless; int _priority; + Type _settings; - public AudioEncoderClass(string encoderName, string extension, bool lossless, string supportedModes, string defaultMode, int priority) + public AudioEncoderClass(string encoderName, string extension, bool lossless, string supportedModes, string defaultMode, int priority, Type settings) { _encoderName = encoderName; _extension = extension; @@ -90,6 +92,7 @@ namespace CUETools.Codecs _defaultMode = defaultMode; _lossless = lossless; _priority = priority; + _settings = settings; } public string EncoderName @@ -121,6 +124,11 @@ namespace CUETools.Codecs { get { return _priority; } } + + public Type Settings + { + get { return _settings; } + } } /// @@ -844,15 +852,24 @@ namespace CUETools.Codecs set { } } - public string Options + public object Settings { + get + { + return null; + } set { - if (value == null || value == "") return; - throw new Exception("Unsupported options " + value); + if (value != null && value.GetType() != typeof(object)) + throw new Exception("Unsupported options " + value); } } + public long Padding + { + set { } + } + public long BlockSize { set { } @@ -1164,7 +1181,7 @@ namespace CUETools.Codecs public string Path { get { return _path; } } } - [AudioEncoderClass("builtin wav", "wav", true, "", "", 10)] + [AudioEncoderClass("builtin wav", "wav", true, "", "", 10, typeof(object))] public class WAVWriter : IAudioDest { Stream _IO; @@ -1332,15 +1349,24 @@ namespace CUETools.Codecs set { } } - public string Options + public object Settings { + get + { + return null; + } set { - if (value == null || value == "") return; - throw new Exception("Unsupported options " + value); + if (value != null && value.GetType() != typeof(object)) + throw new Exception("Unsupported options " + value); } } + public long Padding + { + set { } + } + public AudioPCMConfig PCM { get { return _pcm; } @@ -1851,15 +1877,24 @@ namespace CUETools.Codecs set { } // !!!! Must not start the process in constructor, so that we can set CompressionLevel! } - public string Options + public object Settings { + get + { + return null; + } set { - if (value == null || value == "") return; - throw new Exception("Unsupported options " + value); + if (value != null && value.GetType() != typeof(object)) + throw new Exception("Unsupported options " + value); } } + public long Padding + { + set { } + } + public AudioPCMConfig PCM { get { return wrt.PCM; } diff --git a/CUETools.Codecs/Properties/AssemblyInfo.cs b/CUETools.Codecs/Properties/AssemblyInfo.cs index 301b113..6ffa803 100644 --- a/CUETools.Codecs/Properties/AssemblyInfo.cs +++ b/CUETools.Codecs/Properties/AssemblyInfo.cs @@ -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("2.0.8.0")] -[assembly: AssemblyFileVersion("2.0.8.0")] +[assembly: AssemblyVersion("2.0.9.0")] +[assembly: AssemblyFileVersion("2.0.9.0")] diff --git a/CUETools.Compression.Rar/Properties/AssemblyInfo.cs b/CUETools.Compression.Rar/Properties/AssemblyInfo.cs index 855eec7..a1eb439 100644 --- a/CUETools.Compression.Rar/Properties/AssemblyInfo.cs +++ b/CUETools.Compression.Rar/Properties/AssemblyInfo.cs @@ -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("2.0.8.0")] -[assembly: AssemblyFileVersion("2.0.8.0")] +[assembly: AssemblyVersion("2.0.9.0")] +[assembly: AssemblyFileVersion("2.0.9.0")] diff --git a/CUETools.Compression.Zip/Properties/AssemblyInfo.cs b/CUETools.Compression.Zip/Properties/AssemblyInfo.cs index dd6a846..1160d60 100644 --- a/CUETools.Compression.Zip/Properties/AssemblyInfo.cs +++ b/CUETools.Compression.Zip/Properties/AssemblyInfo.cs @@ -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("2.0.8.0")] -[assembly: AssemblyFileVersion("2.0.8.0")] +[assembly: AssemblyVersion("2.0.9.0")] +[assembly: AssemblyFileVersion("2.0.9.0")] diff --git a/CUETools.Compression/Properties/AssemblyInfo.cs b/CUETools.Compression/Properties/AssemblyInfo.cs index bb5ddc7..88f8a76 100644 --- a/CUETools.Compression/Properties/AssemblyInfo.cs +++ b/CUETools.Compression/Properties/AssemblyInfo.cs @@ -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("2.0.8.0")] -[assembly: AssemblyFileVersion("2.0.8.0")] +[assembly: AssemblyVersion("2.0.9.0")] +[assembly: AssemblyFileVersion("2.0.9.0")] diff --git a/CUETools.DSP.Mixer/Mixer.cs b/CUETools.DSP.Mixer/Mixer.cs index 02d5cf4..af54f93 100644 --- a/CUETools.DSP.Mixer/Mixer.cs +++ b/CUETools.DSP.Mixer/Mixer.cs @@ -287,15 +287,24 @@ namespace CUETools.DSP.Mixer set { throw new NotSupportedException(); } } - public string Options + public object Settings { + get + { + return null; + } set { - if (value == null || value == "") return; - throw new NotSupportedException("Unsupported options " + value); + if (value != null && value.GetType() != typeof(object)) + throw new Exception("Unsupported options " + value); } } + public long Padding + { + set { } + } + public AudioPCMConfig PCM { get { return mixer.PCM; } diff --git a/CUETools.FlaCudaExe/Program.cs b/CUETools.FlaCudaExe/Program.cs index c147f27..da0898f 100644 --- a/CUETools.FlaCudaExe/Program.cs +++ b/CUETools.FlaCudaExe/Program.cs @@ -204,8 +204,10 @@ namespace CUETools.FlaCudaExe try { - encoder.GPUOnly = gpu_only; - encoder.CPUThreads = cpu_threads; + (encoder.Settings as FlaCudaWriterSettings).GPUOnly = gpu_only; + (encoder.Settings as FlaCudaWriterSettings).CPUThreads = cpu_threads; + (encoder.Settings as FlaCudaWriterSettings).DoVerify = do_verify; + (encoder.Settings as FlaCudaWriterSettings).DoMD5 = do_md5; if (level >= 0) encoder.CompressionLevel = level; if (stereo_method != null) @@ -231,15 +233,13 @@ namespace CUETools.FlaCudaExe if (blocksize >= 0) encoder.BlockSize = blocksize; if (padding >= 0) - encoder.PaddingLength = padding; + encoder.Padding = padding; if (vbr_mode >= 0) encoder.VBRMode = vbr_mode; if (orders_per_window >= 0) encoder.OrdersPerWindow = orders_per_window; encoder.UseLattice = use_lattice; - encoder.DoMD5 = do_md5; encoder.DoSeekTable = do_seektable; - encoder.DoVerify = do_verify; } catch (Exception ex) { diff --git a/CUETools.FlaCudaExe/Properties/AssemblyInfo.cs b/CUETools.FlaCudaExe/Properties/AssemblyInfo.cs index 2f03c51..9af01d2 100644 --- a/CUETools.FlaCudaExe/Properties/AssemblyInfo.cs +++ b/CUETools.FlaCudaExe/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("2.0.8.0")] -[assembly: AssemblyFileVersion("2.0.8.0")] +[assembly: AssemblyVersion("2.0.9.0")] +[assembly: AssemblyFileVersion("2.0.9.0")] diff --git a/CUETools.Flake/Program.cs b/CUETools.Flake/Program.cs index 3614543..2a9b331 100644 --- a/CUETools.Flake/Program.cs +++ b/CUETools.Flake/Program.cs @@ -219,12 +219,12 @@ namespace CUETools.FlakeExe if (estimation_depth >= 0) flake.EstimationDepth = estimation_depth; if (padding >= 0) - flake.PaddingLength = padding; + flake.Padding = padding; if (vbr_mode >= 0) flake.VBRMode = vbr_mode; - flake.DoMD5 = do_md5; flake.DoSeekTable = do_seektable; - flake.DoVerify = do_verify; + (flake.Settings as FlakeWriterSettings).DoVerify = do_verify; + (flake.Settings as FlakeWriterSettings).DoMD5 = do_md5; } catch (Exception ex) { diff --git a/CUETools.Processor/AudioReadWrite.cs b/CUETools.Processor/AudioReadWrite.cs index 1985341..ec64b16 100644 --- a/CUETools.Processor/AudioReadWrite.cs +++ b/CUETools.Processor/AudioReadWrite.cs @@ -3,6 +3,7 @@ using System.IO; using CUETools.CDImage; using CUETools.Codecs; using CUETools.Codecs.LossyWAV; +using System.Xml.Serialization; namespace CUETools.Processor { @@ -100,34 +101,8 @@ namespace CUETools.Processor throw new Exception("Unsupported audio type: " + path); dest.CompressionLevel = encoder.DefaultModeIndex; dest.FinalSampleCount = finalSampleCount; - if (encoder.type != null) - switch (encoder.type.FullName) - { - case "CUETools.Codecs.ALAC.ALACWriter": - dest.Options = string.Format("--padding-length {0}", padding); - break; - case "CUETools.Codecs.FLAKE.FlakeWriter": - dest.Options = string.Format("--padding-length {0}", padding); - break; - case "CUETools.Codecs.FlaCuda.FlaCudaWriter": - dest.Options = string.Format("{0}{1}--padding-length {2} --cpu-threads {3}", - config.FlaCudaVerify ? "--verify " : "", - config.FlaCudaGPUOnly ? "--gpu-only " : "", - padding, - config.FlaCudaThreads ? 1 : 0); - break; - case "CUETools.Codecs.FLAC.FLACWriter": - dest.Options = string.Format("{0}{1}--padding-length {2}", - config.disableAsm ? "--disable-asm " : "", - config.flacVerify ? "--verify " : "", - padding); - break; - case "CUETools.Codecs.WavPack.WavPackWriter": - dest.Options = string.Format("{0}--extra-mode {1}", - config.wvStoreMD5 ? "--md5 " : "", - config.wvExtraMode); - break; - } + dest.Padding = padding; + dest.Settings = encoder.settings; return dest; } diff --git a/CUETools.Processor/Processor.cs b/CUETools.Processor/Processor.cs index f73b96e..c280954 100644 --- a/CUETools.Processor/Processor.cs +++ b/CUETools.Processor/Processor.cs @@ -386,7 +386,7 @@ namespace CUETools.Processor } } - public static string ReplaceMultiple(string s, NameValueCollection tags) + public static string ReplaceMultiple(string s, NameValueCollection tags, int maxLen) { List find = new List(); List replace = new List(); @@ -402,14 +402,14 @@ namespace CUETools.Processor } } - return ReplaceMultiple(s, find, replace); + return ReplaceMultiple(s, find, replace, maxLen); } public delegate bool CheckIfExists(string output); - public static string ReplaceMultiple(string fmt, NameValueCollection tags, string unique_key, CheckIfExists exists) + public static string ReplaceMultiple(string fmt, NameValueCollection tags, string unique_key, CheckIfExists exists, int maxLen) { - string result = ReplaceMultiple(fmt, tags); + string result = ReplaceMultiple(fmt, tags, maxLen); if (result == String.Empty || result == null) return result; int unique = 1; @@ -418,7 +418,7 @@ namespace CUETools.Processor while (exists(result)) { tags[unique_key] = unique.ToString(); - string new_result = ReplaceMultiple(fmt, tags); + string new_result = ReplaceMultiple(fmt, tags, maxLen); if (new_result == result || new_result == String.Empty || new_result == null) break; result = new_result; @@ -429,7 +429,13 @@ namespace CUETools.Processor return result; } - public static string ReplaceMultiple(string s, List find, List replace) + public static string Shorten(string f, string s, int maxLen) + { + return maxLen <= 0 || maxLen >= s.Length || f == "music" || f == "path" || f == "filename" || f == "filename_ext" || f == "directoryname" ? + s : s.Substring(0, maxLen); + } + + public static string ReplaceMultiple(string s, List find, List replace, int maxLen) { if (find.Count != replace.Count) { @@ -521,13 +527,13 @@ namespace CUETools.Processor if (replace[iFind] != null) { formatFunctions[formatFunctions.Count - 1].Found(); - sb.Append(replace[iFind]); + sb.Append(Shorten(f, replace[iFind], maxLen)); } } else { if (replace[iFind] != null) - sb.Append(replace[iFind]); + sb.Append(Shorten(f, replace[iFind], maxLen)); else return null; } @@ -636,8 +642,15 @@ namespace CUETools.Processor default_mode = enc.DefaultMode; priority = enc.Priority; path = null; - parameters = null; + parameters = ""; type = enctype; + settingsSerializer = null; + settings = null; + if (enc.Settings != null && enc.Settings != typeof(object)) + { + settingsSerializer = new XmlSerializer(enc.Settings); + settings = Activator.CreateInstance(enc.Settings); + } } public CUEToolsUDC(AudioDecoderClass dec, Type dectype) { @@ -660,6 +673,8 @@ namespace CUETools.Processor public string path = ""; public string parameters = ""; public Type type = null; + public object settings = null; + public XmlSerializer settingsSerializer = null; public string supported_modes = ""; public string default_mode = ""; public bool lossless = false; @@ -846,7 +861,7 @@ namespace CUETools.Processor if (Attribute.GetCustomAttribute(type, typeof(AudioDecoderClass)) != null) decs.Add(type); //if (type.IsClass && !type.IsAbstract && typeof(IAudioDest).IsAssignableFrom(type)) - if (Attribute.GetCustomAttribute(type, typeof(AudioEncoderClass)) != null) + if (Attribute.GetCustomAttributes(type, typeof(AudioEncoderClass)).Length > 0) encs.Add(type); CompressionProviderClass archclass = Attribute.GetCustomAttribute(type, typeof(CompressionProviderClass)) as CompressionProviderClass; if (archclass != null) @@ -924,6 +939,9 @@ namespace CUETools.Processor [DefaultValue(true)] [Category("Cover Art"), DisplayName("Cover Art Extended Search")] public bool CoverArtSearchSubdirs { get; set; } + [DefaultValue(false)] + [DisplayName("Create TOC files")] + public bool CreateTOC { get; set; } public enum ProxyMode { @@ -934,6 +952,9 @@ namespace CUETools.Processor } public class CUEConfig { + public readonly static XmlSerializerNamespaces xmlEmptyNamespaces = new XmlSerializerNamespaces(new XmlQualifiedName[] { XmlQualifiedName.Empty }); + public readonly static XmlWriterSettings xmlEmptySettings = new XmlWriterSettings { Indent = true, OmitXmlDeclaration = true }; + public uint fixOffsetMinimumConfidence; public uint fixOffsetMinimumTracksPercent; public uint encodeWhenConfidence; @@ -946,10 +967,7 @@ namespace CUETools.Processor public bool fixOffset; public bool noUnverifiedOutput; public bool autoCorrectFilenames; - public bool flacVerify; public bool preserveHTOA; - public int wvExtraMode; - public bool wvStoreMD5; public bool keepOriginalFilenames; public string trackFilenameFormat; public string singleFilenameFormat; @@ -967,13 +985,11 @@ namespace CUETools.Processor public bool decodeHDCD; public bool wait750FramesForHDCD; public bool createM3U; - public bool createTOC; public bool createCUEFileWhenEmbedded; public bool truncate4608ExtraSamples; public int lossyWAVQuality; public bool decodeHDCDtoLW16; public bool decodeHDCDto24bit; - public bool disableAsm; public bool oneInstance; public bool checkForUpdates; public string language; @@ -997,9 +1013,6 @@ namespace CUETools.Processor public CUEConfigAdvanced advanced { get; private set; } public bool CopyAlbumArt { get; set; } - public bool FlaCudaThreads { get; set; } - public bool FlaCudaGPUOnly { get; set; } - public bool FlaCudaVerify { get; set; } public string ArLogFilenameFormat { get; set; } public string AlArtFilenameFormat { get; set; } public CUEToolsUDCList Encoders @@ -1022,13 +1035,7 @@ namespace CUETools.Processor writeArLogOnVerify = true; autoCorrectFilenames = true; - flacVerify = false; - FlaCudaVerify = false; - FlaCudaGPUOnly = false; - FlaCudaThreads = true; preserveHTOA = true; - wvExtraMode = 0; - wvStoreMD5 = false; keepOriginalFilenames = false; trackFilenameFormat = "%tracknumber%. %title%"; singleFilenameFormat = "%filename%"; @@ -1046,14 +1053,12 @@ namespace CUETools.Processor wait750FramesForHDCD = true; decodeHDCD = false; createM3U = false; - createTOC = false; createCUEFileWhenEmbedded = true; truncate4608ExtraSamples = true; lossyWAVQuality = 5; decodeHDCDtoLW16 = false; decodeHDCDto24bit = true; - disableAsm = false; oneInstance = true; checkForUpdates = true; @@ -1081,11 +1086,8 @@ namespace CUETools.Processor encoders = new CUEToolsUDCList(); foreach (Type type in CUEProcessorPlugins.encs) - { - AudioEncoderClass enc = Attribute.GetCustomAttribute(type, typeof(AudioEncoderClass)) as AudioEncoderClass; - //if (!encoders.TryGetValue(enc.EncoderName)) - encoders.Add(new CUEToolsUDC(enc, type)); - } + foreach (AudioEncoderClass enc in Attribute.GetCustomAttributes(type, typeof(AudioEncoderClass))) + encoders.Add(new CUEToolsUDC(enc, type)); decoders = new Dictionary(); foreach (Type type in CUEProcessorPlugins.decs) { @@ -1206,12 +1208,6 @@ string status = processor.Go(); sw.Save("PreserveHTOA", preserveHTOA); sw.Save("AutoCorrectFilenames", autoCorrectFilenames); - sw.Save("FLACVerify", flacVerify); - sw.Save("FlaCudaVerify", FlaCudaVerify); - sw.Save("FlaCudaGPUOnly", FlaCudaGPUOnly); - sw.Save("FlaCudaThreads", FlaCudaThreads); - sw.Save("WVExtraMode", wvExtraMode); - sw.Save("WVStoreMD5", wvStoreMD5); sw.Save("KeepOriginalFilenames", keepOriginalFilenames); sw.Save("SingleFilenameFormat", singleFilenameFormat); sw.Save("TrackFilenameFormat", trackFilenameFormat); @@ -1229,13 +1225,11 @@ string status = processor.Go(); sw.Save("Wait750FramesForHDCD", wait750FramesForHDCD); sw.Save("DecodeHDCD", decodeHDCD); sw.Save("CreateM3U", createM3U); - sw.Save("CreateTOC", createTOC); sw.Save("CreateCUEFileWhenEmbedded", createCUEFileWhenEmbedded); sw.Save("Truncate4608ExtraSamples", truncate4608ExtraSamples); sw.Save("LossyWAVQuality", lossyWAVQuality); sw.Save("DecodeHDCDToLossyWAV16", decodeHDCDtoLW16); sw.Save("DecodeHDCDTo24bit", decodeHDCDto24bit); - sw.Save("DisableAsm", disableAsm); sw.Save("OneInstance", oneInstance); sw.Save("CheckForUpdates", checkForUpdates); sw.Save("Language", language); @@ -1257,11 +1251,12 @@ string status = processor.Go(); sw.Save("ArLogFilenameFormat", ArLogFilenameFormat); sw.Save("AlArtFilenameFormat", AlArtFilenameFormat); - using (TextWriter writer = new StringWriter()) + using (TextWriter tw = new StringWriter()) + using (XmlWriter xw = XmlTextWriter.Create(tw, xmlEmptySettings)) { - CUEConfigAdvanced.serializer.Serialize(writer, advanced); //writer.Close(); - sw.SaveText("Advanced", writer.ToString()); - } + CUEConfigAdvanced.serializer.Serialize(xw, advanced, xmlEmptyNamespaces); + sw.SaveText("Advanced", tw.ToString()); + } int nEncoders = 0; foreach (CUEToolsUDC encoder in encoders) @@ -1273,8 +1268,20 @@ string status = processor.Go(); { sw.Save(string.Format("ExternalEncoder{0}Extension", nEncoders), encoder.extension); sw.Save(string.Format("ExternalEncoder{0}Path", nEncoders), encoder.path); - sw.Save(string.Format("ExternalEncoder{0}Parameters", nEncoders), encoder.parameters); sw.Save(string.Format("ExternalEncoder{0}Lossless", nEncoders), encoder.lossless); + sw.Save(string.Format("ExternalEncoder{0}Parameters", nEncoders), encoder.parameters); + } + else + { + if (encoder.settingsSerializer != null) + { + using (TextWriter tw = new StringWriter()) + using (XmlWriter xw = XmlTextWriter.Create(tw, xmlEmptySettings)) + { + encoder.settingsSerializer.Serialize(xw, encoder.settings, xmlEmptyNamespaces); + sw.SaveText(string.Format("ExternalEncoder{0}Parameters", nEncoders), tw.ToString()); + } + } } nEncoders++; } @@ -1344,12 +1351,6 @@ string status = processor.Go(); preserveHTOA = sr.LoadBoolean("PreserveHTOA") ?? true; autoCorrectFilenames = sr.LoadBoolean("AutoCorrectFilenames") ?? true; - flacVerify = sr.LoadBoolean("FLACVerify") ?? false; - FlaCudaVerify = sr.LoadBoolean("FlaCudaVerify") ?? false; - FlaCudaGPUOnly = sr.LoadBoolean("FlaCudaGPUOnly") ?? false; - FlaCudaThreads = sr.LoadBoolean("FlaCudaThreads") ?? true; - wvExtraMode = sr.LoadInt32("WVExtraMode", 0, 6) ?? 0; - wvStoreMD5 = sr.LoadBoolean("WVStoreMD5") ?? false; keepOriginalFilenames = sr.LoadBoolean("KeepOriginalFilenames") ?? false; singleFilenameFormat = sr.Load("SingleFilenameFormat") ?? singleFilenameFormat; trackFilenameFormat = sr.Load("TrackFilenameFormat") ?? trackFilenameFormat; @@ -1367,14 +1368,12 @@ string status = processor.Go(); wait750FramesForHDCD = sr.LoadBoolean("Wait750FramesForHDCD") ?? true; decodeHDCD = sr.LoadBoolean("DecodeHDCD") ?? false; createM3U = sr.LoadBoolean("CreateM3U") ?? false; - createTOC = sr.LoadBoolean("CreateTOC") ?? false; createCUEFileWhenEmbedded = sr.LoadBoolean("CreateCUEFileWhenEmbedded") ?? true; truncate4608ExtraSamples = sr.LoadBoolean("Truncate4608ExtraSamples") ?? true; lossyWAVQuality = sr.LoadInt32("LossyWAVQuality", 0, 10) ?? 5; decodeHDCDtoLW16 = sr.LoadBoolean("DecodeHDCDToLossyWAV16") ?? false; decodeHDCDto24bit = sr.LoadBoolean("DecodeHDCDTo24bit") ?? true; - disableAsm = sr.LoadBoolean("DisableAsm") ?? false; oneInstance = sr.LoadBoolean("OneInstance") ?? true; checkForUpdates = sr.LoadBoolean("CheckForUpdates") ?? true; @@ -1428,8 +1427,20 @@ string status = processor.Go(); if (path == null || parameters == null || extension == null) continue; encoder.extension = extension; encoder.path = path; - encoder.parameters = parameters; encoder.lossless = lossless; + encoder.parameters = parameters; + } + else + { + if (encoder.settingsSerializer != null && parameters != "") + try + { + using (TextReader reader = new StringReader(parameters)) + encoder.settings = encoder.settingsSerializer.Deserialize(reader); + } + catch + { + } } encoder.supported_modes = supported_modes; encoder.default_mode = default_mode; @@ -1919,7 +1930,7 @@ string status = processor.Go(); m_freedb.UserName = _config.advanced.FreedbUser; m_freedb.Hostname = _config.advanced.FreedbDomain; m_freedb.ClientName = "CUETools"; - m_freedb.Version = "2.0.8"; + m_freedb.Version = CUEToolsVersion; m_freedb.SetDefaultSiteAddress("freedb.org"); QueryResult queryResult; @@ -2137,7 +2148,9 @@ string status = processor.Go(); else if (lineStr.StartsWith("TOC of the extracted CD") || lineStr.StartsWith("Exact Audio Copy") || lineStr.StartsWith("EAC extraction logfile") - || lineStr.StartsWith("CUERipper")) + || lineStr.StartsWith("CUERipper") + || lineStr.StartsWith(" Track | Start | Length | Start sector | End sector") + ) isEACLog = true; else if (lineStr.StartsWith("Table of Contents: starting sectors")) iscdda2wavlog = true; @@ -2645,14 +2658,25 @@ string status = processor.Go(); if (_accurateRipId == null) _accurateRipId = GetCommonMiscTag("ACCURATERIPID"); - if (_eacLog == null && _logFiles != null && _logFiles.Count == 1) + if (_eacLog == null && _logFiles != null && _logFiles.Count > 0) { - CDImageLayout tocFromLog1 = TocFromLog(_logFiles[0].contents); - if (tocFromLog1 != null && tocFromLog1.TOCID == _toc.TOCID) - _eacLog = _logFiles[0].contents; + foreach (CUEToolsSourceFile sf in _logFiles) + { + CDImageLayout tocFromLog1 = TocFromLog(sf.contents); + if (tocFromLog1 != null && tocFromLog1.TOCID == _toc.TOCID) + { + if (_eacLog == null) + _eacLog = sf.contents; + else + { + _eacLog = null; + break; + } + } + } } - if (_eacLog == null && _logFiles != null) + if (_eacLog == null && _logFiles != null && _logFiles.Count > 0) { CUEToolsSourceFile selectedLogFile = ChooseFile(_logFiles, _defaultLog, false); _eacLog = selectedLogFile != null ? selectedLogFile.contents : null; @@ -2660,6 +2684,13 @@ string status = processor.Go(); CDImageLayout tocFromLog = _eacLog == null ? null : TocFromLog(_eacLog); + if (tocFromLog == null) + { + string tocPath = Path.ChangeExtension(InputPath, ".toc"); + if (File.Exists(tocPath)) + tocFromLog = TocFromLog((new StreamReader(tocPath, CUESheet.Encoding)).ReadToEnd()); + } + // use pregaps from log if (tocFromLog != null) { @@ -2749,7 +2780,7 @@ string status = processor.Go(); if (uint.TryParse(_cddbDiscIdTag, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out cddbDiscIdNum) && (cddbDiscIdNum & 0xff) == _toc.AudioTracks + 1) { if (_toc.TrackCount == _toc.AudioTracks) - _toc.AddTrack(new CDTrack((uint)_toc.TrackCount, _toc.Length + 152 * 75, 0, false, false)); + _toc.AddTrack(new CDTrack((uint)_toc.TrackCount + 1, _toc.Length + 152 * 75, 0, false, false)); uint lengthFromTag = ((cddbDiscIdNum >> 8) & 0xffff); _minDataTrackLength = (lengthFromTag + _toc[1].Start / 75) * 75 - _toc.Length; } @@ -2808,6 +2839,14 @@ string status = processor.Go(); _CUEToolsDB.UploadHelper.onProgress += new EventHandler(UploadProgress); _CUEToolsDB.ContactDB(userAgent); + if (!_toc[_toc.TrackCount].IsAudio && DataTrackLength == 0) + foreach (DBEntry e in _CUEToolsDB.Entries) + if (e.toc.TrackCount == _toc.TrackCount && e.toc.AudioLength == _toc.AudioLength && !e.toc[e.toc.TrackCount].IsAudio) + { + DataTrackLength = e.toc[e.toc.TrackCount].Length; + break; + } + ShowProgress("", 0.0, null, null); _useCUEToolsDB = true; _useCUEToolsDBSibmit = submit; @@ -2824,11 +2863,14 @@ string status = processor.Go(); { toc2[toc2.TrackCount].Length = dtl; _arVerify.ContactAccurateRip(AccurateRipVerify.CalculateAccurateRipId(toc2)); - if (_arVerify.AccResult != HttpStatusCode.NotFound) + if (_arVerify.ExceptionStatus == WebExceptionStatus.Success) { DataTrackLength = dtl; break; } + if (_arVerify.ExceptionStatus != WebExceptionStatus.ProtocolError || + _arVerify.ResponseStatus != HttpStatusCode.NotFound) + break; ShowProgress((string)"Contacting AccurateRip database...", (dtl - minDTL) / 75.0, null, null); CheckStop(); lock (this) @@ -3115,14 +3157,17 @@ string status = processor.Go(); vars.Add("unique", null); - string outputPath = General.ReplaceMultiple(format, vars, "unique", - (General.CheckIfExists)delegate(string pathOut) { - return File.Exists(Path.ChangeExtension(pathOut, ext)); - }); - if (outputPath == "" || outputPath == null) - return ""; - try { outputPath = Path.ChangeExtension(outputPath, ext); } - catch { outputPath = ""; } + string outputPath = ""; + for (int maxLen = 260; maxLen >= 16; maxLen--) + { + outputPath = General.ReplaceMultiple(format, vars, "unique", pathOut => File.Exists(Path.ChangeExtension(pathOut, ext)), maxLen); + if (outputPath == "" || outputPath == null) + return ""; + try { outputPath = Path.ChangeExtension(outputPath, ext); } + catch { return ""; } + if (outputPath.Length < 260) + return outputPath; + } return outputPath; } @@ -3163,9 +3208,9 @@ string status = processor.Go(); extension = ".20bit" + extension; } - ArLogFileName = General.ReplaceMultiple(_config.ArLogFilenameFormat, vars, "unique", CheckIfFileExists) + ArLogFileName = General.ReplaceMultiple(_config.ArLogFilenameFormat, vars, "unique", CheckIfFileExists, -1) ?? vars["%filename%"] + ".accurip"; - AlArtFileName = General.ReplaceMultiple(_config.AlArtFilenameFormat, vars, "unique", CheckIfFileExists) + AlArtFileName = General.ReplaceMultiple(_config.AlArtFilenameFormat, vars, "unique", CheckIfFileExists, -1) ?? "folder.jpg"; if (OutputStyle == CUEStyle.SingleFileWithCUE) @@ -3173,7 +3218,7 @@ string status = processor.Go(); else if (_config.keepOriginalFilenames && HasSingleFilename) SingleFilename = Path.ChangeExtension(SingleFilename, extension); else - SingleFilename = (General.ReplaceMultiple(_config.singleFilenameFormat, vars) ?? "range") + extension; + SingleFilename = (General.ReplaceMultiple(_config.singleFilenameFormat, vars, -1) ?? "range") + extension; for (iTrack = -1; iTrack < TrackCount; iTrack++) { @@ -3198,7 +3243,7 @@ string status = processor.Go(); vars["artist"] = General.EmptyStringToNull(_config.CleanseString(artist)) ?? vars["album artist"]; vars["title"] = General.EmptyStringToNull(_config.CleanseString(title)); - filename = (General.ReplaceMultiple(_config.trackFilenameFormat, vars) ?? vars["tracknumber"]) + extension; + filename = (General.ReplaceMultiple(_config.trackFilenameFormat, vars, -1) ?? vars["tracknumber"]) + extension; if (htoa) HTOAFilename = filename; @@ -3355,7 +3400,7 @@ string status = processor.Go(); public void CreateExactAudioCopyLOG() { StringWriter logWriter = new StringWriter(CultureInfo.InvariantCulture); - string eacHeader = "Exact Audio Copy V0.99 prebeta 4 from 23. January 2008\r\n" + + string eacHeader = "{7}\r\n" + "\r\n" + "EAC extraction logfile from {0:d'.' MMMM yyyy', 'H':'mm}\r\n" + "\r\n" + @@ -3387,20 +3432,13 @@ string status = processor.Go(); _ripper.DriveOffset, (OutputStyle == CUEStyle.SingleFile || OutputStyle == CUEStyle.SingleFileWithCUE) ? "" : "Gap handling : " + - (_ripper.GapsDetected ? "Appended to previous track\r\n" : "Not detected, thus appended to previous track\r\n")); + (_ripper.GapsDetected ? "Appended to previous track\r\n" : "Not detected, thus appended to previous track\r\n"), + _ripper.RipperVersion); // "Exact Audio Copy V0.99 prebeta 4 from 23. January 2008" logWriter.WriteLine(); logWriter.WriteLine("TOC of the extracted CD"); logWriter.WriteLine(); - logWriter.WriteLine(" Track | Start | Length | Start sector | End sector "); - logWriter.WriteLine(" ---------------------------------------------------------"); - for (int track = 1; track <= _toc.TrackCount; track++) - logWriter.WriteLine("{0,9} | {1,8} | {2,8} | {3,8} | {4,8} ", - _toc[track].Number, - CDImageLayout.TimeToString("{0,2}:{1:00}.{2:00}", _toc[track].Start), - CDImageLayout.TimeToString("{0,2}:{1:00}.{2:00}", _toc[track].Length), - _toc[track].Start, - _toc[track].End); + logWriter.Write(TOCContents()); logWriter.WriteLine(); bool htoaToFile = ((OutputStyle == CUEStyle.GapsAppended) && _config.preserveHTOA && @@ -3541,15 +3579,7 @@ string status = processor.Go(); logWriter.WriteLine(); logWriter.WriteLine("TOC of the extracted CD"); logWriter.WriteLine(); - logWriter.WriteLine(" Track | Start | Length | Start sector | End sector"); - logWriter.WriteLine(" ---------------------------------------------------------"); - for (int track = 1; track <= _toc.TrackCount; track++) - logWriter.WriteLine("{0,9} | {1,8} | {2,8} | {3,8} | {4,8}", - _toc[track].Number, - _toc[track].StartMSF, - _toc[track].LengthMSF, - _toc[track].Start, - _toc[track].End); + logWriter.Write(TOCContents()); logWriter.WriteLine(); logWriter.WriteLine(" Track | Pregap | Indexes"); logWriter.WriteLine(" ---------------------------------------------------------"); @@ -3581,7 +3611,7 @@ string status = processor.Go(); logWriter.WriteLine(); logWriter.WriteLine("AccurateRip summary"); logWriter.WriteLine(); - _arVerify.GenerateFullLog(logWriter, true); + _arVerify.GenerateFullLog(logWriter, true, AccurateRipVerify.CalculateAccurateRipId(_toc)); } logWriter.WriteLine(); logWriter.WriteLine("End of status report"); @@ -3603,9 +3633,15 @@ string status = processor.Go(); public string TOCContents() { StringWriter sw = new StringWriter(); - for (int iTrack = 1; iTrack <= _toc.TrackCount; iTrack++) - sw.WriteLine("\t{0}", _toc[iTrack].Start + 150); - sw.Close(); + sw.WriteLine(" Track | Start | Length | Start sector | End sector "); + sw.WriteLine(" ---------------------------------------------------------"); + for (int track = 1; track <= _toc.TrackCount; track++) + sw.WriteLine("{0,9} | {1,8} | {2,8} | {3,8} | {4,8} ", + track, // _toc[track].Number, + CDImageLayout.TimeToString("{0,2}:{1:00}.{2:00}", _toc[track].Start), + CDImageLayout.TimeToString("{0,2}:{1:00}.{2:00}", _toc[track].Length), + _toc[track].Start, + _toc[track].End); return sw.ToString(); } @@ -3701,14 +3737,14 @@ string status = processor.Go(); string confFormat = (_CUEToolsDB.Total < 10) ? "{0:0}/{1:0}" : (_CUEToolsDB.Total < 100) ? "{0:00}/{1:00}" : "{0:000}/{1:000}"; string conf = string.Format(confFormat, entry.conf, _CUEToolsDB.Total); - string dataTrackInfo = !entry.toc[entry.toc.TrackCount].IsAudio ? string.Format("Is an Enhanced CD, data track length {0}", entry.toc[entry.toc.TrackCount].LengthMSF) : - !entry.toc[1].IsAudio ? string.Format("Playstation type data track length {0}", entry.toc[1].LengthMSF) : ""; + string dataTrackInfo = !entry.toc[entry.toc.TrackCount].IsAudio ? string.Format("CD-Extra data track length {0}", entry.toc[entry.toc.TrackCount].LengthMSF) : + !entry.toc[1].IsAudio ? string.Format("Playstation type data track length {0}", entry.toc[1].LengthMSF) : "Has no data track"; string status = entry.toc.Pregap != _toc.Pregap ? string.Format("Has pregap length {0}", CDImageLayout.TimeToString(entry.toc.Pregap)) : entry.toc.AudioLength != _toc.AudioLength ? string.Format("Has audio length {0}", CDImageLayout.TimeToString(entry.toc.AudioLength)) : - ((entry.toc.TrackOffsets != _toc.TrackOffsets) ? dataTrackInfo + ", " : "") + + ((entry.toc.TrackOffsets != _toc.TrackOffsets) ? dataTrackInfo + ", " : "") + ((!entry.hasErrors) ? "Accurately ripped" : - //((!entry.hasErrors) ? string.Format("Accurately ripped, offset {0}", -entry.offset) : + //((!entry.hasErrors) ? string.Format("Accurately ripped, offset {0}", -entry.offset) : entry.canRecover ? string.Format("Differs in {0} samples @{1}", entry.repair.CorrectableErrors, entry.repair.AffectedSectors) : (entry.httpStatus == 0 || entry.httpStatus == HttpStatusCode.OK) ? "No match" : entry.httpStatus.ToString()); @@ -3716,10 +3752,11 @@ string status = processor.Go(); } } + public readonly static string CUEToolsVersion = "2.0.9"; + public void GenerateAccurateRipLog(TextWriter sw) { - sw.WriteLine("[Verification date: {0}]", DateTime.Now); - sw.WriteLine("[AccurateRip ID: {0}] {1}.", _accurateRipId ?? AccurateRipVerify.CalculateAccurateRipId(_toc), _arVerify.ARStatus ?? "found"); + sw.WriteLine("[CUETools log; Date: {0}; Version: {1}]", DateTime.Now, CUEToolsVersion); if (PreGapLength != 0) sw.WriteLine("Pregap length {0}.", PreGapLengthMSF); if (!_toc[1].IsAudio) @@ -3741,6 +3778,7 @@ string status = processor.Go(); if (!_processed) { if (_useCUEToolsDB) GenerateCTDBLog(sw); + sw.WriteLine("[AccurateRip ID: {0}] {1}.", _accurateRipId ?? AccurateRipVerify.CalculateAccurateRipId(_toc), _arVerify.ARStatus ?? "found"); return; } @@ -3752,7 +3790,7 @@ string status = processor.Go(); sw.WriteLine("CUETools DB: corrected {0} errors.", _CUEToolsDB.SelectedEntry.repair.CorrectableErrors); else if (_useCUEToolsDB) GenerateCTDBLog(sw); - _arVerify.GenerateFullLog(sw, _config.arLogVerbose); + _arVerify.GenerateFullLog(sw, _config.arLogVerbose, _accurateRipId ?? AccurateRipVerify.CalculateAccurateRipId(_toc)); } public string GenerateAccurateRipStatus() @@ -3776,7 +3814,7 @@ string status = processor.Go(); if (tracksMatch == TrackCount) prefix += string.Format("rip accurate ({0}/{1})", _arVerify.WorstConfidence(), _arVerify.WorstTotal()); else - prefix += "rip not accurate"; + prefix += string.Format("rip not accurate ({0}/{1})", _arVerify.WorstConfidence(), _arVerify.WorstTotal()); } } if (!_useCUEToolsDBFix && _useCUEToolsDB) @@ -3930,7 +3968,7 @@ string status = processor.Go(); if (_useAccurateRip && _config.writeArTagsOnEncode && - _arVerify.AccResult == HttpStatusCode.OK) + _arVerify.ExceptionStatus == WebExceptionStatus.Success) FindBestOffset(1, true, out tracksMatch, out bestOffset); if (_config.createEACLOG && _ripperLog != null) @@ -4293,7 +4331,7 @@ string status = processor.Go(); GenerateAccurateRipLog(sw); sw.Close(); } - if (_config.createTOC) + if (_config.advanced.CreateTOC) { if (!Directory.Exists(OutputDir)) Directory.CreateDirectory(OutputDir); @@ -4338,6 +4376,7 @@ string status = processor.Go(); destTags.Remove("TITLE"); destTags.Remove("ALBUM"); destTags.Remove("ALBUMARTIST"); + destTags.Remove("ALBUM ARTIST"); destTags.Remove("DATE"); destTags.Remove("GENRE"); destTags.Remove("TRACKNUMBER"); @@ -4357,7 +4396,10 @@ string status = processor.Go(); //CleanupTags(destTags, "REPLAYGAIN"); } - if (_config.writeArTagsOnEncode && _action == CUEAction.Encode && _useAccurateRip && _arVerify.AccResult == HttpStatusCode.OK) + if (_config.writeArTagsOnEncode && + _action == CUEAction.Encode && + _useAccurateRip && + _arVerify.ExceptionStatus == WebExceptionStatus.Success) GenerateAccurateRipTags(destTags, bestOffset, iTrack); return destTags; @@ -4403,6 +4445,7 @@ string status = processor.Go(); destTags.Remove("TITLE"); destTags.Remove("ALBUM"); destTags.Remove("ALBUMARTIST"); + destTags.Remove("ALBUM ARTIST"); destTags.Remove("DATE"); destTags.Remove("GENRE"); destTags.Remove("TRACKNUMBER"); @@ -4428,7 +4471,11 @@ string status = processor.Go(); if (_config.embedLog && logContents != null) destTags.Add("LOG", logContents); - if (fWithCUE && _config.writeArTagsOnEncode && _action == CUEAction.Encode && _useAccurateRip && _arVerify.AccResult == HttpStatusCode.OK) + if (fWithCUE && + _config.writeArTagsOnEncode && + _action == CUEAction.Encode && + _useAccurateRip && + _arVerify.ExceptionStatus == WebExceptionStatus.Success) GenerateAccurateRipTags(destTags, bestOffset, -1); return destTags; @@ -4540,7 +4587,10 @@ string status = processor.Go(); if (_useAccurateRip || _useCUEToolsDB) _arVerify.Init(_toc); if (_useCUEToolsDB && !_useCUEToolsDBFix) + { + _CUEToolsDB.TOC = _toc; // This might be unnecessary, because they point to the same structure - if we modify _toc, _CUEToolsDB.TOC gets updated. Unless we set cueSheet.TOC... _CUEToolsDB.Init(_useCUEToolsDBSibmit, _arVerify); + } ShowProgress(String.Format("{2} track {0:00} ({1:00}%)...", 0, 0, noOutput ? "Verifying" : "Writing"), 0.0, null, null); @@ -4698,7 +4748,10 @@ string status = processor.Go(); if (_useAccurateRip || _useCUEToolsDB) _arVerify.Init(_toc); if (_useCUEToolsDB && !_useCUEToolsDBFix) + { + _CUEToolsDB.TOC = _toc; _CUEToolsDB.Init(_useCUEToolsDBSibmit, _arVerify); + } ShowProgress(String.Format("Verifying ({0:00}%)...", 0), 0.0, null, null); @@ -4868,6 +4921,7 @@ string status = processor.Go(); string lineStr; CUELine line; int i; + string CDDBID = ""; using (StringReader sr = new StringReader(cue)) { @@ -4885,6 +4939,8 @@ string status = processor.Go(); foundAll &= (LocateFile(dir, line.Params[1], files) != null); } } + if (line.Params.Count == 3 && line.Params[0].ToUpper() == "REM" && line.Params[1].ToUpper() == "DISCID") + CDDBID = line.Params[2].ToLower(); } sr.Close(); } @@ -4915,7 +4971,12 @@ string status = processor.Go(); } } - if (!foundAll) + // Use old-fashioned way if dealing with archive (files != null) + // or with single file (filePos.Count == 1). + // In other cases we use CUESheet.ScanFolder, which + // is better at sorting and separating albums, + // but doesn't support archives and single files yet. + if (!foundAll && (files != null || filePos.Count == 1)) foreach (KeyValuePair format in _config.formats) { if (files == null) @@ -4934,6 +4995,8 @@ string status = processor.Go(); if (!foundAll && files == null) { List fileGroups = CUESheet.ScanFolder(_config, dir == "" ? "." : dir); + + // Choose filegroup by track count foreach (FileGroupInfo fileGroup in fileGroups) { if (fileGroup.type == FileGroupInfoType.TrackFiles && fileGroup.files.Count == filePos.Count) @@ -4944,12 +5007,47 @@ string status = processor.Go(); break; } audioFiles = fileGroup.files.ConvertAll(info => info.FullName).ToArray(); - Array.Sort(audioFiles); + // No need to sort - hopefully already sorted by ScanFolder extension = fileGroup.main.Extension.ToLower().TrimStart('.'); foundAll = true; } } - // Choose filegroup by DISCID? + + // Choose filegroup by DISCID + if (!foundAll) + foreach (FileGroupInfo fileGroup in fileGroups) + { + if (fileGroup.type == FileGroupInfoType.TrackFiles && fileGroup.files.Count == filePos.Count && fileGroup.TOC != null && AccurateRipVerify.CalculateCDDBId(fileGroup.TOC).ToLower() == CDDBID) + { + if (foundAll) + { + foundAll = false; + break; + } + audioFiles = fileGroup.files.ConvertAll(info => info.FullName).ToArray(); + extension = fileGroup.main.Extension.ToLower().TrimStart('.'); + foundAll = true; + } + } + + if (!foundAll && filePos.Count == 1) + foreach (FileGroupInfo fileGroup in fileGroups) + { + if (fileGroup.type == FileGroupInfoType.FileWithCUE && fileGroup.TOC != null) + { + CDImageLayout toc = CUE2TOC(cue, (int)fileGroup.TOC.AudioLength); + if (toc == null || toc.TrackOffsets != fileGroup.TOC.TrackOffsets) + continue; + if (foundAll) + { + foundAll = false; + break; + } + audioFiles = new string[] { fileGroup.main.FullName }; + extension = fileGroup.main.Extension.ToLower().TrimStart('.'); + foundAll = true; + } + } } if (!foundAll) @@ -5379,7 +5477,7 @@ string status = processor.Go(); //_toc[_toc.TrackCount][1].Start = tocFromLog[_toc.TrackCount].Start; } else - _toc.AddTrack(new CDTrack((uint)_toc.TrackCount, _toc.Length + 152U * 75U, value, false, false)); + _toc.AddTrack(new CDTrack((uint)_toc.TrackCount + 1, _toc.Length + 152U * 75U, value, false, false)); } } @@ -5495,6 +5593,70 @@ string status = processor.Go(); } } + public static CDImageLayout CUE2TOC(string cue, int fileTimeLengthFrames) + { + CDImageLayout toc = new CDImageLayout(); + bool seenFirstFileIndex = false; + int absoluteFileStartTime = 0; + int trackStart = -1; + try + { + using (TextReader sr = new StringReader(cue)) + { + string lineStr; + while ((lineStr = sr.ReadLine()) != null) + { + CUELine line = new CUELine(lineStr); + if (line.Params.Count > 0) + { + string command = line.Params[0].ToUpper(); + + if (command == "TRACK") + { + if (line.Params[2].ToUpper() != "AUDIO") + return null; + } + else if (command == "INDEX") + { + int index = int.Parse(line.Params[1]); + int timeRelativeToFileStart = CDImageLayout.TimeFromString(line.Params[2]); + if (!seenFirstFileIndex) + { + if (timeRelativeToFileStart != 0) + return null; + seenFirstFileIndex = true; + } + else + { + if (timeRelativeToFileStart > fileTimeLengthFrames) + return null; + if (Int32.TryParse(line.Params[1], out index) && index == 1 && trackStart >= 0) + toc.AddTrack(new CDTrack((uint)toc.TrackCount + 1, (uint)trackStart, (uint)(absoluteFileStartTime + timeRelativeToFileStart - trackStart), true, false)); + } + if (index == 1) + trackStart = absoluteFileStartTime + timeRelativeToFileStart; + } + else if (command == "PREGAP") + { + if (seenFirstFileIndex) + return null; + int pregapLength = CDImageLayout.TimeFromString(line.Params[1]); + absoluteFileStartTime += pregapLength; + } + } + } + sr.Close(); + } + } + catch + { + return null; + } + toc.AddTrack(new CDTrack((uint)toc.TrackCount + 1, (uint)trackStart, (uint)(absoluteFileStartTime + fileTimeLengthFrames - trackStart), true, false)); + toc[1][0].Start = 0; + return toc; + } + public static List ScanFolder(CUEConfig _config, string path) { DirectoryInfo dir = new DirectoryInfo(path); @@ -5534,15 +5696,21 @@ string status = processor.Go(); { string line = m3u.ReadLine(); if (line == null) break; - if (line[0] == '#') continue; - line = Path.Combine(Path.GetDirectoryName(file.FullName), line); - if (File.Exists(line)) - m3uGroup.files.Add(new FileInfo(line)); - else + if (line == "" || line[0] == '#') continue; + //if (line.IndexOfAny(Path.GetInvalidPathChars()) >= 0) + // continue; + try { - m3uGroup = null; - break; + line = Path.Combine(Path.GetDirectoryName(file.FullName), line); + if (File.Exists(line)) + { + m3uGroup.files.Add(new FileInfo(line)); + continue; + } } + catch { } + m3uGroup = null; + break; } while (true); }; if (m3uGroup != null) @@ -5584,7 +5752,8 @@ string status = processor.Go(); uint disc = 0; uint number = 0; string album = null; - bool cueFound = false; + string cueFound = null; + TimeSpan dur = TimeSpan.Zero; TagLib.UserDefined.AdditionalFileTypes.Config = _config; TagLib.File.IFileAbstraction fileAbsraction = new TagLib.File.LocalFileAbstraction(file.FullName); try @@ -5593,12 +5762,16 @@ string status = processor.Go(); disc = fileInfo.Tag.Disc; album = fileInfo.Tag.Album; number = fileInfo.Tag.Track; - cueFound = fmt.allowEmbed && Tagging.Analyze(fileInfo).Get("CUESHEET") != null; + dur = fileInfo.Properties.Duration; + cueFound = fmt.allowEmbed ? Tagging.Analyze(fileInfo).Get("CUESHEET") : null; } catch { } - if (cueFound) + if (cueFound != null) { - fileGroups.Add(new FileGroupInfo(file, FileGroupInfoType.FileWithCUE)); + FileGroupInfo group = new FileGroupInfo(file, FileGroupInfoType.FileWithCUE); + if (dur != TimeSpan.Zero) + group.TOC = CUE2TOC(cueFound, (int)((dur.TotalMilliseconds * 75 + 500) / 1000)); + fileGroups.Add(group); continue; } disc = Math.Min(5, Math.Max(1, disc)); @@ -5614,20 +5787,17 @@ string status = processor.Go(); break; } } - if (groupFound != null) - { - groupFound.files.Add(file); - if (number > 0) groupFound.numbers.Add(file, number); - } - else + if (groupFound == null) { groupFound = new FileGroupInfo(file, FileGroupInfoType.TrackFiles); groupFound.discNo = disc; groupFound.album = album; - groupFound.files.Add(file); + groupFound.durations = new Dictionary(); fileGroups.Add(groupFound); - if (number > 0) groupFound.numbers.Add(file, number); } + groupFound.files.Add(file); + if (number > 0) groupFound.numbers.Add(file, number); + if (dur != TimeSpan.Zero) groupFound.durations.Add(file, dur); } } fileGroups.RemoveAll(group => group.type == FileGroupInfoType.TrackFiles && group.files.Count < 2); @@ -5637,6 +5807,17 @@ string status = processor.Go(); { group.files.Sort(group.CompareNumbers); group.numbers = null; + group.TOC = new CDImageLayout(); + foreach(FileSystemInfo f in group.files) + { + if (!group.durations.ContainsKey(f)) + { + group.TOC = null; + break; + } + uint len = (uint) ((group.durations[f].TotalMilliseconds * 75 + 500) / 1000); + group.TOC.AddTrack(new CDTrack((uint)group.TOC.TrackCount + 1, group.TOC.Length, len, true, false)); + } } return fileGroups; } @@ -5663,32 +5844,38 @@ string status = processor.Go(); case "default": return Go(); case "only if found": - return ArVerify.AccResult != HttpStatusCode.OK ? WriteReport() : Go(); + return ArVerify.ExceptionStatus != WebExceptionStatus.Success ? WriteReport() : Go(); case "submit": { if (!_useCUEToolsDB) return "CUETools DB not enabled"; if (ArVerify.ARStatus != null) - return "AccurateRip: " + ArVerify.ARStatus; - if (ArVerify.WorstTotal() < 3) - return "AccurateRip: confidence too low"; + return "AccurateRip: " + ArVerify.ARStatus + ", will not submit"; + if (ArVerify.WorstTotal() < 2) + return "AccurateRip: confidence too low, will not submit"; //if (CTDB.AccResult == HttpStatusCode.OK) //return "CUEToolsDB: disc already present in database"; if (CTDB.AccResult != HttpStatusCode.NotFound && CTDB.AccResult != HttpStatusCode.OK)// && CTDB.AccResult != HttpStatusCode.NoContent) return "CUEToolsDB: " + CTDB.DBStatus; + if (_accurateRipId != null && AccurateRipVerify.CalculateAccurateRipId(_toc) != _accurateRipId) + return string.Format("CUEToolsDB: Using preserved id {0}, actual id is {1}", _accurateRipId, AccurateRipVerify.CalculateAccurateRipId(_toc)); _useCUEToolsDBSibmit = true; string status = Go(); if (CTDB.AccResult == HttpStatusCode.OK) foreach (DBEntry entry in CTDB.Entries) if (entry.toc.TrackOffsets == _toc.TrackOffsets && !entry.hasErrors) return "CUEToolsDB: " + CTDB.Status; - if (ArVerify.WorstConfidence() < 3) - return status + ": confidence too low"; - return CTDB.Submit((int)ArVerify.WorstConfidence(), (int)ArVerify.WorstTotal(), Artist, Title); + if (ArVerify.WorstConfidence() < 2) + { + CTDB.SubStatus = "will not submit"; + return GenerateAccurateRipStatus(); + } + CTDB.Submit((int)ArVerify.WorstConfidence(), (int)ArVerify.WorstTotal(), Artist, Title); + return GenerateAccurateRipStatus(); } case "repair": { - UseCUEToolsDB(false, "CUETools 2.0.8"); + UseCUEToolsDB(false, "CUETools " + CUEToolsVersion); Action = CUEAction.Verify; if (CTDB.DBStatus != null) return CTDB.DBStatus; @@ -5724,7 +5911,7 @@ string status = processor.Go(); } case "fix offset": { - if (ArVerify.AccResult != HttpStatusCode.OK) + if (ArVerify.ExceptionStatus != WebExceptionStatus.Success) return WriteReport(); WriteOffset = 0; @@ -5745,7 +5932,7 @@ string status = processor.Go(); case "encode if verified": { - if (ArVerify.AccResult != HttpStatusCode.OK) + if (ArVerify.ExceptionStatus != WebExceptionStatus.Success) return WriteReport(); Action = CUEAction.Verify; @@ -5805,11 +5992,24 @@ string status = processor.Go(); { public List files; public Dictionary numbers; + public Dictionary durations; public FileSystemInfo main; public FileGroupInfoType type; + public CDImageLayout TOC; public uint discNo; public string album; + public override string ToString() + { + switch (type) + { + case FileGroupInfoType.TrackFiles: + return (album == null ? main.Name : + album + (discNo > 0 ? string.Format(" (disc {0})", discNo) : "")) + ": " + files.Count.ToString() + " files"; + } + return main.Name; + } + public FileGroupInfo(FileSystemInfo _main, FileGroupInfoType _type) { main = _main; @@ -5818,12 +6018,44 @@ string status = processor.Go(); numbers = new Dictionary(); } + public static long IntPrefix(ref string a) + { + long na = 0; + string sa = a; + sa = sa.TrimStart(' ', '_'); + if (!(sa.Length > 0 && sa[0] >= '0' && sa[0] <= '9')) + return -1; + while (sa.Length > 0 && sa[0] >= '0' && sa[0] <= '9') + { + na = 10 * na + (sa[0] - '0'); + sa = sa.Substring(1); + } + a = sa.TrimStart(' ', '_'); + return na; + } + + public static int CompareTrackNames(string a, string b) + { + while (a.Length > 0 && b.Length > 0 && a[0] == b[0]) + { + a = a.Substring(1); + b = b.Substring(1); + } + long na = IntPrefix(ref a); + long nb = IntPrefix(ref b); + if (na != nb) + return Comparer.Default.Compare(na, nb); + if (na < 0) + return Comparer.Default.Compare(a, b); + return CompareTrackNames(a, b); + } + public int CompareNumbers(FileSystemInfo a, FileSystemInfo b) { if (numbers.ContainsKey(a) && numbers.ContainsKey(b)) return Comparer.Default.Compare(numbers[a], numbers[b]); if (!numbers.ContainsKey(a) && !numbers.ContainsKey(b)) - return Comparer.Default.Compare(a.FullName, b.FullName); + return CompareTrackNames(a.FullName, b.FullName); return Comparer.Default.Compare(numbers.ContainsKey(a), numbers.ContainsKey(b)); } diff --git a/CUETools.Processor/Properties/AssemblyInfo.cs b/CUETools.Processor/Properties/AssemblyInfo.cs index 0803b9c..092c69b 100644 --- a/CUETools.Processor/Properties/AssemblyInfo.cs +++ b/CUETools.Processor/Properties/AssemblyInfo.cs @@ -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("2.0.8.0")] -[assembly: AssemblyFileVersion("2.0.8.0")] +[assembly: AssemblyVersion("2.0.9.0")] +[assembly: AssemblyFileVersion("2.0.9.0")] diff --git a/CUETools.Ripper.Console/Program.cs b/CUETools.Ripper.Console/Program.cs index fa694be..d2bd40c 100644 --- a/CUETools.Ripper.Console/Program.cs +++ b/CUETools.Ripper.Console/Program.cs @@ -89,7 +89,7 @@ namespace CUETools.ConsoleRipper static void Main(string[] args) { Console.SetOut(Console.Error); - Console.WriteLine("CUERipper v2.0.8 Copyright (C) 2008-10 Gregory S. Chudov"); + Console.WriteLine("CUERipper v2.0.9 Copyright (C) 2008-10 Gregory S. Chudov"); Console.WriteLine("This is free software under the GNU GPLv3+ license; There is NO WARRANTY, to"); Console.WriteLine("the extent permitted by law. for details."); @@ -299,7 +299,7 @@ namespace CUETools.ConsoleRipper logWriter.WriteLine(); logWriter.WriteLine("AccurateRip summary"); logWriter.WriteLine(); - arVerify.GenerateFullLog(logWriter, true); + arVerify.GenerateFullLog(logWriter, true, ArId); logWriter.WriteLine(); logWriter.WriteLine("End of status report"); logWriter.Close(); diff --git a/CUETools.Ripper.SCSI/Properties/AssemblyInfo.cs b/CUETools.Ripper.SCSI/Properties/AssemblyInfo.cs index 66c9df1..ed82be6 100644 --- a/CUETools.Ripper.SCSI/Properties/AssemblyInfo.cs +++ b/CUETools.Ripper.SCSI/Properties/AssemblyInfo.cs @@ -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("2.0.8.0")] -[assembly: AssemblyFileVersion("2.0.8.0")] +[assembly: AssemblyVersion("2.0.9.0")] +[assembly: AssemblyFileVersion("2.0.9.0")] diff --git a/CUETools.Ripper.SCSI/SCSIDrive.cs b/CUETools.Ripper.SCSI/SCSIDrive.cs index 8fa2def..d3ac09c 100644 --- a/CUETools.Ripper.SCSI/SCSIDrive.cs +++ b/CUETools.Ripper.SCSI/SCSIDrive.cs @@ -1180,7 +1180,7 @@ namespace CUETools.Ripper.SCSI { get { - return "CUERipper v2.0.8 Copyright (C) 2008-10 Gregory S. Chudov"; + return "CUERipper v2.0.9 Copyright (C) 2008-10 Gregory S. Chudov"; // ripper.GetName().Name + " " + ripper.GetName().Version; } } diff --git a/CUETools.Ripper/Properties/AssemblyInfo.cs b/CUETools.Ripper/Properties/AssemblyInfo.cs index ca7b08c..85f3c3d 100644 --- a/CUETools.Ripper/Properties/AssemblyInfo.cs +++ b/CUETools.Ripper/Properties/AssemblyInfo.cs @@ -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("2.0.8.0")] -[assembly: AssemblyFileVersion("2.0.8.0")] +[assembly: AssemblyVersion("2.0.9.0")] +[assembly: AssemblyFileVersion("2.0.9.0")] diff --git a/CUETools/CUETools.TestCodecs/ALACWriterTest.cs b/CUETools/CUETools.TestCodecs/ALACWriterTest.cs index 1c9cfb7..8021557 100644 --- a/CUETools/CUETools.TestCodecs/ALACWriterTest.cs +++ b/CUETools/CUETools.TestCodecs/ALACWriterTest.cs @@ -80,7 +80,7 @@ namespace CUETools.TestCodecs ALACWriter target; target = new ALACWriter("alacwriter0.m4a", null, buff.PCM); - target.PaddingLength = 1; + target.Padding = 1; target.Vendor = "CUETools"; target.CreationTime = DateTime.Parse("15 Aug 1976"); target.Write(buff); @@ -88,7 +88,7 @@ namespace CUETools.TestCodecs CollectionAssert.AreEqual(File.ReadAllBytes("alac.m4a"), File.ReadAllBytes("alacwriter0.m4a"), "alacwriter0.m4a doesn't match."); target = new ALACWriter("alacwriter1.m4a", null, buff.PCM); - target.PaddingLength = 1; + target.Padding = 1; target.Vendor = "CUETools"; target.CreationTime = DateTime.Parse("15 Aug 1976"); target.FinalSampleCount = buff.Length; diff --git a/CUETools/CUETools.TestCodecs/CUETools.TestCodecs.csproj b/CUETools/CUETools.TestCodecs/CUETools.TestCodecs.csproj index 067deec..0d12178 100644 --- a/CUETools/CUETools.TestCodecs/CUETools.TestCodecs.csproj +++ b/CUETools/CUETools.TestCodecs/CUETools.TestCodecs.csproj @@ -32,10 +32,20 @@ full + + False + ..\..\ThirdParty\CSScriptLibrary.v1.1.dll + + + + + False + ..\..\ThirdParty\taglib-sharp.dll + @@ -65,14 +75,34 @@ CUETools.Codecs.FLAKE False + + {8A0426FA-0BC2-4C49-A6E5-1F9A68156F19} + CUETools.Codecs.LossyWAV + {6458A13A-30EF-45A9-9D58-E5031B17BEE2} CUETools.Codecs + + {14EE067E-C218-4625-9540-2361AB27C4A6} + CUETools.Compression + {A6303861-CA06-4C2C-A104-BA9291538F6F} CUETools.DSP.Resampler + + {D2700165-3E77-4B28-928D-551F5FC11954} + CUETools.Ripper + + + {5ADCFD6D-BFEA-4B10-BB45-9083BBB56AF4} + Freedb + + + {74C2036B-2C9B-4FC8-B7BD-AE81A8DCE533} + MusicBrainz + \ No newline at end of file diff --git a/CUETools/CUETools.TestCodecs/FlakeWriterTest.cs b/CUETools/CUETools.TestCodecs/FlakeWriterTest.cs index e026692..2ead645 100644 --- a/CUETools/CUETools.TestCodecs/FlakeWriterTest.cs +++ b/CUETools/CUETools.TestCodecs/FlakeWriterTest.cs @@ -80,7 +80,7 @@ namespace CUETools.TestCodecs FlakeWriter target; target = new FlakeWriter("flakewriter0.flac", null, buff.PCM); - target.PaddingLength = 1; + target.Padding = 1; target.DoSeekTable = false; //target.Vendor = "CUETools"; //target.CreationTime = DateTime.Parse("15 Aug 1976"); @@ -90,7 +90,7 @@ namespace CUETools.TestCodecs CollectionAssert.AreEqual(File.ReadAllBytes("flake.flac"), File.ReadAllBytes("flakewriter0.flac"), "flakewriter0.flac doesn't match."); target = new FlakeWriter("flakewriter1.flac", null, buff.PCM); - target.PaddingLength = 1; + target.Padding = 1; target.DoSeekTable = false; //target.Vendor = "CUETools"; //target.CreationTime = DateTime.Parse("15 Aug 1976"); diff --git a/CUETools/CUETools.TestParity/CDRepairDecodeTest.cs b/CUETools/CUETools.TestParity/CDRepairDecodeTest.cs index e837834..c6ddeac 100644 --- a/CUETools/CUETools.TestParity/CDRepairDecodeTest.cs +++ b/CUETools/CUETools.TestParity/CDRepairDecodeTest.cs @@ -28,6 +28,7 @@ namespace CUETools.TestParity const int offset = 48; static AccurateRipVerify ar; static CDImageLayout toc; + static CDImageLayout toc2; //const int offset = 5 * 588 - 5; //const int offset = 2000; @@ -58,6 +59,7 @@ namespace CUETools.TestParity public static void MyClassInitialize(TestContext testContext) { toc = new CDImageLayout(1, 1, 1, string.Format("0 {0}", (finalSampleCount / 588).ToString())); + toc2 = new CDImageLayout(1, 1, 1, string.Format("32 {0}", (32 + finalSampleCount / 588).ToString())); ar = new AccurateRipVerify(toc, null); new Random(2423).NextBytes(wav); @@ -69,7 +71,7 @@ namespace CUETools.TestParity AudioBuffer buff = new AudioBuffer(AudioPCMConfig.RedBook, 0); CDRepairEncode encode = new CDRepairEncode(ar, stride, npar, false, true); buff.Prepare(wav, finalSampleCount); - ar.Init(); + ar.Init(toc); ar.Write(buff); ar.Close(); parity = encode.Parity; @@ -106,7 +108,7 @@ namespace CUETools.TestParity AudioBuffer buff = new AudioBuffer(AudioPCMConfig.RedBook, 0); CDRepairEncode decode = new CDRepairEncode(ar, stride, npar, true, false); buff.Prepare(wav, finalSampleCount); - ar.Init(); + ar.Init(toc); ar.Write(buff); ar.Close(); int actualOffset; @@ -116,6 +118,30 @@ namespace CUETools.TestParity Assert.AreEqual(0, actualOffset, "wrong offset"); } + /// + ///Verifying rip that is accurate with pregap + /// + [TestMethod()] + public void CDRepairDecodeOriginalWithPregapTest() + { + AudioBuffer buff = new AudioBuffer(AudioPCMConfig.RedBook, 0); + ar.Init(toc2); + CDRepairEncode decode = new CDRepairEncode(ar, stride, npar, true, false); + buff.Prepare(wav, (int)toc2.Pregap * 588); + ar.Write(buff); + buff.Prepare(wav, finalSampleCount); + ar.Write(buff); + ar.Close(); + int actualOffset; + bool hasErrors; + Assert.IsTrue(decode.FindOffset(npar, parity, 0, crc, out actualOffset, out hasErrors)); + Assert.IsTrue(hasErrors, "doesn't have errors"); + Assert.AreEqual(-1176, actualOffset, "wrong offset"); + CDRepairFix fix = decode.VerifyParity(parity, actualOffset); + Assert.IsTrue(fix.HasErrors, "doesn't have errors"); + Assert.IsTrue(fix.CanRecover, "cannot recover"); + } + /// ///Verifying rip that has errors /// @@ -125,7 +151,7 @@ namespace CUETools.TestParity AudioBuffer buff = new AudioBuffer(AudioPCMConfig.RedBook, 0); CDRepairEncode decode = new CDRepairEncode(ar, stride, npar, true, false); buff.Prepare(wav2, finalSampleCount); - ar.Init(); + ar.Init(toc); ar.Write(buff); ar.Close(); int actualOffset; @@ -148,7 +174,7 @@ namespace CUETools.TestParity CDRepairEncode decode = new CDRepairEncode(ar, stride, npar, true, false); Array.Copy(wav, offset * 4, wav3, 0, (finalSampleCount - offset) * 4); buff.Prepare(wav3, finalSampleCount); - ar.Init(); + ar.Init(toc); ar.Write(buff); ar.Close(); int actualOffset; @@ -166,7 +192,7 @@ namespace CUETools.TestParity { AudioBuffer buff = new AudioBuffer(AudioPCMConfig.RedBook, 0); CDRepairEncode decode = new CDRepairEncode(ar, stride, npar, true, false); - ar.Init(); + ar.Init(toc); buff.Prepare(new byte[offset * 4], offset); ar.Write(buff); buff.Prepare(wav, finalSampleCount - offset); @@ -189,7 +215,7 @@ namespace CUETools.TestParity CDRepairEncode decode = new CDRepairEncode(ar, stride, npar, true, false); Array.Copy(wav2, offset * 4, wav3, 0, (finalSampleCount - offset) * 4); buff.Prepare(wav3, finalSampleCount); - ar.Init(); + ar.Init(toc); ar.Write(buff); ar.Close(); int actualOffset; @@ -210,7 +236,7 @@ namespace CUETools.TestParity { AudioBuffer buff = new AudioBuffer(AudioPCMConfig.RedBook, 0); CDRepairEncode decode = new CDRepairEncode(ar, stride, npar, true, false); - ar.Init(); + ar.Init(toc); buff.Prepare(new byte[offset * 4], offset); ar.Write(buff); buff.Prepare(wav2, finalSampleCount - offset); diff --git a/CUETools/CUETools.TestParity/CDRepairEncodeTest.cs b/CUETools/CUETools.TestParity/CDRepairEncodeTest.cs index f582d4f..a817279 100644 --- a/CUETools/CUETools.TestParity/CDRepairEncodeTest.cs +++ b/CUETools/CUETools.TestParity/CDRepairEncodeTest.cs @@ -97,7 +97,7 @@ namespace CUETools.TestParity AudioBuffer buff = new AudioBuffer(AudioPCMConfig.RedBook, 0); CDRepairEncode encode = new CDRepairEncode(ar, stride, npar, false, true); buff.Prepare(wav, finalSampleCount); - ar.Init(); + ar.Init(toc); ar.Write(buff); ar.Close(); Assert.AreEqual(8, encode.Parity[0]); diff --git a/CUETools/CUETools.TestParity/CDRepairTest.cs b/CUETools/CUETools.TestParity/CDRepairTest.cs index dba864b..1e7af1c 100644 --- a/CUETools/CUETools.TestParity/CDRepairTest.cs +++ b/CUETools/CUETools.TestParity/CDRepairTest.cs @@ -72,7 +72,7 @@ namespace CUETools.TestParity AudioBuffer buff = new AudioBuffer(AudioPCMConfig.RedBook, 0); CDRepairEncode encode = new CDRepairEncode(ar, stride, npar, false, true); buff.Prepare(wav, finalSampleCount); - ar.Init(); + ar.Init(toc); ar.Write(buff); ar.Close(); parity = encode.Parity; @@ -80,7 +80,7 @@ namespace CUETools.TestParity decode = new CDRepairEncode(ar2, stride, npar, true, false); buff.Prepare(wav2, finalSampleCount); - ar2.Init(); + ar2.Init(toc); ar2.Write(buff); ar2.Close(); @@ -90,7 +90,7 @@ namespace CUETools.TestParity fix = decode.VerifyParity(parity, actualOffset); decode2 = new CDRepairEncode(ar3, stride, npar, true, false); - ar3.Init(); + ar3.Init(toc); buff.Prepare(new byte[offset * 4], offset); ar3.Write(buff); buff.Prepare(wav2, finalSampleCount - offset); diff --git a/CUETools/CUETools.TestProcessor/CUETools.TestProcessor.csproj b/CUETools/CUETools.TestProcessor/CUETools.TestProcessor.csproj index c87f2a0..8a2b8a2 100644 --- a/CUETools/CUETools.TestProcessor/CUETools.TestProcessor.csproj +++ b/CUETools/CUETools.TestProcessor/CUETools.TestProcessor.csproj @@ -3,7 +3,7 @@ Debug AnyCPU - 8.0.50727 + 9.0.30729 2.0 {A430AD28-B76A-4ED0-AF7D-D13B8969297F} Library @@ -41,8 +41,13 @@ + + False + ..\..\ThirdParty\taglib-sharp.dll + + @@ -55,14 +60,30 @@ {1DD41038-D885-46C5-8DDE-E0B82F066584} CUETools.CDImage + + {8A0426FA-0BC2-4C49-A6E5-1F9A68156F19} + CUETools.Codecs.LossyWAV + {6458A13A-30EF-45A9-9D58-E5031B17BEE2} CUETools.Codecs + + {14EE067E-C218-4625-9540-2361AB27C4A6} + CUETools.Compression + + + {AA2A9A7E-45FB-4632-AD85-85B0E556F818} + CUETools.CTDB + {4911BD82-49EF-4858-8B51-5394F86739A4} CUETools.Processor + + {D2700165-3E77-4B28-928D-551F5FC11954} + CUETools.Ripper + {5ADCFD6D-BFEA-4B10-BB45-9083BBB56AF4} Freedb diff --git a/CUETools/CUETools.TestProcessor/FileGroupInfoTest.cs b/CUETools/CUETools.TestProcessor/FileGroupInfoTest.cs new file mode 100644 index 0000000..50b6380 --- /dev/null +++ b/CUETools/CUETools.TestProcessor/FileGroupInfoTest.cs @@ -0,0 +1,82 @@ +using CUETools.Processor; +using Microsoft.VisualStudio.TestTools.UnitTesting; +namespace CUETools.TestProcessor +{ + + + /// + ///This is a test class for FileGroupInfoTest and is intended + ///to contain all FileGroupInfoTest Unit Tests + /// + [TestClass()] + public class FileGroupInfoTest + { + + + private TestContext testContextInstance; + + /// + ///Gets or sets the test context which provides + ///information about and functionality for the current test run. + /// + public TestContext TestContext + { + get + { + return testContextInstance; + } + set + { + testContextInstance = value; + } + } + + #region Additional test attributes + // + //You can use the following additional attributes as you write your tests: + // + //Use ClassInitialize to run code before running the first test in the class + //[ClassInitialize()] + //public static void MyClassInitialize(TestContext testContext) + //{ + //} + // + //Use ClassCleanup to run code after all tests in a class have run + //[ClassCleanup()] + //public static void MyClassCleanup() + //{ + //} + // + //Use TestInitialize to run code before running each test + //[TestInitialize()] + //public void MyTestInitialize() + //{ + //} + // + //Use TestCleanup to run code after each test has run + //[TestCleanup()] + //public void MyTestCleanup() + //{ + //} + // + #endregion + + + /// + ///A test for CompareTrackNames + /// + [TestMethod()] + public void CompareTrackNamesTest() + { + Assert.AreEqual(0, FileGroupInfo.CompareTrackNames("abc", "abc")); + Assert.AreEqual(0, FileGroupInfo.CompareTrackNames(" 1.abc", "1.abc")); + Assert.AreEqual(-1, FileGroupInfo.CompareTrackNames("0 abc", "1 abc")); + Assert.AreEqual(-1, FileGroupInfo.CompareTrackNames("0.abc", "1.abc")); + Assert.AreEqual(-1, FileGroupInfo.CompareTrackNames("1 abc", "1.1 abc")); + Assert.AreEqual(-1, FileGroupInfo.CompareTrackNames("1.1 abc", "1.10 abc")); + Assert.AreEqual(-1, FileGroupInfo.CompareTrackNames("1.10 abc", "2.1 abc")); + Assert.AreEqual(-1, FileGroupInfo.CompareTrackNames("2.1.abc", "10.abc")); + Assert.AreEqual(-1, FileGroupInfo.CompareTrackNames("Track 2a", "Track 10")); + } + } +} diff --git a/CUETools/CUETools.sln b/CUETools/CUETools.sln index aa3e07d..09baa38 100644 --- a/CUETools/CUETools.sln +++ b/CUETools/CUETools.sln @@ -167,6 +167,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CUETools.DSP.Resampler", ". EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CUETools.Codecs.Icecast", "..\CUETools.Codecs.Icecast\CUETools.Codecs.Icecast.csproj", "{8FC5DA7C-F6AC-4D04-85BC-1233DDF569E7}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPFRipper", "..\WPFRipper\WPFRipper.csproj", "{2D8D7A03-DFFA-44EF-9299-8BB56D122245}" +EndProject Global GlobalSection(TestCaseManagementSettings) = postSolution CategoryFile = CUETools1.vsmdi @@ -841,6 +843,18 @@ Global {8FC5DA7C-F6AC-4D04-85BC-1233DDF569E7}.Release|Mixed Platforms.Build.0 = Release|Any CPU {8FC5DA7C-F6AC-4D04-85BC-1233DDF569E7}.Release|Win32.ActiveCfg = Release|Any CPU {8FC5DA7C-F6AC-4D04-85BC-1233DDF569E7}.Release|x64.ActiveCfg = Release|Any CPU + {2D8D7A03-DFFA-44EF-9299-8BB56D122245}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2D8D7A03-DFFA-44EF-9299-8BB56D122245}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2D8D7A03-DFFA-44EF-9299-8BB56D122245}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {2D8D7A03-DFFA-44EF-9299-8BB56D122245}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {2D8D7A03-DFFA-44EF-9299-8BB56D122245}.Debug|Win32.ActiveCfg = Debug|Any CPU + {2D8D7A03-DFFA-44EF-9299-8BB56D122245}.Debug|x64.ActiveCfg = Debug|Any CPU + {2D8D7A03-DFFA-44EF-9299-8BB56D122245}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2D8D7A03-DFFA-44EF-9299-8BB56D122245}.Release|Any CPU.Build.0 = Release|Any CPU + {2D8D7A03-DFFA-44EF-9299-8BB56D122245}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {2D8D7A03-DFFA-44EF-9299-8BB56D122245}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {2D8D7A03-DFFA-44EF-9299-8BB56D122245}.Release|Win32.ActiveCfg = Release|Any CPU + {2D8D7A03-DFFA-44EF-9299-8BB56D122245}.Release|x64.ActiveCfg = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -854,6 +868,7 @@ Global {8CF07381-BEA2-4AFC-B3DD-9B2F21C65A3A} = {90FD290C-5D65-42A6-AC9C-928730432116} {39B43BBB-BAFC-4D85-9BEA-3BCB7EFED89C} = {90FD290C-5D65-42A6-AC9C-928730432116} {D2700165-3E77-4B28-928D-551F5FC11954} = {90FD290C-5D65-42A6-AC9C-928730432116} + {2D8D7A03-DFFA-44EF-9299-8BB56D122245} = {90FD290C-5D65-42A6-AC9C-928730432116} {A5A8D8FA-9E32-4010-8AAF-AE580C5AF728} = {4B59E09C-A51F-4B80-91BE-987904DCEF7D} {A574F3B1-E38B-4EE4-9394-49D6E2DF52EA} = {4B59E09C-A51F-4B80-91BE-987904DCEF7D} {9253A314-1821-42BF-B02F-2BF986B1765D} = {4B59E09C-A51F-4B80-91BE-987904DCEF7D} diff --git a/CUETools/Properties/AssemblyInfo.cs b/CUETools/Properties/AssemblyInfo.cs index ab60575..429b688 100644 --- a/CUETools/Properties/AssemblyInfo.cs +++ b/CUETools/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("2.0.8.0")] -[assembly: AssemblyFileVersion("2.0.8.0")] +[assembly: AssemblyVersion("2.0.9.0")] +[assembly: AssemblyFileVersion("2.0.9.0")] diff --git a/CUETools/Resources/more/card--pencil.png b/CUETools/Resources/more/card--pencil.png new file mode 100644 index 0000000000000000000000000000000000000000..dd444e582c2aa33c2859e0cffb31bde4dc744c16 GIT binary patch literal 573 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s7BuiW)N`mv#O3D+9QW+dm z@{>{(JaZG%Q-e|yQz{EjrrIztFy8lcaSW-rm9!>)=cLAo6DKxG9QgU4_3%v7c1fFc zv71Zwl&yWk%6!;GjZNs_|Ns9(^*(;G(!O?`eNS3KMhausPbOB?&WmUMe(#f7-qKQX z{LxXtz;)}Yb@uH2ZXBW?JL}(kjt}pS9{hiNd*%QC|JHo^|K#N4|M7dPzS?`}U!H$| zzvTbF|IdGTe&2r1kF%efdCbq18A?dJFnn{Pu<79C(Akd8!IK%6On-WPeLPQnBikQV zts`u9`>f6se0Sn+p19ENaM^;i*wtKYnW@nm!#u*stS-@l_5{ye=a+h+ZI zx1>)GkHofI`*RCY1CJ>zOyCdX?y;N@w`{(Bok7!_pVAr~efjg^4kkP{XiPl4Et%(4 z+ESiJ4rdK4C&*2R6WhS3@chru=7&t||Hax)t__#exuYfN@|TK4!lh zzk>V1!N=wAALNu&iY<_v5I2D_K|H~jK|X=?730fPCc*y;E*@nm5o1?ZpW)W;RkE{Q zK-|D+Z^gekGiOen+BmtpJMq(>pSM$bdbPK|yIsz5#Qm6p;RG2E-VXjt%$H7|SiV&B z@R7sHtVP$Bi|fn%t^V>tVDg+fvh!P7WHwFSc=GS>PfsN^q&G2cWYCE5I1|1={(JaZG%Q-e|yQz{EjrrIztFa~?NIEGZ*O8WEvzdf^R1FMUHp`j_0rmg~?>!fV9 zq*#SCm%}~*zfSG1|L+yKpzC#G1@EkfyEHX5|H<3cB>edNod59s{q+ZDOb(vl7!ffm z@!A?au^rqC8aU53tS)|bCedy4RL+yC(;d1b91|J79I{gBWJvnU|Apxe!zLzy6oxb0 zYcDYD<~lMpV56SGwd0R!Bx(gaiWAvFoOv~zHXUG)=vcSF;m^0X(gq6u4L^L~F#Pa| z%ebJR!0^nRnD-{j}>36iX zI`Rv6JH-mJiq2*^axBA-Ju%=`0`nto2N_=D1WtkP&W9PR@vIJsN|(vp%KIgdyh zTm6{GEO^9^;ZcghwpJ+v-V}~2tY;ib-vrEdln`NF-jKwYP;X#l{(JaZG%Q-e|yQz{EjrrIztFs}4;aSW-rwItZuo7qv|-?w)@9cl~2xWX1SDMTz4 zc64kq6Wh4yN`1omxxETaixeDnr`%ZeAiW~5hSe@!~$dO-WY9OErl_a&z1?q1tKB6T3XCXR-|e7rLFIw9L9%4v>QnE(Ds2$0 zXncQp`?vEhnkyS?)y)`JYR!39yD4*4MsAj?(auep)4UHU-VIBT;1DXDyy}(yw#3Gc zj}vUYZ%zqXli%}R(CJyoRCSKRtqBrO3hOF=d{`|xL6_@7&$5SiBGs2>{#mX0V|gu? b0mCUy)88-jRa+Ps7#KWV{an^LB{Ts5*RAH- literal 0 HcmV?d00001 diff --git a/CUETools/Resources/more/icons/sticky-note.png b/CUETools/Resources/more/icons/sticky-note.png new file mode 100644 index 0000000000000000000000000000000000000000..992eafce7f8b9f1f34bc0fe4bd729f9ba08974e5 GIT binary patch literal 374 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s7BuiW)N`mv#O3D+9QW+dm z@{>{(JaZG%Q-e|yQz{EjrrIztFiLp3IEGZ*S`xf5kI9f{>ttu1r`$6Fe)jf#V3&>f z$tMvhxvG!VuvAyL>7iIiX>#(*kgfKGm(KoO!9ky>&H@BzMHrceIKfN?6+Gv%s6n z#nJIeTL|m5UkB3FCs!|RHTdy6zrNDdvx%RP^~Q#)ho^4VY0lftz58y>$%nI-EBG#K zt+5U=)4%M-a@jbrd9~Vye}++tkGiLPkyJP^|N6~@;IBVEi_I*Ma^0XiFZu3$jRni* cvPv+Ry_f6w6Qfzgz`(%Z>FVdQ&MBb@0OY8dUH||9 literal 0 HcmV?d00001 diff --git a/CUETools/Resources/more/icons/sticky-notes-stack.png b/CUETools/Resources/more/icons/sticky-notes-stack.png new file mode 100644 index 0000000000000000000000000000000000000000..6727595f00ea155e4d33295ca9f7c27b09fa667f GIT binary patch literal 463 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s7BuiW)N`mv#O3D+9QW+dm z@{>{(JaZG%Q-e|yQz{EjrrIztFcx~cIEGZ*nlstfo7qvIE&ZDxUk)p`w&(2o3LI?z z8+vd2G{17m?@f-Y2#fYXCtV+55s|>|1sq++I(mC!`+V>0E={|B`>UR%q2Bg4$KU?m zWBj`@DtpCs!4-@yCvLei%xJlP+I#J??S~%eIA0Rc+8lgbn_<4mV$NB!ru~~?m&Bl+ zUc7qGJ`RI(EHmrs?kaY&-teFOVNnK;+OhN-Dkm8Kz4~+Emf2&a1dit|ZJa8cRR;>r zbv@g~vf&nwz=nv|Kco{BBSn>p&UtCR`Yz*8(IBU>?P5jx(iVrnIfN!ST`U<=W+kQ^F|6bDgCvSxdR9*}dOqcCCGO_ba=#@~5aT4CmSp^E91!dgif3Ut)Rv z&j~KsDVGw$72m8q+r?O7b>rTRIrdt1I$qT+V(WvS^lnn`wDNv7|EYHaBSV{T#;wx| STs;g73=E#GelF{r5}E*wh{>Y> literal 0 HcmV?d00001 diff --git a/CUETools/Resources/more/icons/text_list_numbers.png b/CUETools/Resources/more/icons/text_list_numbers.png new file mode 100644 index 0000000000000000000000000000000000000000..33b0b8df394dd66b20f74b551d5d52eb53cf335d GIT binary patch literal 357 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s7SkfJR9T^zbpD<_bdda}R zAX(xXQ4*Y=R#Ki=l*-_klAn~S;F+74o*I;zm{M7IGS!BGf#JKSi(`nz>Es{(|JyUG zO87iEQ@>`@ix0d1r${qg@|nnJ;GFR0)2B~43jgARf zrNx(vcRbs%W5=70j*kD0jg9~J?%DIt+S>a6_Kh2V<|ie6iVqL}zJJy%sVs$UYwQ2* zFFbqszv=3Ed;tp6^sE2uFM0X+|Iu#w$?usaq`ltb{p2{4hw&L!H#fJNw{G3~9~u(! z@AS!&f5pYc|Ld!$e3{?g{@mW$`geU=TG|x{mQ0q!-HWtkOZZ(FzSm#flB+MS%fP_E N;OXk;vd$@?2>?jXq2&Mo literal 0 HcmV?d00001 diff --git a/CUETools/frmCUETools.Designer.cs b/CUETools/frmCUETools.Designer.cs index 1b5c09e..725caef 100644 --- a/CUETools/frmCUETools.Designer.cs +++ b/CUETools/frmCUETools.Designer.cs @@ -35,7 +35,6 @@ namespace JDP { this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.textBatchReport = new System.Windows.Forms.TextBox(); this.grpInput = new System.Windows.Forms.GroupBox(); - this.fileSystemTreeView1 = new CUEControls.FileSystemTreeView(); this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); this.groupBoxMode = new System.Windows.Forms.GroupBox(); this.tableLayoutPanelCUEStyle = new System.Windows.Forms.TableLayoutPanel(); @@ -121,6 +120,7 @@ namespace JDP { this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); this.setAsMyMusicFolderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.resetToOriginalLocationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.fileSystemTreeView1 = new CUEControls.FileSystemTreeView(); this.toolStripContainer1.BottomToolStripPanel.SuspendLayout(); this.toolStripContainer1.ContentPanel.SuspendLayout(); this.toolStripContainer1.TopToolStripPanel.SuspendLayout(); @@ -254,33 +254,6 @@ namespace JDP { this.grpInput.Name = "grpInput"; this.grpInput.TabStop = false; // - // fileSystemTreeView1 - // - this.fileSystemTreeView1.AllowDrop = true; - resources.ApplyResources(this.fileSystemTreeView1, "fileSystemTreeView1"); - this.fileSystemTreeView1.BackColor = System.Drawing.SystemColors.Control; - this.fileSystemTreeView1.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.fileSystemTreeView1.CheckBoxes = true; - this.fileSystemTreeView1.FullRowSelect = true; - this.fileSystemTreeView1.HideSelection = false; - this.fileSystemTreeView1.ItemHeight = 16; - this.fileSystemTreeView1.Name = "fileSystemTreeView1"; - this.fileSystemTreeView1.ShowLines = false; - this.fileSystemTreeView1.ShowRootLines = false; - this.fileSystemTreeView1.SpecialFolders = new CUEControls.ExtraSpecialFolder[] { - CUEControls.ExtraSpecialFolder.MyComputer, - CUEControls.ExtraSpecialFolder.Profile, - CUEControls.ExtraSpecialFolder.MyMusic, - CUEControls.ExtraSpecialFolder.CommonMusic}; - this.fileSystemTreeView1.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.fileSystemTreeView1_AfterCheck); - this.fileSystemTreeView1.NodeExpand += new CUEControls.FileSystemTreeViewNodeExpandHandler(this.fileSystemTreeView1_NodeExpand); - this.fileSystemTreeView1.DragDrop += new System.Windows.Forms.DragEventHandler(this.fileSystemTreeView1_DragDrop); - this.fileSystemTreeView1.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.fileSystemTreeView1_AfterSelect); - this.fileSystemTreeView1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.fileSystemTreeView1_MouseDown); - this.fileSystemTreeView1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.fileSystemTreeView1_KeyDown); - this.fileSystemTreeView1.AfterExpand += new System.Windows.Forms.TreeViewEventHandler(this.fileSystemTreeView1_AfterExpand); - this.fileSystemTreeView1.DragOver += new System.Windows.Forms.DragEventHandler(this.fileSystemTreeView1_DragOver); - // // tableLayoutPanel2 // resources.ApplyResources(this.tableLayoutPanel2, "tableLayoutPanel2"); @@ -996,6 +969,33 @@ namespace JDP { resources.ApplyResources(this.resetToOriginalLocationToolStripMenuItem, "resetToOriginalLocationToolStripMenuItem"); this.resetToOriginalLocationToolStripMenuItem.Click += new System.EventHandler(this.resetToOriginalLocationToolStripMenuItem_Click); // + // fileSystemTreeView1 + // + this.fileSystemTreeView1.AllowDrop = true; + resources.ApplyResources(this.fileSystemTreeView1, "fileSystemTreeView1"); + this.fileSystemTreeView1.BackColor = System.Drawing.SystemColors.Control; + this.fileSystemTreeView1.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.fileSystemTreeView1.CheckBoxes = true; + this.fileSystemTreeView1.FullRowSelect = true; + this.fileSystemTreeView1.HideSelection = false; + this.fileSystemTreeView1.ItemHeight = 16; + this.fileSystemTreeView1.Name = "fileSystemTreeView1"; + this.fileSystemTreeView1.ShowLines = false; + this.fileSystemTreeView1.ShowRootLines = false; + this.fileSystemTreeView1.SpecialFolders = new CUEControls.ExtraSpecialFolder[] { + CUEControls.ExtraSpecialFolder.MyComputer, + CUEControls.ExtraSpecialFolder.Profile, + CUEControls.ExtraSpecialFolder.MyMusic, + CUEControls.ExtraSpecialFolder.CommonMusic}; + this.fileSystemTreeView1.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.fileSystemTreeView1_AfterCheck); + this.fileSystemTreeView1.NodeExpand += new CUEControls.FileSystemTreeViewNodeExpandHandler(this.fileSystemTreeView1_NodeExpand); + this.fileSystemTreeView1.DragDrop += new System.Windows.Forms.DragEventHandler(this.fileSystemTreeView1_DragDrop); + this.fileSystemTreeView1.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.fileSystemTreeView1_AfterSelect); + this.fileSystemTreeView1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.fileSystemTreeView1_MouseDown); + this.fileSystemTreeView1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.fileSystemTreeView1_KeyDown); + this.fileSystemTreeView1.AfterExpand += new System.Windows.Forms.TreeViewEventHandler(this.fileSystemTreeView1_AfterExpand); + this.fileSystemTreeView1.DragOver += new System.Windows.Forms.DragEventHandler(this.fileSystemTreeView1_DragOver); + // // frmCUETools // resources.ApplyResources(this, "$this"); diff --git a/CUETools/frmCUETools.cs b/CUETools/frmCUETools.cs index 5f9ce6f..50d95a3 100644 --- a/CUETools/frmCUETools.cs +++ b/CUETools/frmCUETools.cs @@ -461,7 +461,7 @@ namespace JDP { { get { - return "CUETools 2.0.4"; + return "CUETools 2.0.9"; } } @@ -486,7 +486,9 @@ namespace JDP { if (_profile._config.checkForUpdates && DateTime.UtcNow - lastMOTD > TimeSpan.FromDays(1) && _batchReport.Length == 0) { this.Invoke((MethodInvoker)(() => toolStripStatusLabel1.Text = "Checking for updates...")); + IWebProxy proxy = _profile._config.GetProxy(); HttpWebRequest req = (HttpWebRequest)WebRequest.Create("http://cuetools.net/motd/motd.jpg"); + req.Proxy = proxy; req.Method = "GET"; try { @@ -531,6 +533,7 @@ namespace JDP { catch { } req = (HttpWebRequest)WebRequest.Create("http://cuetools.net/motd/motd.txt"); + req.Proxy = proxy; req.Method = "GET"; try { @@ -713,12 +716,27 @@ namespace JDP { if (fileGroup.type == FileGroupInfoType.Folder) _batchPaths.Insert(++directoriesFound, fileGroup.main.FullName); foreach (FileGroupInfo fileGroup in fileGroups) - if (fileGroup.type == FileGroupInfoType.CUESheetFile) + if (fileGroup.type == FileGroupInfoType.FileWithCUE) _batchPaths.Insert(directoriesFound + (++cueSheetsFound), fileGroup.main.FullName); - if (cueSheetsFound == 0) - foreach (FileGroupInfo fileGroup in fileGroups) - if (fileGroup.type == FileGroupInfoType.FileWithCUE) + foreach (FileGroupInfo fileGroup in fileGroups) + if (fileGroup.type == FileGroupInfoType.CUESheetFile) + { + string cue; + using (TextReader tr = new StreamReader(fileGroup.main.FullName)) + cue = tr.ReadToEnd(); + foreach (FileGroupInfo fileGroup2 in fileGroups) + if (fileGroup2.type == FileGroupInfoType.FileWithCUE && fileGroup2.TOC != null) + { + CDImageLayout toc = CUESheet.CUE2TOC(cue, (int)fileGroup2.TOC.AudioLength); + if (toc != null && toc.TrackOffsets == fileGroup2.TOC.TrackOffsets) + { + cue = null; + break; + } + } + if (cue != null) _batchPaths.Insert(directoriesFound + (++cueSheetsFound), fileGroup.main.FullName); + } if (cueSheetsFound == 0) foreach (FileGroupInfo fileGroup in fileGroups) if (fileGroup.type == FileGroupInfoType.TrackFiles) @@ -739,15 +757,12 @@ namespace JDP { if (useAR || useCUEToolsDB) cueSheet.DataTrackLengthMSF = txtDataTrackLength.Text; if (useCUEToolsDB) - cueSheet.UseCUEToolsDB(false, "CUETools 2.0.8"); + cueSheet.UseCUEToolsDB(false, "CUETools " + CUESheet.CUEToolsVersion); if (useAR) cueSheet.UseAccurateRip(); - if (_batchPaths.Count == 0 && action == CUEAction.Encode) - { - if (checkBoxUseFreeDb.Checked || checkBoxUseMusicBrainz.Checked) - releases = cueSheet.LookupAlbumInfo(checkBoxUseFreeDb.Checked, checkBoxUseMusicBrainz.Checked, _profile._config.advanced.CacheMetadata); - } + if (_batchPaths.Count == 0 && action == CUEAction.Encode && (checkBoxUseFreeDb.Checked || checkBoxUseMusicBrainz.Checked)) + releases = cueSheet.LookupAlbumInfo(checkBoxUseFreeDb.Checked, checkBoxUseMusicBrainz.Checked, _profile._config.advanced.CacheMetadata); else if (_profile._config.advanced.CacheMetadata) { try @@ -1033,12 +1048,12 @@ namespace JDP { toolStripStatusLabelCTDB.Visible = false; if (ReportState) { - if (_batchReport != null) - textBatchReport.Text = _batchReport.ToString(); + string newText = _batchReport != null ? _batchReport.ToString() : ""; + string oldText = textBatchReport.Text; + if (oldText != "" && newText.StartsWith(oldText)) + textBatchReport.AppendText(newText.Substring(oldText.Length)); else - textBatchReport.Text = ""; - //textBatchReport.SelectAll(); - //textBatchReport.ScrollToCaret(); + textBatchReport.Text = newText; } if (!running) @@ -1624,8 +1639,7 @@ namespace JDP { foreach (FileGroupInfo fileGroup in fileGroups) { TreeNode node = fileSystemTreeView1.NewNode(fileGroup.main, fileGroup.type == FileGroupInfoType.Folder); - if (fileGroup.type == FileGroupInfoType.TrackFiles) - node.Text = node.Text + ": " + fileGroup.files.Count.ToString() + " files"; + node.Text = fileGroup.ToString(); e.node.Nodes.Add(node); } //toolTip1.Show @@ -1651,7 +1665,7 @@ namespace JDP { || Directory.Exists(pathIn)); rbActionCreateCUESheet.Enabled = pathIn.Length != 0 && ((File.Exists(pathIn) && CUESheet.CreateDummyCUESheet(_profile._config, pathIn) != null) - || Directory.Exists(pathIn)); + || Directory.Exists(pathIn)); rbActionVerify.Enabled = rbActionEncode.Enabled = pathIn.Length != 0 && (File.Exists(pathIn) || Directory.Exists(pathIn) || IsCDROM(pathIn)); diff --git a/CUETools/frmCUETools.resx b/CUETools/frmCUETools.resx index 1af7d10..c5e5072 100644 --- a/CUETools/frmCUETools.resx +++ b/CUETools/frmCUETools.resx @@ -252,11 +252,26 @@ 0 + + Top, Bottom, Left, Right + + + 19 + + + 3, 17 + + + 192, 304 + + + 1 + fileSystemTreeView1 - CUEControls.FileSystemTreeView, CUEControls, Version=2.0.8.0, Culture=neutral, PublicKeyToken=null + CUEControls.FileSystemTreeView, CUEControls, Version=2.0.9.0, Culture=neutral, PublicKeyToken=null grpInput @@ -297,1032 +312,9 @@ 3 - - 3, 17 - - - tableLayoutPanelCUEStyle - - - System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBoxMode - - - 0 - - - <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="checkBoxUseAccurateRip" Row="4" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="checkBoxUseFreeDb" Row="4" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="rbTracks" Row="2" RowSpan="1" Column="0" ColumnSpan="3" /><Control Name="rbEmbedCUE" Row="0" RowSpan="1" Column="0" ColumnSpan="3" /><Control Name="rbSingleFile" Row="1" RowSpan="1" Column="0" ColumnSpan="3" /><Control Name="checkBoxUseMusicBrainz" Row="4" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="Percent,33,33332,Percent,33,33334,Percent,33,33334" /><Rows Styles="Percent,18,18229,Percent,18,18229,Percent,18,18229,Percent,22,72658,Percent,22,72658" /></TableLayoutSettings> - - - toolStripCorrectorFormat - - - System.Windows.Forms.ToolStrip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBoxMode - - - 1 - - - tableLayoutPanelVerifyMode - - - System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBoxMode - - - 2 - - - <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="checkBoxVerifyUseCDRepair" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="Percent,36,11111,Percent,63,88889" /><Rows Styles="Percent,32,72727,Percent,67,27273" /></TableLayoutSettings> - - - Fill - - - 173, 101 - - - 150, 130 - - - 12 - - - Mode - - - groupBoxMode - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanel2 - - - 0 - - - labelEncoderMaxMode - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpAudioOutput - - - 0 - - - labelEncoderMinMode - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpAudioOutput - - - 1 - - - labelEncoderMode - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpAudioOutput - - - 2 - - - trackBarEncoderMode - - - System.Windows.Forms.TrackBar, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpAudioOutput - - - 3 - - - comboBoxEncoder - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpAudioOutput - - - 4 - - - radioButtonAudioNone - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpAudioOutput - - - 5 - - - radioButtonAudioLossy - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpAudioOutput - - - 6 - - - radioButtonAudioHybrid - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpAudioOutput - - - 7 - - - radioButtonAudioLossless - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpAudioOutput - - - 8 - - - labelFormat - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpAudioOutput - - - 9 - - - comboBoxAudioFormat - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpAudioOutput - - - 10 - - - Fill - - - 329, 101 - - - 148, 194 - - - 2 - - - Audio Output - - - grpAudioOutput - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanel2 - - - 1 - - - Fill - - - NoControl - - - 3, 237 - - - 164, 90 - - - Zoom - - - 15 - - - pictureBoxMotd - - - System.Windows.Forms.PictureBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanel2 - - - 2 - - - 2 - - - Fill - - - NoControl - - - 0, 48 - - - 0, 0, 0, 0 - - - 97, 24 - - - 13 - - - Template: - - - MiddleLeft - - - labelOutputTemplate - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanelPaths - - - 0 - - - Fill - - - 100, 51 - - - 365, 21 - - - 9 - - - 153, 8 - - - Template for output files (foobar2000 format) - - - comboBoxOutputFormat - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanelPaths - - - 1 - - - Fill - - - 100, 3 - - - 365, 21 - - - 0 - - - Input file - - - txtInputPath - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanelPaths - - - 2 - - - Fill - - - 100, 27 - - - 365, 21 - - - 0 - - - Output file - - - txtOutputPath - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanelPaths - - - 3 - - - 0, 0 - - - Fill - - - 0, 0 - - - 0, 0, 0, 0 - - - 97, 24 - - - 14 - - - toolStripInput - - - toolStripInput - - - System.Windows.Forms.ToolStrip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanelPaths - - - 4 - - - 0, 24 - - - Fill - - - 0, 24 - - - 0, 0, 0, 0 - - - 97, 24 - - - 15 - - - toolStripOutput - - - toolStripOutput - - - System.Windows.Forms.ToolStrip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanelPaths - - - 5 - - - Fill - - - 3, 17 - - - 0, 0, 0, 0 - - - 3 - - - 468, 72 - - - 14 - - - tableLayoutPanelPaths - - - System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpOutputPathGeneration - - - 0 - - - <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="labelOutputTemplate" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="comboBoxOutputFormat" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="txtInputPath" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="txtOutputPath" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="toolStripInput" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="toolStripOutput" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="Percent,20,94017,Percent,79,05983" /><Rows Styles="Percent,33,33333,Percent,33,33333,Percent,33,33333" /></TableLayoutSettings> - - - Fill - - - 3, 3 - - - 474, 92 - - - 1 - - - CUE Paths - - - grpOutputPathGeneration - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanel2 - - - 3 - - - comboBoxScript - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpAction - - - 0 - - - rbActionCorrectFilenames - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpAction - - - 1 - - - rbActionCreateCUESheet - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpAction - - - 2 - - - rbActionVerify - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpAction - - - 3 - - - rbActionEncode - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpAction - - - 4 - - - Fill - - - 3, 101 - - - 164, 130 - - - 4 - - - Action - - - grpAction - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanel2 - - - 4 - - - tableLayoutPanel4 - - - System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpExtra - - - 0 - - - <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="labelPregap" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lblWriteOffset" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="numericWriteOffset" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="txtPreGapLength" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="labelDataTrack" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="txtDataTrackLength" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /></Controls><Columns Styles="Percent,56,75676,Percent,43,24324" /><Rows Styles="Percent,33,33333,Percent,33,33333,Percent,33,33333" /></TableLayoutSettings> - - - Fill - - - 173, 237 - - - 150, 90 - - - 6 - - - Extra - - - grpExtra - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanel2 - - - 5 - - - btnConvert - - - System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - panelGo - - - 0 - - - btnStop - - - System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - panelGo - - - 1 - - - btnResume - - - System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - panelGo - - - 2 - - - btnPause - - - System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - panelGo - - - 3 - - - Fill - - - 338, 301 - - - 12, 3, 12, 3 - - - 130, 26 - - - 14 - - - panelGo - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanel2 - - - 6 - - - Fill - - - 204, 0 - - - 0, 0, 0, 0 - - - 4 - - - 480, 330 - - - 1 - - - tableLayoutPanel2 - - - System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanel1 - - - 2 - - - <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="groupBoxMode" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="grpAudioOutput" Row="1" RowSpan="2" Column="2" ColumnSpan="1" /><Control Name="pictureBoxMotd" Row="2" RowSpan="2" Column="0" ColumnSpan="1" /><Control Name="grpOutputPathGeneration" Row="0" RowSpan="1" Column="0" ColumnSpan="3" /><Control Name="grpAction" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="grpExtra" Row="2" RowSpan="2" Column="1" ColumnSpan="1" /><Control Name="panelGo" Row="3" RowSpan="1" Column="2" ColumnSpan="1" /></Controls><Columns Styles="Percent,35,41667,Percent,32,70833,Percent,31,875" /><Rows Styles="Percent,29,69697,Percent,41,51515,Percent,19,39394,Percent,9,393939" /></TableLayoutSettings> - - - Fill - - - 0, 0 - - - 0, 0, 0, 0 - - - 2 - - - 684, 451 - - - 17 - - - tableLayoutPanel1 - - - System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - toolStripContainer1.ContentPanel - - - 0 - - - <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="textBatchReport" Row="1" RowSpan="1" Column="0" ColumnSpan="2" /><Control Name="grpInput" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="tableLayoutPanel2" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /></Controls><Columns Styles="Percent,100,Absolute,480" /><Rows Styles="Absolute,330,Percent,100" /></TableLayoutSettings> - - - 0, 0, 0, 0 - - - 684, 451 - - - toolStripContainer1.ContentPanel - - - System.Windows.Forms.ToolStripContentPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - toolStripContainer1 - - - 0 - - - Fill - - - toolStripContainer1.LeftToolStripPanel - - - System.Windows.Forms.ToolStripPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - toolStripContainer1 - - - 1 - - - 0, 0 - - - toolStripContainer1.RightToolStripPanel - - - System.Windows.Forms.ToolStripPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - toolStripContainer1 - - - 2 - - - 684, 502 - - - 17 - - - toolStripContainer1 - - - 0, 0 - - - None - - - 0, 0 - - - 684, 25 - - - 0 - - - toolStripMenu - - - System.Windows.Forms.ToolStrip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - toolStripContainer1.TopToolStripPanel - - - 0 - - - toolStripContainer1.TopToolStripPanel - - - System.Windows.Forms.ToolStripPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - toolStripContainer1 - - - 3 - - - toolStripContainer1 - - - System.Windows.Forms.ToolStripContainer, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 1 - - - Top, Bottom, Left, Right - - - 19 - - - 3, 17 - - - 192, 304 - - - 1 - - - fileSystemTreeView1 - - - CUEControls.FileSystemTreeView, CUEControls, Version=2.0.8.0, Culture=neutral, PublicKeyToken=null - - - grpInput - - - 0 - 3 - - checkBoxUseAccurateRip - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanelCUEStyle - - - 0 - - - checkBoxUseFreeDb - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanelCUEStyle - - - 1 - - - rbTracks - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanelCUEStyle - - - 2 - - - rbEmbedCUE - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanelCUEStyle - - - 3 - - - rbSingleFile - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanelCUEStyle - - - 4 - - - checkBoxUseMusicBrainz - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanelCUEStyle - - - 5 - - - Fill - - - 3, 17 - - - 0, 0, 0, 0 - - - 5 - - - 144, 110 - - - 11 - - - tableLayoutPanelCUEStyle - - - System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBoxMode - - - 0 - - - <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="checkBoxUseAccurateRip" Row="4" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="checkBoxUseFreeDb" Row="4" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="rbTracks" Row="2" RowSpan="1" Column="0" ColumnSpan="3" /><Control Name="rbEmbedCUE" Row="0" RowSpan="1" Column="0" ColumnSpan="3" /><Control Name="rbSingleFile" Row="1" RowSpan="1" Column="0" ColumnSpan="3" /><Control Name="checkBoxUseMusicBrainz" Row="4" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="Percent,33,33332,Percent,33,33334,Percent,33,33334" /><Rows Styles="Percent,18,18229,Percent,18,18229,Percent,18,18229,Percent,22,72658,Percent,22,72658" /></TableLayoutSettings> - - - 153, 8 - True @@ -1344,6 +336,9 @@ 5 + + 153, 8 + Use AccurateRip @@ -1548,6 +543,39 @@ 5 + + Fill + + + 3, 17 + + + 0, 0, 0, 0 + + + 5 + + + 144, 110 + + + 11 + + + tableLayoutPanelCUEStyle + + + System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxMode + + + 0 + + + <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="checkBoxUseAccurateRip" Row="4" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="checkBoxUseFreeDb" Row="4" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="rbTracks" Row="2" RowSpan="1" Column="0" ColumnSpan="3" /><Control Name="rbEmbedCUE" Row="0" RowSpan="1" Column="0" ColumnSpan="3" /><Control Name="rbSingleFile" Row="1" RowSpan="1" Column="0" ColumnSpan="3" /><Control Name="checkBoxUseMusicBrainz" Row="4" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="Percent,33,33332,Percent,33,33334,Percent,33,33334" /><Rows Styles="Percent,18,18229,Percent,18,18229,Percent,18,18229,Percent,22,72658,Percent,22,72658" /></TableLayoutSettings> + 3, 17 @@ -1557,6 +585,51 @@ Fill + + Magenta + + + 78, 20 + + + Overwrite + + + 168, 22 + + + Locate files + + + Try to locate missing files automatically + + + 168, 22 + + + Change extension + + + Replace extension for audio files with this: + + + Magenta + + + 79, 19 + + + Locate files + + + Magenta + + + 39, 19 + + + flac + 3, 17 @@ -1581,54 +654,27 @@ 1 - - Magenta - - - 78, 20 - - - Overwrite - - - Magenta - - - 79, 19 - - - Locate files - - - 168, 22 - - - Locate files - - - Try to locate missing files automatically - - - 168, 22 - - - Change extension - - - Replace extension for audio files with this: - - - Magenta - - - 39, 19 - - - flac - 2 + + True + + + Fill + + + NoControl + + + 3, 3 + + + 45, 29 + + + 0 + checkBoxVerifyUseCDRepair @@ -1674,34 +720,31 @@ <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="checkBoxVerifyUseCDRepair" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="Percent,36,11111,Percent,63,88889" /><Rows Styles="Percent,32,72727,Percent,67,27273" /></TableLayoutSettings> - - True - - + Fill - - NoControl + + 173, 101 - - 3, 3 + + 150, 130 - - 45, 29 + + 12 - - 0 + + Mode - - checkBoxVerifyUseCDRepair + + groupBoxMode - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - tableLayoutPanelVerifyMode + + tableLayoutPanel2 - + 0 @@ -2064,21 +1107,195 @@ 10 + + Fill + + + 329, 101 + + + 148, 194 + + + 2 + + + Audio Output + + + grpAudioOutput + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanel2 + + + 1 + + + Fill + + + NoControl + + + 3, 237 + + + 164, 90 + + + Zoom + + + 15 + + + pictureBoxMotd + + + System.Windows.Forms.PictureBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanel2 + + + 2 + + + 2 + + + Fill + + + NoControl + + + 0, 48 + + + 0, 0, 0, 0 + + + 97, 24 + + + 13 + + + Template: + + + MiddleLeft + + + labelOutputTemplate + + + System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanelPaths + + + 0 + + + Fill + + + 100, 51 + + + 365, 21 + + + 9 + + + Template for output files (foobar2000 format) + + + comboBoxOutputFormat + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanelPaths + + + 1 + + + Fill + + + 100, 3 + + + 365, 21 + + + 0 + + + Input file + + + txtInputPath + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanelPaths + + + 2 + + + Fill + + + 100, 27 + + + 365, 21 + + + 0 + + + Output file + + + txtOutputPath + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanelPaths + + + 3 + + + 0, 0 + + + Fill + 38, 21 Input: - - Magenta - - - 32, 21 - - - Open/close input browser - 177, 22 @@ -2103,21 +1320,54 @@ Hide browser + + Magenta + + + 32, 21 + + + Open/close input browser + + + 0, 0 + + + 0, 0, 0, 0 + + + 97, 24 + + + 14 + + + toolStripInput + + + toolStripInput + + + System.Windows.Forms.ToolStrip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanelPaths + + + 4 + + + 0, 24 + + + Fill + 48, 24 Output: - - Magenta - - - 32, 21 - - - toolStripSplitButtonOutputBrowser - 143, 22 @@ -2136,6 +1386,102 @@ Use template + + Magenta + + + 32, 21 + + + toolStripSplitButtonOutputBrowser + + + 0, 24 + + + 0, 0, 0, 0 + + + 97, 24 + + + 15 + + + toolStripOutput + + + toolStripOutput + + + System.Windows.Forms.ToolStrip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanelPaths + + + 5 + + + Fill + + + 3, 17 + + + 0, 0, 0, 0 + + + 3 + + + 468, 72 + + + 14 + + + tableLayoutPanelPaths + + + System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpOutputPathGeneration + + + 0 + + + <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="labelOutputTemplate" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="comboBoxOutputFormat" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="txtInputPath" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="txtOutputPath" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="toolStripInput" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="toolStripOutput" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="Percent,20,94017,Percent,79,05983" /><Rows Styles="Percent,33,33333,Percent,33,33333,Percent,33,33333" /></TableLayoutSettings> + + + Fill + + + 3, 3 + + + 474, 92 + + + 1 + + + CUE Paths + + + grpOutputPathGeneration + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanel2 + + + 3 + Top, Left, Right @@ -2295,113 +1641,35 @@ 4 - - 2 - - - labelPregap - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanel4 - - - 0 - - - lblWriteOffset - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanel4 - - - 1 - - - numericWriteOffset - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanel4 - - - 2 - - - txtPreGapLength - - - System.Windows.Forms.MaskedTextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanel4 - - - 3 - - - labelDataTrack - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanel4 - - - 4 - - - txtDataTrackLength - - - System.Windows.Forms.MaskedTextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanel4 - - - 5 - - + Fill - - 3, 17 + + 3, 101 - - 0, 0, 0, 0 + + 164, 130 - - 3 + + 4 - - 144, 70 + + Action - - 6 + + grpAction - - tableLayoutPanel4 + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + tableLayoutPanel2 - - grpExtra + + 4 - - 0 - - - <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="labelPregap" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lblWriteOffset" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="numericWriteOffset" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="txtPreGapLength" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="labelDataTrack" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="txtDataTrackLength" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /></Controls><Columns Styles="Percent,56,75676,Percent,43,24324" /><Rows Styles="Percent,33,33333,Percent,33,33333,Percent,33,33333" /></TableLayoutSettings> + + 2 True @@ -2607,6 +1875,66 @@ 5 + + Fill + + + 3, 17 + + + 0, 0, 0, 0 + + + 3 + + + 144, 70 + + + 6 + + + tableLayoutPanel4 + + + System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpExtra + + + 0 + + + <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="labelPregap" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lblWriteOffset" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="numericWriteOffset" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="txtPreGapLength" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="labelDataTrack" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="txtDataTrackLength" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /></Controls><Columns Styles="Percent,56,75676,Percent,43,24324" /><Rows Styles="Percent,33,33333,Percent,33,33333,Percent,33,33333" /></TableLayoutSettings> + + + Fill + + + 173, 237 + + + 150, 90 + + + 6 + + + Extra + + + grpExtra + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanel2 + + + 5 + Fill @@ -2745,17 +2073,161 @@ 3 - - Magenta + + Fill - - 73, 22 + + 338, 301 - - default + + 12, 3, 12, 3 - - Profile + + 130, 26 + + + 14 + + + panelGo + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanel2 + + + 6 + + + Fill + + + 204, 0 + + + 0, 0, 0, 0 + + + 4 + + + 480, 330 + + + 1 + + + tableLayoutPanel2 + + + System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanel1 + + + 2 + + + <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="groupBoxMode" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="grpAudioOutput" Row="1" RowSpan="2" Column="2" ColumnSpan="1" /><Control Name="pictureBoxMotd" Row="2" RowSpan="2" Column="0" ColumnSpan="1" /><Control Name="grpOutputPathGeneration" Row="0" RowSpan="1" Column="0" ColumnSpan="3" /><Control Name="grpAction" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="grpExtra" Row="2" RowSpan="2" Column="1" ColumnSpan="1" /><Control Name="panelGo" Row="3" RowSpan="1" Column="2" ColumnSpan="1" /></Controls><Columns Styles="Percent,35,41667,Percent,32,70833,Percent,31,875" /><Rows Styles="Percent,29,69697,Percent,41,51515,Percent,19,39394,Percent,9,393939" /></TableLayoutSettings> + + + Fill + + + 0, 0 + + + 0, 0, 0, 0 + + + 2 + + + 684, 451 + + + 17 + + + tableLayoutPanel1 + + + System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + toolStripContainer1.ContentPanel + + + 0 + + + <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="textBatchReport" Row="1" RowSpan="1" Column="0" ColumnSpan="2" /><Control Name="grpInput" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="tableLayoutPanel2" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /></Controls><Columns Styles="Percent,100,Absolute,480" /><Rows Styles="Absolute,330,Percent,100" /></TableLayoutSettings> + + + 0, 0, 0, 0 + + + 684, 451 + + + toolStripContainer1.ContentPanel + + + System.Windows.Forms.ToolStripContentPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + toolStripContainer1 + + + 0 + + + Fill + + + toolStripContainer1.LeftToolStripPanel + + + System.Windows.Forms.ToolStripPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + toolStripContainer1 + + + 1 + + + 0, 0 + + + toolStripContainer1.RightToolStripPanel + + + System.Windows.Forms.ToolStripPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + toolStripContainer1 + + + 2 + + + 684, 502 + + + 17 + + + toolStripContainer1 + + + 0, 0 + + + None 100, 23 @@ -2781,6 +2253,18 @@ default + + Magenta + + + 73, 22 + + + default + + + Profile + 6, 25 @@ -2823,18 +2307,54 @@ Batch log + + 0, 0 + + + 684, 25 + + + 0 + + + toolStripMenu + + + System.Windows.Forms.ToolStrip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + toolStripContainer1.TopToolStripPanel + + + 0 + + + toolStripContainer1.TopToolStripPanel + + + System.Windows.Forms.ToolStripPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + toolStripContainer1 + + + 3 + + + toolStripContainer1 + + + System.Windows.Forms.ToolStripContainer, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 1 + 424, 8 - - 206, 76 - - - contextMenuStripFileTree - - - System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - False @@ -2859,6 +2379,15 @@ Reset to original location + + 206, 76 + + + contextMenuStripFileTree + + + System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + True @@ -3275,7 +2804,7 @@ 700, 538 - CUETools 2.0.8 + CUETools 2.0.9 toolStripStatusLabel1 diff --git a/CUETools/frmSettings.Designer.cs b/CUETools/frmSettings.Designer.cs index 5565615..867f59b 100644 --- a/CUETools/frmSettings.Designer.cs +++ b/CUETools/frmSettings.Designer.cs @@ -127,10 +127,7 @@ namespace JDP { this.listViewFormats = new System.Windows.Forms.ListView(); this.columnHeader1 = new System.Windows.Forms.ColumnHeader(); this.tabPage10 = new System.Windows.Forms.TabPage(); - this.groupBoxFlaCudaOptions = new System.Windows.Forms.GroupBox(); - this.checkBoxFlaCudaMultithread = new System.Windows.Forms.CheckBox(); - this.checkBoxFlaCudaGPUOnly = new System.Windows.Forms.CheckBox(); - this.checkBoxFlaCudaVerify = new System.Windows.Forms.CheckBox(); + this.propertyGridEncoderSettings = new System.Windows.Forms.PropertyGrid(); this.groupBoxExternalEncoder = new System.Windows.Forms.GroupBox(); this.labelEncoderName = new System.Windows.Forms.Label(); this.labelEncoderModes = new System.Windows.Forms.Label(); @@ -140,14 +137,7 @@ namespace JDP { this.buttonEncoderAdd = new System.Windows.Forms.Button(); this.listBoxEncoders = new System.Windows.Forms.ListBox(); this.comboBoxEncoderExtension = new System.Windows.Forms.ComboBox(); - this.groupBoxLibMAC_SDK = new System.Windows.Forms.GroupBox(); - this.groupBoxLibWavpack = new System.Windows.Forms.GroupBox(); - this.chkWVStoreMD5 = new System.Windows.Forms.CheckBox(); - this.numWVExtraMode = new System.Windows.Forms.NumericUpDown(); - this.chkWVExtraMode = new System.Windows.Forms.CheckBox(); this.labelEncoderExtension = new System.Windows.Forms.Label(); - this.groupBoxLibFLAC = new System.Windows.Forms.GroupBox(); - this.chkFLACVerify = new System.Windows.Forms.CheckBox(); this.tabPage11 = new System.Windows.Forms.TabPage(); this.comboBoxDecoderExtension = new System.Windows.Forms.ComboBox(); this.groupBoxExternalDecoder = new System.Windows.Forms.GroupBox(); @@ -206,11 +196,7 @@ namespace JDP { this.tabPage3.SuspendLayout(); this.groupBoxFormat.SuspendLayout(); this.tabPage10.SuspendLayout(); - this.groupBoxFlaCudaOptions.SuspendLayout(); this.groupBoxExternalEncoder.SuspendLayout(); - this.groupBoxLibWavpack.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numWVExtraMode)).BeginInit(); - this.groupBoxLibFLAC.SuspendLayout(); this.tabPage11.SuspendLayout(); this.groupBoxExternalDecoder.SuspendLayout(); this.tabPage4.SuspendLayout(); @@ -348,7 +334,6 @@ namespace JDP { // // chkEncodeWhenZeroOffset // - this.tableLayoutPanel2.SetColumnSpan(this.chkEncodeWhenZeroOffset, 2); resources.ApplyResources(this.chkEncodeWhenZeroOffset, "chkEncodeWhenZeroOffset"); this.chkEncodeWhenZeroOffset.Name = "chkEncodeWhenZeroOffset"; // @@ -1070,47 +1055,21 @@ namespace JDP { // resources.ApplyResources(this.tabPage10, "tabPage10"); this.tabPage10.BackColor = System.Drawing.SystemColors.Control; - this.tabPage10.Controls.Add(this.groupBoxFlaCudaOptions); + this.tabPage10.Controls.Add(this.propertyGridEncoderSettings); this.tabPage10.Controls.Add(this.groupBoxExternalEncoder); this.tabPage10.Controls.Add(this.buttonEncoderDelete); this.tabPage10.Controls.Add(this.buttonEncoderAdd); this.tabPage10.Controls.Add(this.listBoxEncoders); this.tabPage10.Controls.Add(this.comboBoxEncoderExtension); - this.tabPage10.Controls.Add(this.groupBoxLibMAC_SDK); - this.tabPage10.Controls.Add(this.groupBoxLibWavpack); this.tabPage10.Controls.Add(this.labelEncoderExtension); - this.tabPage10.Controls.Add(this.groupBoxLibFLAC); this.tabPage10.Name = "tabPage10"; // - // groupBoxFlaCudaOptions + // propertyGridEncoderSettings // - this.groupBoxFlaCudaOptions.Controls.Add(this.checkBoxFlaCudaMultithread); - this.groupBoxFlaCudaOptions.Controls.Add(this.checkBoxFlaCudaGPUOnly); - this.groupBoxFlaCudaOptions.Controls.Add(this.checkBoxFlaCudaVerify); - resources.ApplyResources(this.groupBoxFlaCudaOptions, "groupBoxFlaCudaOptions"); - this.groupBoxFlaCudaOptions.Name = "groupBoxFlaCudaOptions"; - this.groupBoxFlaCudaOptions.TabStop = false; - // - // checkBoxFlaCudaMultithread - // - resources.ApplyResources(this.checkBoxFlaCudaMultithread, "checkBoxFlaCudaMultithread"); - this.checkBoxFlaCudaMultithread.DataBindings.Add(new System.Windows.Forms.Binding("Checked", this.cUEConfigBindingSource, "FlaCudaThreads", true)); - this.checkBoxFlaCudaMultithread.Name = "checkBoxFlaCudaMultithread"; - this.checkBoxFlaCudaMultithread.UseVisualStyleBackColor = true; - // - // checkBoxFlaCudaGPUOnly - // - resources.ApplyResources(this.checkBoxFlaCudaGPUOnly, "checkBoxFlaCudaGPUOnly"); - this.checkBoxFlaCudaGPUOnly.DataBindings.Add(new System.Windows.Forms.Binding("Checked", this.cUEConfigBindingSource, "FlaCudaGPUOnly", true)); - this.checkBoxFlaCudaGPUOnly.Name = "checkBoxFlaCudaGPUOnly"; - this.checkBoxFlaCudaGPUOnly.UseVisualStyleBackColor = true; - // - // checkBoxFlaCudaVerify - // - resources.ApplyResources(this.checkBoxFlaCudaVerify, "checkBoxFlaCudaVerify"); - this.checkBoxFlaCudaVerify.DataBindings.Add(new System.Windows.Forms.Binding("Checked", this.cUEConfigBindingSource, "FlaCudaVerify", true)); - this.checkBoxFlaCudaVerify.Name = "checkBoxFlaCudaVerify"; - this.checkBoxFlaCudaVerify.UseVisualStyleBackColor = true; + resources.ApplyResources(this.propertyGridEncoderSettings, "propertyGridEncoderSettings"); + this.propertyGridEncoderSettings.Name = "propertyGridEncoderSettings"; + this.propertyGridEncoderSettings.PropertySort = System.Windows.Forms.PropertySort.Categorized; + this.propertyGridEncoderSettings.ToolbarVisible = false; // // groupBoxExternalEncoder // @@ -1182,53 +1141,6 @@ namespace JDP { this.comboBoxEncoderExtension.Name = "comboBoxEncoderExtension"; this.comboBoxEncoderExtension.SelectedIndexChanged += new System.EventHandler(this.comboBoxEncoderExtension_SelectedIndexChanged); // - // groupBoxLibMAC_SDK - // - resources.ApplyResources(this.groupBoxLibMAC_SDK, "groupBoxLibMAC_SDK"); - this.groupBoxLibMAC_SDK.Name = "groupBoxLibMAC_SDK"; - this.groupBoxLibMAC_SDK.TabStop = false; - // - // groupBoxLibWavpack - // - this.groupBoxLibWavpack.Controls.Add(this.chkWVStoreMD5); - this.groupBoxLibWavpack.Controls.Add(this.numWVExtraMode); - this.groupBoxLibWavpack.Controls.Add(this.chkWVExtraMode); - resources.ApplyResources(this.groupBoxLibWavpack, "groupBoxLibWavpack"); - this.groupBoxLibWavpack.Name = "groupBoxLibWavpack"; - this.groupBoxLibWavpack.TabStop = false; - // - // chkWVStoreMD5 - // - resources.ApplyResources(this.chkWVStoreMD5, "chkWVStoreMD5"); - this.chkWVStoreMD5.Name = "chkWVStoreMD5"; - this.chkWVStoreMD5.UseVisualStyleBackColor = true; - // - // numWVExtraMode - // - resources.ApplyResources(this.numWVExtraMode, "numWVExtraMode"); - this.numWVExtraMode.Maximum = new decimal(new int[] { - 6, - 0, - 0, - 0}); - this.numWVExtraMode.Minimum = new decimal(new int[] { - 1, - 0, - 0, - 0}); - this.numWVExtraMode.Name = "numWVExtraMode"; - this.numWVExtraMode.Value = new decimal(new int[] { - 1, - 0, - 0, - 0}); - // - // chkWVExtraMode - // - resources.ApplyResources(this.chkWVExtraMode, "chkWVExtraMode"); - this.chkWVExtraMode.Name = "chkWVExtraMode"; - this.chkWVExtraMode.UseVisualStyleBackColor = true; - // // labelEncoderExtension // resources.ApplyResources(this.labelEncoderExtension, "labelEncoderExtension"); @@ -1236,19 +1148,6 @@ namespace JDP { this.labelEncoderExtension.MinimumSize = new System.Drawing.Size(100, 16); this.labelEncoderExtension.Name = "labelEncoderExtension"; // - // groupBoxLibFLAC - // - this.groupBoxLibFLAC.Controls.Add(this.chkFLACVerify); - resources.ApplyResources(this.groupBoxLibFLAC, "groupBoxLibFLAC"); - this.groupBoxLibFLAC.Name = "groupBoxLibFLAC"; - this.groupBoxLibFLAC.TabStop = false; - // - // chkFLACVerify - // - resources.ApplyResources(this.chkFLACVerify, "chkFLACVerify"); - this.chkFLACVerify.Name = "chkFLACVerify"; - this.chkFLACVerify.UseVisualStyleBackColor = true; - // // tabPage11 // this.tabPage11.BackColor = System.Drawing.SystemColors.Control; @@ -1545,15 +1444,8 @@ namespace JDP { this.groupBoxFormat.PerformLayout(); this.tabPage10.ResumeLayout(false); this.tabPage10.PerformLayout(); - this.groupBoxFlaCudaOptions.ResumeLayout(false); - this.groupBoxFlaCudaOptions.PerformLayout(); this.groupBoxExternalEncoder.ResumeLayout(false); this.groupBoxExternalEncoder.PerformLayout(); - this.groupBoxLibWavpack.ResumeLayout(false); - this.groupBoxLibWavpack.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numWVExtraMode)).EndInit(); - this.groupBoxLibFLAC.ResumeLayout(false); - this.groupBoxLibFLAC.PerformLayout(); this.tabPage11.ResumeLayout(false); this.tabPage11.PerformLayout(); this.groupBoxExternalDecoder.ResumeLayout(false); @@ -1620,18 +1512,11 @@ namespace JDP { private System.Windows.Forms.Label labelLanguage; private System.Windows.Forms.ComboBox comboLanguage; private System.Windows.Forms.TabPage tabPage10; - private System.Windows.Forms.GroupBox groupBoxLibMAC_SDK; - private System.Windows.Forms.GroupBox groupBoxLibWavpack; - private System.Windows.Forms.CheckBox chkWVStoreMD5; - private System.Windows.Forms.NumericUpDown numWVExtraMode; - private System.Windows.Forms.CheckBox chkWVExtraMode; private System.Windows.Forms.GroupBox groupBoxExternalEncoder; private System.Windows.Forms.TextBox textBoxEncoderPath; private System.Windows.Forms.TextBox textBoxEncoderParameters; private System.Windows.Forms.Label labelEncoderPath; private System.Windows.Forms.Label labelEncoderParameters; - private System.Windows.Forms.GroupBox groupBoxLibFLAC; - private System.Windows.Forms.CheckBox chkFLACVerify; private System.Windows.Forms.Label labelEncoderExtension; private System.Windows.Forms.TabPage tabPage11; private System.Windows.Forms.TextBox textBoxDecoderParameters; @@ -1718,14 +1603,11 @@ namespace JDP { private System.Windows.Forms.TableLayoutPanel tableLayoutPanel3; private System.Windows.Forms.TextBox textBoxAlArtFilenameFormat; private System.Windows.Forms.Label labelEncoderName; - private System.Windows.Forms.GroupBox groupBoxFlaCudaOptions; - private System.Windows.Forms.CheckBox checkBoxFlaCudaGPUOnly; - private System.Windows.Forms.CheckBox checkBoxFlaCudaVerify; private System.Windows.Forms.CheckBox checkBox1; - private System.Windows.Forms.CheckBox checkBoxFlaCudaMultithread; private System.Windows.Forms.CheckBox checkBoxSeparateDecodingThread; private System.Windows.Forms.TabPage tabPage7; private System.Windows.Forms.PropertyGrid propertyGrid1; + private System.Windows.Forms.PropertyGrid propertyGridEncoderSettings; } } \ No newline at end of file diff --git a/CUETools/frmSettings.cs b/CUETools/frmSettings.cs index d26a717..02719e1 100644 --- a/CUETools/frmSettings.cs +++ b/CUETools/frmSettings.cs @@ -45,12 +45,8 @@ namespace JDP { numEncodeWhenConfidence.Value = _config.encodeWhenConfidence; numEncodeWhenPercent.Value = _config.encodeWhenPercent; chkEncodeWhenZeroOffset.Checked = _config.encodeWhenZeroOffset; - chkFLACVerify.Checked = _config.flacVerify; chkWriteArTagsOnConvert.Checked = _config.writeArTagsOnEncode; chkWriteARTagsOnVerify.Checked = _config.writeArTagsOnVerify; - chkWVExtraMode.Checked = (_config.wvExtraMode != 0); - if (_config.wvExtraMode != 0) numWVExtraMode.Value = _config.wvExtraMode; - chkWVStoreMD5.Checked = _config.wvStoreMD5; chkKeepOriginalFilenames.Checked = _config.keepOriginalFilenames; txtSingleFilenameFormat.Text = _config.singleFilenameFormat; txtTrackFilenameFormat.Text = _config.trackFilenameFormat; @@ -208,12 +204,8 @@ namespace JDP { _config.encodeWhenPercent = (uint)numEncodeWhenPercent.Value; _config.encodeWhenConfidence = (uint)numEncodeWhenConfidence.Value; _config.encodeWhenZeroOffset = chkEncodeWhenZeroOffset.Checked; - _config.flacVerify = chkFLACVerify.Checked; _config.writeArTagsOnEncode = chkWriteArTagsOnConvert.Checked; _config.writeArTagsOnVerify = chkWriteARTagsOnVerify.Checked; - if (!chkWVExtraMode.Checked) _config.wvExtraMode = 0; - else _config.wvExtraMode = (int) numWVExtraMode.Value; - _config.wvStoreMD5 = chkWVStoreMD5.Checked; _config.keepOriginalFilenames = chkKeepOriginalFilenames.Checked; _config.singleFilenameFormat = txtSingleFilenameFormat.Text; _config.trackFilenameFormat = txtTrackFilenameFormat.Text; @@ -264,8 +256,6 @@ namespace JDP { txtSpecialExceptions.Enabled = chkRemoveSpecial.Checked; - numWVExtraMode.Enabled = chkWVExtraMode.Checked; - chkOverwriteTags.Enabled = chkFillUpCUE.Checked; } @@ -492,14 +482,20 @@ namespace JDP { comboBoxEncoderExtension.Visible = encoder != null; comboBoxEncoderExtension.Enabled = encoder != null && encoder.path != null; groupBoxExternalEncoder.Visible = encoder != null && encoder.path != null; - groupBoxFlaCudaOptions.Visible = encoder != null && encoder.path == null && encoder.type.Name == "FlaCudaWriter"; - groupBoxLibFLAC.Visible = encoder != null && encoder.path == null && encoder.type.Name == "FLACWriter"; - groupBoxLibWavpack.Visible = encoder != null && encoder.path == null && encoder.type.Name == "WavPackWriter"; - groupBoxLibMAC_SDK.Visible = encoder != null && encoder.path == null && encoder.type.Name == "APEWriter"; checkBoxEncoderLossless.Enabled = encoder != null && format != null && format.allowLossless && format.allowLossy; if (!checkBoxEncoderLossless.Enabled && encoder != null && format != null && encoder.Lossless != format.allowLossless) encoder.Lossless = format.allowLossless; + if (encoder != null && encoder.settingsSerializer != null) + { + propertyGridEncoderSettings.Visible = encoder != null && encoder.settingsSerializer != null; + propertyGridEncoderSettings.SelectedObject = encoder.settings; + } else + { + propertyGridEncoderSettings.Visible = false; + propertyGridEncoderSettings.SelectedObject = null; + } + foreach (KeyValuePair fmtEntry in _config.formats) { CUEToolsFormat fmt = fmtEntry.Value; diff --git a/CUETools/frmSettings.resx b/CUETools/frmSettings.resx index 0b3b181..a064416 100644 --- a/CUETools/frmSettings.resx +++ b/CUETools/frmSettings.resx @@ -606,41 +606,26 @@ 4 - - 2 + + 3, 49 - - Fill + + 104, 19 - - NoControl + + 6 - - 3, 0 + + chkEncodeWhenZeroOffset - - 185, 23 + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 5 - - - % of verified tracks >= - - - MiddleRight - - - label2 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - + tableLayoutPanel2 - - 0 + + 1 Fill @@ -723,66 +708,6 @@ 4 - - Fill - - - 3, 17 - - - 3 - - - 242, 71 - - - 6 - - - tableLayoutPanel2 - - - System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox5 - - - 0 - - - <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="label2" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="chkEncodeWhenZeroOffset" Row="2" RowSpan="1" Column="0" ColumnSpan="2" /><Control Name="numEncodeWhenPercent" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="labelEncodeWhenConfidence" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="numEncodeWhenConfidence" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /></Controls><Columns Styles="Percent,79,33884,Percent,20,66116" /><Rows Styles="Percent,33,33333,Percent,33,33333,Percent,33,33333" /></TableLayoutSettings> - - - Fill - - - 3, 49 - - - Yes - - - 236, 19 - - - 6 - - - and zero offset - - - chkEncodeWhenZeroOffset - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanel2 - - - 1 - Fill @@ -2295,6 +2220,72 @@ 0 + + 2 + + + Fill + + + NoControl + + + 3, 0 + + + 185, 23 + + + 5 + + + % of verified tracks >= + + + MiddleRight + + + label2 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanel2 + + + 0 + + + Fill + + + 3, 17 + + + 3 + + + 242, 71 + + + 6 + + + tableLayoutPanel2 + + + System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox5 + + + 0 + + + <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="label2" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="chkEncodeWhenZeroOffset" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="numEncodeWhenPercent" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="labelEncodeWhenConfidence" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="numEncodeWhenConfidence" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /></Controls><Columns Styles="Percent,79,33884,Percent,20,66116" /><Rows Styles="Percent,33,33333,Percent,33,33333,Percent,33,33333" /></TableLayoutSettings> + 278, 6 @@ -2958,121 +2949,25 @@ True - - True - - - NoControl - - - 9, 68 - - - 80, 17 - - - 22 - - - Multithread - - - checkBoxFlaCudaMultithread - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBoxFlaCudaOptions - - - 0 - - - True - - - NoControl - - - 10, 26 - - - 69, 17 - - - 21 - - - GPU only - - - checkBoxFlaCudaGPUOnly - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBoxFlaCudaOptions - - - 1 - - - True - - - NoControl - - - 9, 46 - - - 54, 17 - - - 20 - - - Verify - - - checkBoxFlaCudaVerify - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBoxFlaCudaOptions - - - 2 - - + 136, 39 - - 390, 100 + + 390, 246 - - 30 + + 31 - - FlaCuda options + + propertyGridEncoderSettings - - False + + System.Windows.Forms.PropertyGrid, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - groupBoxFlaCudaOptions - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - + tabPage10 - + 0 @@ -3346,144 +3241,6 @@ 5 - - 136, 39 - - - 390, 119 - - - 24 - - - MAC SDK options - - - False - - - groupBoxLibMAC_SDK - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage10 - - - 6 - - - True - - - NoControl - - - 226, 42 - - - 125, 17 - - - 30 - - - Store MD5 checksum - - - chkWVStoreMD5 - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBoxLibWavpack - - - 0 - - - 317, 19 - - - 36, 21 - - - 29 - - - Right - - - numWVExtraMode - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBoxLibWavpack - - - 1 - - - True - - - NoControl - - - 226, 20 - - - 85, 17 - - - 28 - - - Extra mode: - - - chkWVExtraMode - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBoxLibWavpack - - - 2 - - - 136, 39 - - - 390, 100 - - - 23 - - - wavpack options - - - False - - - groupBoxLibWavpack - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage10 - - - 7 - True @@ -3518,64 +3275,7 @@ tabPage10 - 8 - - - True - - - NoControl - - - 9, 46 - - - 54, 17 - - - 20 - - - Verify - - - chkFLACVerify - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBoxLibFLAC - - - 0 - - - 136, 39 - - - 390, 74 - - - 21 - - - libFLAC options - - - False - - - groupBoxLibFLAC - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage10 - - - 9 + 6 4, 22 diff --git a/CUETools/localtestrun.testrunconfig b/CUETools/localtestrun.testrunconfig new file mode 100644 index 0000000..7417230 --- /dev/null +++ b/CUETools/localtestrun.testrunconfig @@ -0,0 +1,14 @@ + + + This is a default test run configuration for a local test run. + + + + + + + + + + + \ No newline at end of file