diff --git a/ArCueDotNet/Program.cs b/ArCueDotNet/Program.cs index 8b1bed2..501fe9a 100644 --- a/ArCueDotNet/Program.cs +++ b/ArCueDotNet/Program.cs @@ -30,10 +30,11 @@ namespace ArCueDotNet { CUESheet cueSheet = new CUESheet(config); cueSheet.Action = CUEAction.Verify; + //cueSheet.OutputStyle = CUEStyle.SingleFile; cueSheet.Open(pathIn); cueSheet.Lookup(); - cueSheet.GenerateFilenames(OutputAudioFormat.NoAudio, false, pathIn); - cueSheet.WriteAudioFiles(Path.GetDirectoryName(pathIn), CUEStyle.SingleFile); + cueSheet.GenerateFilenames(AudioEncoderType.NoAudio, "dummy", pathIn); + cueSheet.Go(); cueSheet.GenerateAccurateRipLog(sw); } catch (Exception ex) diff --git a/CUERipper/CUERipper.csproj b/CUERipper/CUERipper.csproj index 32032fb..48edf8c 100644 --- a/CUERipper/CUERipper.csproj +++ b/CUERipper/CUERipper.csproj @@ -116,6 +116,10 @@ + + {CA4D64E6-6544-4A29-8BA5-7DB08D50D072} + CUEControls + {5802C7E9-157E-4124-946D-70B5AE48A5A1} CUETools.AccurateRip diff --git a/CUERipper/frmCUERipper.Designer.cs b/CUERipper/frmCUERipper.Designer.cs index 9388958..1fa4d99 100644 --- a/CUERipper/frmCUERipper.Designer.cs +++ b/CUERipper/frmCUERipper.Designer.cs @@ -43,8 +43,7 @@ namespace CUERipper this.Start = new System.Windows.Forms.ColumnHeader(); this.Length = new System.Windows.Forms.ColumnHeader(); this.buttonGo = new System.Windows.Forms.Button(); - this.comboLossless = new System.Windows.Forms.ComboBox(); - this.comboCodec = new System.Windows.Forms.ComboBox(); + this.comboBoxAudioFormat = new System.Windows.Forms.ComboBox(); this.comboImage = new System.Windows.Forms.ComboBox(); this.buttonAbort = new System.Windows.Forms.Button(); this.buttonPause = new System.Windows.Forms.Button(); @@ -53,9 +52,19 @@ namespace CUERipper this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); this.releaseBindingSource = new System.Windows.Forms.BindingSource(this.components); + this.numericWriteOffset = new System.Windows.Forms.NumericUpDown(); + this.lblWriteOffset = new System.Windows.Forms.Label(); + this.comboBoxEncoder = new System.Windows.Forms.ComboBox(); + this.radioButtonAudioLossy = new System.Windows.Forms.RadioButton(); + this.radioButtonAudioHybrid = new System.Windows.Forms.RadioButton(); + this.radioButtonAudioLossless = new System.Windows.Forms.RadioButton(); + this.checkBoxEACMode = new System.Windows.Forms.CheckBox(); + this.groupBoxSettings = new System.Windows.Forms.GroupBox(); this.statusStrip1.SuspendLayout(); this.contextMenuStripRelease.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.releaseBindingSource)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericWriteOffset)).BeginInit(); + this.groupBoxSettings.SuspendLayout(); this.SuspendLayout(); // // comboDrives @@ -157,29 +166,19 @@ namespace CUERipper this.buttonGo.UseVisualStyleBackColor = true; this.buttonGo.Click += new System.EventHandler(this.buttonGo_Click); // - // comboLossless + // comboBoxAudioFormat // - this.comboLossless.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.comboLossless.FormattingEnabled = true; - this.comboLossless.Items.AddRange(new object[] { - resources.GetString("comboLossless.Items"), - resources.GetString("comboLossless.Items1"), - resources.GetString("comboLossless.Items2")}); - resources.ApplyResources(this.comboLossless, "comboLossless"); - this.comboLossless.Name = "comboLossless"; - // - // comboCodec - // - this.comboCodec.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.comboCodec.FormattingEnabled = true; - this.comboCodec.Items.AddRange(new object[] { - resources.GetString("comboCodec.Items"), - resources.GetString("comboCodec.Items1"), - resources.GetString("comboCodec.Items2"), - resources.GetString("comboCodec.Items3"), - resources.GetString("comboCodec.Items4")}); - resources.ApplyResources(this.comboCodec, "comboCodec"); - this.comboCodec.Name = "comboCodec"; + this.comboBoxAudioFormat.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboBoxAudioFormat.FormattingEnabled = true; + this.comboBoxAudioFormat.Items.AddRange(new object[] { + resources.GetString("comboBoxAudioFormat.Items"), + resources.GetString("comboBoxAudioFormat.Items1"), + resources.GetString("comboBoxAudioFormat.Items2"), + resources.GetString("comboBoxAudioFormat.Items3"), + resources.GetString("comboBoxAudioFormat.Items4")}); + resources.ApplyResources(this.comboBoxAudioFormat, "comboBoxAudioFormat"); + this.comboBoxAudioFormat.Name = "comboBoxAudioFormat"; + this.comboBoxAudioFormat.SelectedIndexChanged += new System.EventHandler(this.comboBoxAudioFormat_SelectedIndexChanged); // // comboImage // @@ -241,18 +240,90 @@ namespace CUERipper // this.releaseBindingSource.DataSource = typeof(MusicBrainz.Release); // + // numericWriteOffset + // + resources.ApplyResources(this.numericWriteOffset, "numericWriteOffset"); + this.numericWriteOffset.Maximum = new decimal(new int[] { + 99999, + 0, + 0, + 0}); + this.numericWriteOffset.Minimum = new decimal(new int[] { + 99999, + 0, + 0, + -2147483648}); + this.numericWriteOffset.Name = "numericWriteOffset"; + // + // lblWriteOffset + // + resources.ApplyResources(this.lblWriteOffset, "lblWriteOffset"); + this.lblWriteOffset.Name = "lblWriteOffset"; + // + // comboBoxEncoder + // + this.comboBoxEncoder.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboBoxEncoder.FormattingEnabled = true; + resources.ApplyResources(this.comboBoxEncoder, "comboBoxEncoder"); + this.comboBoxEncoder.Name = "comboBoxEncoder"; + this.comboBoxEncoder.SelectedIndexChanged += new System.EventHandler(this.comboBoxEncoder_SelectedIndexChanged); + // + // radioButtonAudioLossy + // + resources.ApplyResources(this.radioButtonAudioLossy, "radioButtonAudioLossy"); + this.radioButtonAudioLossy.Name = "radioButtonAudioLossy"; + this.radioButtonAudioLossy.TabStop = true; + this.radioButtonAudioLossy.UseVisualStyleBackColor = true; + this.radioButtonAudioLossy.CheckedChanged += new System.EventHandler(this.radioButtonAudioLossless_CheckedChanged); + // + // radioButtonAudioHybrid + // + resources.ApplyResources(this.radioButtonAudioHybrid, "radioButtonAudioHybrid"); + this.radioButtonAudioHybrid.Name = "radioButtonAudioHybrid"; + this.radioButtonAudioHybrid.TabStop = true; + this.radioButtonAudioHybrid.UseVisualStyleBackColor = true; + this.radioButtonAudioHybrid.CheckedChanged += new System.EventHandler(this.radioButtonAudioLossless_CheckedChanged); + // + // radioButtonAudioLossless + // + resources.ApplyResources(this.radioButtonAudioLossless, "radioButtonAudioLossless"); + this.radioButtonAudioLossless.Name = "radioButtonAudioLossless"; + this.radioButtonAudioLossless.TabStop = true; + this.radioButtonAudioLossless.UseVisualStyleBackColor = true; + this.radioButtonAudioLossless.CheckedChanged += new System.EventHandler(this.radioButtonAudioLossless_CheckedChanged); + // + // checkBoxEACMode + // + resources.ApplyResources(this.checkBoxEACMode, "checkBoxEACMode"); + this.checkBoxEACMode.Name = "checkBoxEACMode"; + this.checkBoxEACMode.UseVisualStyleBackColor = true; + this.checkBoxEACMode.CheckedChanged += new System.EventHandler(this.checkBoxEACMode_CheckedChanged); + // + // groupBoxSettings + // + this.groupBoxSettings.Controls.Add(this.radioButtonAudioLossless); + this.groupBoxSettings.Controls.Add(this.comboBoxAudioFormat); + this.groupBoxSettings.Controls.Add(this.checkBoxEACMode); + this.groupBoxSettings.Controls.Add(this.lblWriteOffset); + this.groupBoxSettings.Controls.Add(this.numericWriteOffset); + this.groupBoxSettings.Controls.Add(this.comboImage); + this.groupBoxSettings.Controls.Add(this.radioButtonAudioLossy); + this.groupBoxSettings.Controls.Add(this.comboBoxEncoder); + this.groupBoxSettings.Controls.Add(this.radioButtonAudioHybrid); + resources.ApplyResources(this.groupBoxSettings, "groupBoxSettings"); + this.groupBoxSettings.Name = "groupBoxSettings"; + this.groupBoxSettings.TabStop = false; + // // frmCUERipper // resources.ApplyResources(this, "$this"); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.groupBoxSettings); this.Controls.Add(this.comboRelease); this.Controls.Add(this.buttonPause); - this.Controls.Add(this.buttonAbort); - this.Controls.Add(this.comboImage); - this.Controls.Add(this.comboCodec); - this.Controls.Add(this.comboLossless); - this.Controls.Add(this.buttonGo); this.Controls.Add(this.listTracks); + this.Controls.Add(this.buttonAbort); + this.Controls.Add(this.buttonGo); this.Controls.Add(this.statusStrip1); this.Controls.Add(this.comboDrives); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; @@ -265,6 +336,9 @@ namespace CUERipper this.statusStrip1.PerformLayout(); this.contextMenuStripRelease.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.releaseBindingSource)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericWriteOffset)).EndInit(); + this.groupBoxSettings.ResumeLayout(false); + this.groupBoxSettings.PerformLayout(); this.ResumeLayout(false); this.PerformLayout(); @@ -283,8 +357,7 @@ namespace CUERipper private System.Windows.Forms.ColumnHeader Start; private System.Windows.Forms.ColumnHeader Length; private System.Windows.Forms.Button buttonGo; - private System.Windows.Forms.ComboBox comboLossless; - private System.Windows.Forms.ComboBox comboCodec; + private System.Windows.Forms.ComboBox comboBoxAudioFormat; private System.Windows.Forms.ComboBox comboImage; private System.Windows.Forms.Button buttonAbort; private System.Windows.Forms.Button buttonPause; @@ -295,6 +368,14 @@ namespace CUERipper private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1; private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel2; private System.Windows.Forms.ToolStripStatusLabel toolStripStatusAr; + private System.Windows.Forms.NumericUpDown numericWriteOffset; + private System.Windows.Forms.Label lblWriteOffset; + private System.Windows.Forms.ComboBox comboBoxEncoder; + private System.Windows.Forms.RadioButton radioButtonAudioLossy; + private System.Windows.Forms.RadioButton radioButtonAudioHybrid; + private System.Windows.Forms.RadioButton radioButtonAudioLossless; + private System.Windows.Forms.CheckBox checkBoxEACMode; + private System.Windows.Forms.GroupBox groupBoxSettings; } } diff --git a/CUERipper/frmCUERipper.cs b/CUERipper/frmCUERipper.cs index f096c3d..a3eb8f2 100644 --- a/CUERipper/frmCUERipper.cs +++ b/CUERipper/frmCUERipper.cs @@ -25,17 +25,19 @@ namespace CUERipper private CDDriveReader _reader = null; private StartStop _startStop; private CUEConfig _config; - private OutputAudioFormat _format; - private CUEStyle _style; + private string _format; private CUESheet _cueSheet; private string _pathOut; private string _pathFormat; + string _defaultLosslessFormat, _defaultLossyFormat, _defaultHybridFormat; + private CUEControls.ShellIconMgr m_icon_mgr; public frmCUERipper() { InitializeComponent(); _config = new CUEConfig(); _startStop = new StartStop(); + m_icon_mgr = new CUEControls.ShellIconMgr(); } //private byte toBCD(int val) @@ -67,13 +69,17 @@ namespace CUERipper //{ //} - SettingsReader sr = new SettingsReader("CUERipper", "settings.txt"); + SettingsReader sr = new SettingsReader("CUERipper", "settings.txt", Application.ExecutablePath); + _defaultLosslessFormat = sr.Load("DefaultLosslessFormat") ?? "flac"; + _defaultLossyFormat = sr.Load("DefaultLossyFormat") ?? "mp3"; + _defaultHybridFormat = sr.Load("DefaultHybridFormat") ?? "lossy.flac"; _config.createEACLOG = sr.LoadBoolean("CreateEACLOG") ?? false; _config.preserveHTOA = sr.LoadBoolean("PreserveHTOA") ?? false; _config.createM3U = sr.LoadBoolean("CreateM3U") ?? true; - _pathFormat = sr.Load("PathFormat") ?? "%D\\%Y - %C\\%D - %C.cue"; - comboLossless.SelectedIndex = sr.LoadInt32("ComboLossless", 0, comboLossless.Items.Count - 1) ?? 0; - comboCodec.SelectedIndex = sr.LoadInt32("ComboCodec", 0, comboCodec.Items.Count - 1) ?? 0; + _pathFormat = sr.Load("PathFormat") ?? "%music%\\%artist%\\%year% - %album%\\%artist% - %album%.cue"; + checkBoxEACMode.Checked = _config.createEACLOG; + SelectedOutputAudioType = (AudioEncoderType?)sr.LoadInt32("OutputAudioType", null, null) ?? AudioEncoderType.Lossless; + comboBoxAudioFormat.SelectedIndex = sr.LoadInt32("ComboCodec", 0, comboBoxAudioFormat.Items.Count - 1) ?? 0; comboImage.SelectedIndex = sr.LoadInt32("ComboImage", 0, comboImage.Items.Count - 1) ?? 0; UpdateDrives(); } @@ -153,9 +159,7 @@ namespace CUERipper listTracks.Enabled = comboDrives.Enabled = comboRelease.Enabled = - comboCodec.Enabled = - comboImage.Enabled = - comboLossless.Enabled = !running; + groupBoxSettings.Enabled = !running; buttonPause.Visible = buttonPause.Enabled = buttonAbort.Visible = buttonAbort.Enabled = running; buttonGo.Visible = buttonGo.Enabled = !running; toolStripStatusLabel1.Text = String.Empty; @@ -209,11 +213,11 @@ namespace CUERipper { CDDriveReader audioSource = (CDDriveReader)o; audioSource.ReadProgress += new EventHandler(CDReadProgress); + audioSource.DriveOffset = (int)numericWriteOffset.Value; try { - string outDir = Path.GetDirectoryName(_pathOut); - _cueSheet.WriteAudioFiles(outDir == "" ? "." : outDir, _style); + _cueSheet.Go(); //CUESheet.WriteText(_pathOut, _cueSheet.CUESheetContents(_style)); //CUESheet.WriteText(Path.ChangeExtension(_pathOut, ".log"), _cueSheet.LOGContents()); } @@ -243,12 +247,20 @@ namespace CUERipper private string GenerateOutputPath() { List find = new List(); + find.Add("%music%"); + find.Add("%artist%"); find.Add("%D"); + find.Add("%album%"); find.Add("%C"); + find.Add("%year%"); find.Add("%Y"); List replace = new List(); + replace.Add(m_icon_mgr.GetFolderPath(CUEControls.ExtraSpecialFolder.MyMusic)); + replace.Add(General.EmptyStringToNull(_config.CleanseString(_cueSheet.Artist))); replace.Add(General.EmptyStringToNull(_config.CleanseString(_cueSheet.Artist))); replace.Add(General.EmptyStringToNull(_config.CleanseString(_cueSheet.Title))); + replace.Add(General.EmptyStringToNull(_config.CleanseString(_cueSheet.Title))); + replace.Add(_cueSheet.Year); replace.Add(_cueSheet.Year); return Path.ChangeExtension(General.ReplaceMultiple(_pathFormat, find, replace) ?? "image.cue", ".cue"); @@ -259,19 +271,13 @@ namespace CUERipper if (_reader == null) return; - _style = comboImage.SelectedIndex == 0 ? CUEStyle.SingleFileWithCUE : + _cueSheet.OutputStyle = comboImage.SelectedIndex == 0 ? CUEStyle.SingleFileWithCUE : CUEStyle.GapsAppended; _pathOut = GenerateOutputPath(); - _config.lossyWAVHybrid = comboLossless.SelectedIndex == 1; // _cueSheet.Config? - if (_style == CUEStyle.SingleFileWithCUE) + if (_cueSheet.OutputStyle == CUEStyle.SingleFileWithCUE) _cueSheet.SingleFilename = Path.GetFileName(_pathOut); - _format = (string)comboCodec.SelectedItem == "wav" ? OutputAudioFormat.WAV : - (string)comboCodec.SelectedItem == "flac" ? OutputAudioFormat.FLAC : - (string)comboCodec.SelectedItem == "wv" ? OutputAudioFormat.WavPack : - (string)comboCodec.SelectedItem == "ape" ? OutputAudioFormat.APE : - (string)comboCodec.SelectedItem == "tta" ? OutputAudioFormat.TTA : - OutputAudioFormat.NoAudio; - _cueSheet.GenerateFilenames(_format, comboLossless.SelectedIndex != 0, _pathOut); + _format = (string)comboBoxAudioFormat.SelectedItem; + _cueSheet.GenerateFilenames(SelectedOutputAudioType, _format, _pathOut); _workThread = new Thread(Rip); _workThread.Priority = ThreadPriority.BelowNormal; @@ -353,6 +359,7 @@ namespace CUERipper ReleaseInfo r = new ReleaseInfo(); r.cueSheet = new CUESheet(_config); r.cueSheet.OpenCD(audioSource); + //r.cueSheet.WriteOffset = General.SetCUELine(r.cueSheet.Attributes, "REM", "GENRE", "", true); General.SetCUELine(r.cueSheet.Attributes, "REM", "DATE", "", false); General.SetCUELine(r.cueSheet.Attributes, "REM", "DISCID", AccurateRipVerify.CalculateCDDBId(audioSource.TOC), false); @@ -488,7 +495,7 @@ namespace CUERipper SetupControls(); comboRelease.SelectedIndex = 0; CUESheet cueSheet = ((ReleaseInfo)comboRelease.SelectedItem).cueSheet; - toolStripStatusAr.Visible = true; // cueSheet.ArVerify.ARStatus == null; + toolStripStatusAr.Visible = cueSheet.ArVerify.ARStatus == null; toolStripStatusAr.Text = cueSheet.ArVerify.ARStatus == null ? cueSheet.ArVerify.Total(0).ToString() : "?"; toolStripStatusAr.ToolTipText = "AccurateRip: " + (cueSheet.ArVerify.ARStatus ?? "found") + "."; }); @@ -509,9 +516,11 @@ namespace CUERipper try { _reader.Open(_reader.Path[0]); + numericWriteOffset.Value = _reader.DriveOffset; } catch (Exception ex) { + numericWriteOffset.Value = _reader.DriveOffset; _reader.Close(); comboRelease.Items.Add(ex.Message); comboRelease.SelectedIndex = 0; @@ -603,12 +612,15 @@ namespace CUERipper private void frmCUERipper_FormClosed(object sender, FormClosedEventArgs e) { - SettingsWriter sw = new SettingsWriter("CUERipper", "settings.txt"); - if (_config.createEACLOG) sw.Save("CreateEACLOG", _config.createEACLOG); + SettingsWriter sw = new SettingsWriter("CUERipper", "settings.txt", Application.ExecutablePath); + sw.Save("DefaultLosslessFormat", _defaultLosslessFormat); + sw.Save("DefaultLossyFormat", _defaultLossyFormat); + sw.Save("DefaultHybridFormat", _defaultHybridFormat); + sw.Save("CreateEACLOG", _config.createEACLOG); sw.Save("PreserveHTOA", _config.preserveHTOA); sw.Save("CreateM3U", _config.createM3U); - sw.Save("ComboLossless", comboLossless.SelectedIndex); - sw.Save("ComboCodec", comboCodec.SelectedIndex); + sw.Save("OutputAudioType", (int)SelectedOutputAudioType); + sw.Save("ComboCodec", comboBoxAudioFormat.SelectedIndex); sw.Save("ComboImage", comboImage.SelectedIndex); sw.Save("PathFormat", _pathFormat); sw.Close(); @@ -619,6 +631,139 @@ namespace CUERipper if (!_reader.TOC[e.Item + 1].IsAudio) e.CancelEdit = true; } + + private string SelectedOutputAudioFormat + { + get + { + return (string)(comboBoxAudioFormat.SelectedItem ?? "dummy"); + } + set + { + comboBoxAudioFormat.SelectedItem = value; + } + } + + private CUEToolsFormat SelectedOutputAudioFmt + { + get + { + CUEToolsFormat fmt; + if (comboBoxAudioFormat.SelectedItem == null) + return null; + string formatName = (string)comboBoxAudioFormat.SelectedItem; + if (formatName.StartsWith("lossy.")) + formatName = formatName.Substring(6); + return _config.formats.TryGetValue(formatName, out fmt) ? fmt : null; + } + } + + private AudioEncoderType SelectedOutputAudioType + { + get + { + return + radioButtonAudioHybrid.Checked ? AudioEncoderType.Hybrid : + radioButtonAudioLossy.Checked ? AudioEncoderType.Lossy : + AudioEncoderType.Lossless; + } + set + { + switch (value) + { + case AudioEncoderType.Hybrid: + radioButtonAudioHybrid.Checked = true; + break; + case AudioEncoderType.Lossy: + radioButtonAudioLossy.Checked = true; + break; + default: + radioButtonAudioLossless.Checked = true; + break; + } + } + } + + private void checkBoxEACMode_CheckedChanged(object sender, EventArgs e) + { + _config.createEACLOG = checkBoxEACMode.Checked; + } + + private void radioButtonAudioLossless_CheckedChanged(object sender, EventArgs e) + { + if (sender is RadioButton && !((RadioButton)sender).Checked) + return; + //labelFormat.ImageKey = null; + comboBoxAudioFormat.Items.Clear(); + foreach (KeyValuePair format in _config.formats) + { + if (SelectedOutputAudioType == AudioEncoderType.Lossless && !format.Value.allowLossless) + continue; + if (SelectedOutputAudioType == AudioEncoderType.Hybrid) // && format.Key != "wv") TODO!!!!! + continue; + if (SelectedOutputAudioType == AudioEncoderType.Lossy && !format.Value.allowLossy) + continue; + comboBoxAudioFormat.Items.Add(format.Key); + } + foreach (KeyValuePair format in _config.formats) + { + if (!format.Value.allowLossyWAV) + continue; + if (SelectedOutputAudioType == AudioEncoderType.Lossless) + continue; + if (SelectedOutputAudioType == AudioEncoderType.NoAudio) + continue; + comboBoxAudioFormat.Items.Add("lossy." + format.Key); + } + switch (SelectedOutputAudioType) + { + case AudioEncoderType.Lossless: + SelectedOutputAudioFormat = _defaultLosslessFormat; + break; + case AudioEncoderType.Lossy: + SelectedOutputAudioFormat = _defaultLossyFormat; + break; + case AudioEncoderType.Hybrid: + SelectedOutputAudioFormat = _defaultHybridFormat; + break; + } + } + + private void comboBoxAudioFormat_SelectedIndexChanged(object sender, EventArgs e) + { + //labelFormat.ImageKey = SelectedOutputAudioFmt == null ? null : "." + SelectedOutputAudioFmt.extension; + comboBoxEncoder.Items.Clear(); + if (SelectedOutputAudioFmt == null) + return; + + foreach (KeyValuePair encoder in _config.encoders) + if (encoder.Value.extension == SelectedOutputAudioFmt.extension) + { + if (SelectedOutputAudioFormat.StartsWith("lossy.") && !encoder.Value.lossless) + continue; + else if (SelectedOutputAudioType == AudioEncoderType.Lossless && !encoder.Value.lossless) + continue; + else if (SelectedOutputAudioType == AudioEncoderType.Lossy && encoder.Value.lossless) + continue; + comboBoxEncoder.Items.Add(encoder.Key); + } + comboBoxEncoder.SelectedItem = SelectedOutputAudioFormat.StartsWith("lossy.") ? SelectedOutputAudioFmt.encoderLossless + : SelectedOutputAudioType == AudioEncoderType.Lossless ? SelectedOutputAudioFmt.encoderLossless + : SelectedOutputAudioFmt.encoderLossy; + comboBoxEncoder.Enabled = true; + } + + private void comboBoxEncoder_SelectedIndexChanged(object sender, EventArgs e) + { + if (SelectedOutputAudioFormat == null) + return; + if (SelectedOutputAudioFormat.StartsWith("lossy.")) + SelectedOutputAudioFmt.encoderLossless = (string)comboBoxEncoder.SelectedItem; + else if (SelectedOutputAudioType == AudioEncoderType.Lossless) + SelectedOutputAudioFmt.encoderLossless = (string)comboBoxEncoder.SelectedItem; + else + SelectedOutputAudioFmt.encoderLossy = (string)comboBoxEncoder.SelectedItem; + } } public class StartStop diff --git a/CUERipper/frmCUERipper.resx b/CUERipper/frmCUERipper.resx index 8ba7c8a..5f14312 100644 --- a/CUERipper/frmCUERipper.resx +++ b/CUERipper/frmCUERipper.resx @@ -126,7 +126,7 @@ 6, 6 - 481, 21 + 487, 21 @@ -142,13 +142,13 @@ $this - 10 + 8 - 0, 371 + 0, 443 - 223, 17 + 260, 17 MiddleLeft @@ -201,10 +201,10 @@ toolStripStatusAr - 0, 371 + 0, 443 - 499, 22 + 505, 22 12 @@ -222,7 +222,7 @@ $this - 9 + 7 Top, Left, Right @@ -234,7 +234,7 @@ Title - 307 + 292 0 @@ -261,7 +261,7 @@ 6, 60 - 481, 269 + 487, 272 0 @@ -276,7 +276,7 @@ $this - 8 + 4 Top, Left, Right @@ -285,10 +285,10 @@ NoControl - 396, 335 + 382, 406 - 91, 33 + 111, 33 13 @@ -306,73 +306,43 @@ $this - 7 - - - lossless - - - hybrid - - - lossy - - - 6, 335 - - - 70, 21 - - - 16 - - - comboLossless - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - 6 - + flac - + wv - + wav - + ape - + tta - - 82, 335 + + 103, 20 - - 70, 21 + + 89, 21 - + 17 - - comboCodec + + comboBoxAudioFormat - + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - $this + + groupBoxSettings - - 5 + + 1 image @@ -381,10 +351,10 @@ tracks - 158, 335 + 103, 49 - 70, 21 + 89, 21 18 @@ -396,10 +366,10 @@ System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - $this + groupBoxSettings - 4 + 5 Top, Left, Right @@ -408,10 +378,10 @@ NoControl - 396, 335 + 382, 406 - 91, 33 + 111, 33 19 @@ -432,7 +402,7 @@ $this - 3 + 5 Top, Left, Right @@ -441,10 +411,10 @@ NoControl - 299, 335 + 382, 367 - 91, 33 + 111, 33 20 @@ -465,7 +435,7 @@ $this - 2 + 3 Top, Left, Right @@ -492,7 +462,7 @@ 6, 33 - 481, 21 + 487, 21 21 @@ -507,7 +477,7 @@ $this - 1 + 2 181, 22 @@ -518,6 +488,219 @@ 116, 371 + + 305, 19 + + + 54, 20 + + + 22 + + + Right + + + numericWriteOffset + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxSettings + + + 4 + + + True + + + NoControl + + + 237, 21 + + + 62, 13 + + + 23 + + + Read offset + + + lblWriteOffset + + + System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxSettings + + + 3 + + + 103, 78 + + + 89, 21 + + + 24 + + + comboBoxEncoder + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxSettings + + + 7 + + + True + + + NoControl + + + 6, 36 + + + 52, 17 + + + 27 + + + Lossy + + + radioButtonAudioLossy + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxSettings + + + 6 + + + True + + + NoControl + + + 6, 53 + + + 55, 17 + + + 26 + + + Hybrid + + + radioButtonAudioHybrid + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxSettings + + + 8 + + + True + + + NoControl + + + 6, 19 + + + 65, 17 + + + 25 + + + Lossless + + + radioButtonAudioLossless + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxSettings + + + 0 + + + True + + + 6, 77 + + + 76, 17 + + + 28 + + + EAC mode + + + checkBoxEACMode + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxSettings + + + 2 + + + 6, 332 + + + 370, 108 + + + 29 + + + groupBoxSettings + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 1 + True @@ -525,7 +708,7 @@ 6, 13 - 499, 393 + 505, 465 @@ -559,7 +742,7 @@ CenterScreen - CUERipper 1.9.5a + CUERipper 2.0.2 toolStripStatusLabel1 diff --git a/CUETools.AccurateRip/AccurateRip.cs b/CUETools.AccurateRip/AccurateRip.cs index b0acdd1..08b0ec0 100644 --- a/CUETools.AccurateRip/AccurateRip.cs +++ b/CUETools.AccurateRip/AccurateRip.cs @@ -489,7 +489,7 @@ namespace CUETools.AccurateRip } } - public void GenerateFullLog(TextWriter sw, int offsetApplied) + public void GenerateFullLog(TextWriter sw, bool verbose) { if (AccResult == HttpStatusCode.NotFound) { @@ -505,30 +505,74 @@ namespace CUETools.AccurateRip } else { - sw.WriteLine("Track\t[ CRC ] Status"); - GenerateLog(sw, offsetApplied); - uint offsets_match = 0; - for (int oi = -_arOffsetRange; oi <= _arOffsetRange; oi++) + if (verbose) { - uint matches = 0; - for (int iTrack = 0; iTrack < _toc.AudioTracks; iTrack++) - for (int di = 0; di < (int)AccDisks.Count; di++) - if ((CRC(iTrack, oi) == AccDisks[di].tracks[iTrack].CRC && AccDisks[di].tracks[iTrack].CRC != 0) || - (CRC450(iTrack, oi) == AccDisks[di].tracks[iTrack].Frame450CRC && AccDisks[di].tracks[iTrack].Frame450CRC != 0)) - matches++; - if (matches != 0 && oi != offsetApplied) + sw.WriteLine("Track\t[ CRC ] Status"); + GenerateLog(sw, 0); + uint offsets_match = 0; + for (int oi = -_arOffsetRange; oi <= _arOffsetRange; oi++) { - if (offsets_match++ > 10) + uint matches = 0; + for (int iTrack = 0; iTrack < _toc.AudioTracks; iTrack++) + for (int di = 0; di < (int)AccDisks.Count; di++) + if ((CRC(iTrack, oi) == AccDisks[di].tracks[iTrack].CRC && AccDisks[di].tracks[iTrack].CRC != 0) || + (CRC450(iTrack, oi) == AccDisks[di].tracks[iTrack].Frame450CRC && AccDisks[di].tracks[iTrack].Frame450CRC != 0)) + matches++; + if (matches != 0 && oi != 0) { - sw.WriteLine("More than 10 offsets match!"); - break; + if (offsets_match++ > 10) + { + sw.WriteLine("More than 10 offsets match!"); + break; + } + sw.WriteLine("Offsetted by {0}:", oi); + GenerateLog(sw, oi); } - sw.WriteLine("Offsetted by {0}:", oi); - GenerateLog(sw, oi); + } + } + else + { + sw.WriteLine("Track\t Status"); + for (int iTrack = 0; iTrack < _toc.AudioTracks; iTrack++) + { + uint total = Total(iTrack); + uint conf = 0, part = 0; + bool zeroOffset = false; + string pressings = ""; + for (int iDisk = 0; iDisk < AccDisks.Count; iDisk++) + for (int oi = -_arOffsetRange; oi <= _arOffsetRange; oi++) + { + if (CRC(iTrack, oi) == AccDisks[iDisk].tracks[iTrack].CRC) + { + conf += AccDisks[iDisk].tracks[iTrack].count; + if (oi == 0) + zeroOffset = true; + if (pressings != "") + pressings = pressings + ","; + pressings = pressings + oi.ToString(); + } else + if (CRC450(iTrack, oi) == AccDisks[iDisk].tracks[iTrack].Frame450CRC) + { + part += AccDisks[iDisk].tracks[iTrack].count; + if (pressings != "") + pressings = pressings + ","; + pressings = pressings + oi.ToString(); + } + } + if (conf > 0 && zeroOffset) + sw.WriteLine(String.Format(" {0:00}\t ({2:00}/{1:00}) Accurately ripped", iTrack + 1, total, conf)); + 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)); + else if (part > 0) + sw.WriteLine(String.Format(" {0:00}\t ({2:00}/{1:00}) NOT ACCURATE even with offset(s) {3}", iTrack + 1, total, part, pressings)); + else if (total > 0) + sw.WriteLine(String.Format(" {0:00}\t (00/{1:00}) No matches", iTrack + 1, total)); + else + sw.WriteLine(String.Format(" {0:00}\t (00/00) Track not present in database", iTrack + 1)); } } } - if (CRC32(0) != 0) + if (CRC32(0) != 0 && (_hasLogCRC || verbose)) { sw.WriteLine(""); sw.WriteLine("Track\t[ CRC32 ]\t[W/O NULL]\t{0:10}", _hasLogCRC ? "[ LOG ]" : ""); diff --git a/CUETools.CDImage/CDImage.cs b/CUETools.CDImage/CDImage.cs index bcdcc76..83c0e16 100644 --- a/CUETools.CDImage/CDImage.cs +++ b/CUETools.CDImage/CDImage.cs @@ -165,6 +165,10 @@ namespace CUETools.CDImage { return _start - _indexes[0].Start; } + set + { + _indexes[0].Start = _start - value; + } } public CDTrackIndex this[int key] diff --git a/CUETools.Codecs.ALAC/ALACDotNet.cs b/CUETools.Codecs.ALAC/ALACDotNet.cs index a4e6ded..1dcb828 100644 --- a/CUETools.Codecs.ALAC/ALACDotNet.cs +++ b/CUETools.Codecs.ALAC/ALACDotNet.cs @@ -47,30 +47,35 @@ namespace CUETools.Codecs.ALAC return AudioSamples.Read(this, buff); } + private void InitTables() + { + if (_predicterror_buffer_a != null) + return; + + setinfo_max_samples_per_frame = read_uint32(_codecData, 24); + byte setinfo_7a = read_uint8(_codecData, 28); + byte setinfo_sample_size = read_uint8(_codecData, 29); + setinfo_rice_historymult = read_uint8(_codecData, 30); + setinfo_rice_initialhistory = read_uint8(_codecData, 31); + setinfo_rice_kmodifier = read_uint8(_codecData, 32); + byte setinfo_7f = read_uint8(_codecData, 33); + ushort setinfo_80 = read_uint16(_codecData, 34); + uint setinfo_82 = read_uint32(_codecData, 36); // maxframesize + uint setinfo_86 = read_uint32(_codecData, 40); // bitrate + uint setinfo_8a_rate = read_uint32(_codecData, 44); // samplerate + + _predicterror_buffer_a = new int[setinfo_max_samples_per_frame]; + _predicterror_buffer_b = new int[setinfo_max_samples_per_frame]; + _outputsamples_buffer_a = new int[setinfo_max_samples_per_frame]; + _outputsamples_buffer_b = new int[setinfo_max_samples_per_frame]; + + _samplesInBuffer = 0; + _framesBuffer = new byte[65536]; + } + public uint Read(int[,] buff, uint sampleCount) { - if (_predicterror_buffer_a == null) - { - setinfo_max_samples_per_frame = read_uint32(_codecData, 24); - byte setinfo_7a = read_uint8(_codecData, 28); - byte setinfo_sample_size = read_uint8(_codecData, 29); - setinfo_rice_historymult = read_uint8(_codecData, 30); - setinfo_rice_initialhistory = read_uint8(_codecData, 31); - setinfo_rice_kmodifier = read_uint8(_codecData, 32); - byte setinfo_7f = read_uint8(_codecData, 33); - ushort setinfo_80 = read_uint16(_codecData, 34); - uint setinfo_82 = read_uint32(_codecData, 36); // maxframesize - uint setinfo_86 = read_uint32(_codecData, 40); // bitrate - uint setinfo_8a_rate = read_uint32(_codecData, 44); // samplerate - - _predicterror_buffer_a = new int[setinfo_max_samples_per_frame]; - _predicterror_buffer_b = new int[setinfo_max_samples_per_frame]; - _outputsamples_buffer_a = new int[setinfo_max_samples_per_frame]; - _outputsamples_buffer_b = new int[setinfo_max_samples_per_frame]; - - _samplesInBuffer = 0; - _framesBuffer = new byte[65536]; - } + InitTables(); uint offset = 0; @@ -78,7 +83,7 @@ namespace CUETools.Codecs.ALAC { if (_samplesInBuffer > 0) { - deinterlace(buff, offset); + deinterlace(buff, offset, _samplesInBuffer); sampleCount -= (uint) _samplesInBuffer; offset += _samplesInBuffer; _samplesInBuffer = 0; @@ -99,7 +104,7 @@ namespace CUETools.Codecs.ALAC _iSample++; } - deinterlace(buff, offset); + deinterlace(buff, offset, sampleCount); _samplesInBuffer -= sampleCount; _samplesBufferOffset += sampleCount; if (_samplesInBuffer == 0) @@ -232,6 +237,29 @@ namespace CUETools.Codecs.ALAC uint duration_cur_index = 0; for (duration_cur_index = 0; duration_cur_index < _time_to_sample_count.Length; duration_cur_index++) _sampleCount += _time_to_sample_count[duration_cur_index] * _time_to_sample_duration[duration_cur_index]; + // try a work around for ffdshow-generated buggy files + if (_time_to_sample_count.Length == 1 && _IO.CanSeek) + { + uint sample_count_0 = _time_to_sample_count[0] - 1; + uint sample_duration_0 = _time_to_sample_duration[0]; + Position = sample_count_0 * sample_duration_0; + uint sampleDuration; + uint sampleSize; + if ((int)_iSample < _sample_byte_size.Length) + { + get_sample_info(_iSample, out sampleDuration, out sampleSize); + InitTables(); + _IO.Read(_framesBuffer, 0, (int)sampleSize); + decodeFrame(sampleDuration, sampleSize); + if (_samplesInBuffer < sampleDuration) + { + _time_to_sample_duration = new uint[2] { sample_duration_0, _samplesInBuffer }; + _time_to_sample_count = new uint[2] { sample_count_0, 1 }; + _sampleCount -= sampleDuration - _samplesInBuffer; + } + } + Position = 0; + } } private byte [] stream_read_bytes(int len) @@ -609,9 +637,9 @@ namespace CUETools.Codecs.ALAC } } - private unsafe void deinterlace(int [,] samplesBuffer, uint offset) + private unsafe void deinterlace(int[,] samplesBuffer, uint offset, uint sampleCount) { - if (_samplesInBuffer <= 0) + if (sampleCount <= 0 || sampleCount > _samplesInBuffer) return; int i; @@ -621,7 +649,7 @@ namespace CUETools.Codecs.ALAC /* weighted interlacing */ if (_interlacing_leftweight != 0) { - for (i = 0; i < _samplesInBuffer; i++) + for (i = 0; i < sampleCount; i++) { int midright = buf_a[i]; int diff = buf_b[i]; @@ -642,7 +670,7 @@ namespace CUETools.Codecs.ALAC } /* otherwise basic interlacing took place */ - for (i = 0; i < _samplesInBuffer; i++) + for (i = 0; i < sampleCount; i++) { int a = buf_a[i]; int b = buf_b[i]; diff --git a/CUETools.Converter/Program.cs b/CUETools.Converter/Program.cs index 4770659..a720fcf 100644 --- a/CUETools.Converter/Program.cs +++ b/CUETools.Converter/Program.cs @@ -35,15 +35,14 @@ namespace CUETools.Converter TimeSpan lastPrint = TimeSpan.FromMilliseconds(0); CUEConfig config = new CUEConfig(); - SettingsReader sr = new SettingsReader("CUE Tools", "settings.txt"); + SettingsReader sr = new SettingsReader("CUE Tools", "settings.txt", null); config.Load(sr); - config.lossyWAVHybrid = false; #if !DEBUG try #endif { IAudioSource audioSource = AudioReadWrite.GetAudioSource(sourceFile, null, config); - IAudioDest audioDest = AudioReadWrite.GetAudioDest(destFile, (long)audioSource.Length, audioSource.BitsPerSample, audioSource.SampleRate, config); + IAudioDest audioDest = AudioReadWrite.GetAudioDest(AudioEncoderType.Lossless, destFile, (long)audioSource.Length, audioSource.BitsPerSample, audioSource.SampleRate, config); int[,] buff = new int[0x4000, audioSource.ChannelCount]; Console.WriteLine("Filename : {0}", sourceFile); diff --git a/CUETools.Processor/AudioReadWrite.cs b/CUETools.Processor/AudioReadWrite.cs index 1634b30..f0b97c6 100644 --- a/CUETools.Processor/AudioReadWrite.cs +++ b/CUETools.Processor/AudioReadWrite.cs @@ -17,26 +17,32 @@ namespace CUETools.Processor public static class AudioReadWrite { public static IAudioSource GetAudioSource(string path, Stream IO, string extension, CUEConfig config) { - switch (extension) + CUEToolsFormat fmt; + if (!extension.StartsWith(".") || !config.formats.TryGetValue(extension.Substring(1), out fmt)) + throw new Exception("Unsupported audio type: " + path); + CUEToolsUDC decoder; + if (fmt.decoder == null || !config.decoders.TryGetValue(fmt.decoder, out decoder)) + throw new Exception("Unsupported audio type: " + path); + switch (decoder.className) { - case ".wav": + case "WAVReader": return new WAVReader(path, IO); - case ".m4a": + case "ALACReader": return new ALACReader(path, IO); #if !MONO - case ".flac": + case "FLACReader": return new FLACReader(path, IO, config.disableAsm); - case ".wv": + case "WavPackReader": return new WavPackReader(path, IO, null); - case ".ape": + case "APEReader": return new APEReader(path, IO); - case ".tta": + case "TTAReader": return new TTAReader(path, IO); #endif default: - if (extension == "." + config.udc1Extension && config.udc1Decoder != "") - return new UserDefinedReader(path, IO, config.udc1Decoder, config.udc1Params); - throw new Exception("Unsupported audio type: " + path); + if (decoder.path == null) + throw new Exception("Unsupported audio type: " + path); + return new UserDefinedReader(path, IO, decoder.path, decoder.parameters); } } @@ -63,59 +69,71 @@ namespace CUETools.Processor return new LossyWAVReader(lossySource, lwcdfSource); } - public static IAudioDest GetAudioDest(string path, int bitsPerSample, int channelCount, int sampleRate, long finalSampleCount, string extension, CUEConfig config) { + public static IAudioDest GetAudioDest(AudioEncoderType audioEncoderType, string path, int bitsPerSample, int channelCount, int sampleRate, long finalSampleCount, string extension, CUEConfig config) + { IAudioDest dest; - switch (extension) { - case ".wav": + if (audioEncoderType == AudioEncoderType.NoAudio || extension == ".dummy") + { + dest = new DummyWriter(path, bitsPerSample, channelCount, sampleRate); + dest.FinalSampleCount = finalSampleCount; + return dest; + } + CUEToolsFormat fmt; + if (!extension.StartsWith(".") || !config.formats.TryGetValue(extension.Substring(1), out fmt)) + throw new Exception("Unsupported audio type: " + path); + string encoderName = audioEncoderType == AudioEncoderType.Lossless ? fmt.encoderLossless : + audioEncoderType == AudioEncoderType.Lossy ? fmt.encoderLossy : + null; + CUEToolsUDC encoder; + if (encoderName == null || !config.encoders.TryGetValue(encoderName, out encoder)) + throw new Exception("Unsupported audio type: " + path); + switch (encoder.className) + { + case "WAVWriter": dest = new WAVWriter(path, bitsPerSample, channelCount, sampleRate, null); break; #if !MONO - case ".flac": + case "FLACWriter": dest = new FLACWriter(path, bitsPerSample, channelCount, sampleRate); ((FLACWriter)dest).CompressionLevel = (int)config.flacCompressionLevel; ((FLACWriter)dest).Verify = config.flacVerify; ((FLACWriter)dest).DisableAsm = config.disableAsm; break; - case ".wv": + case "WavPackWriter": dest = new WavPackWriter(path, bitsPerSample, channelCount, sampleRate); ((WavPackWriter)dest).CompressionMode = config.wvCompressionMode; ((WavPackWriter)dest).ExtraMode = config.wvExtraMode; ((WavPackWriter)dest).MD5Sum = config.wvStoreMD5; break; - case ".ape": + case "APEWriter": dest = new APEWriter(path, bitsPerSample, channelCount, sampleRate); ((APEWriter)dest).CompressionLevel = (int)config.apeCompressionLevel; break; - case ".tta": + case "TTAWriter": dest = new TTAWriter(path, bitsPerSample, channelCount, sampleRate); break; - case ".dummy": - dest = new DummyWriter(path, bitsPerSample, channelCount, sampleRate); - break; #endif default: - if (extension == "." + config.udc1Extension && config.udc1Encoder != "") - { - dest = new UserDefinedWriter(path, bitsPerSample, channelCount, sampleRate, null, config.udc1Encoder, config.udc1EncParams); - break; - } - throw new Exception("Unsupported audio type: " + path); + if (encoder.path == null) + throw new Exception("Unsupported audio type: " + path); + dest = new UserDefinedWriter(path, bitsPerSample, channelCount, sampleRate, null, encoder.path, encoder.parameters); + break; } dest.FinalSampleCount = finalSampleCount; return dest; } - public static IAudioDest GetAudioDest(string path, long finalSampleCount, int bitsPerSample, int sampleRate, CUEConfig config) + public static IAudioDest GetAudioDest(AudioEncoderType audioEncoderType, string path, long finalSampleCount, int bitsPerSample, int sampleRate, CUEConfig config) { string extension = Path.GetExtension(path).ToLower(); string filename = Path.GetFileNameWithoutExtension(path); - if (Path.GetExtension(filename).ToLower() != ".lossy") - return GetAudioDest(path, bitsPerSample, 2, sampleRate, finalSampleCount, extension, config); + if (audioEncoderType == AudioEncoderType.NoAudio || audioEncoderType == AudioEncoderType.Lossless || Path.GetExtension(filename).ToLower() != ".lossy") + return GetAudioDest(audioEncoderType, path, bitsPerSample, 2, sampleRate, finalSampleCount, extension, config); string lwcdfPath = Path.Combine(Path.GetDirectoryName(path), Path.GetFileNameWithoutExtension(filename) + ".lwcdf" + extension); int lossyBitsPerSample = (config.detectHDCD && config.decodeHDCD && !config.decodeHDCDtoLW16) ? 24 : 16; - IAudioDest lossyDest = GetAudioDest(path, lossyBitsPerSample, 2, sampleRate, finalSampleCount, extension, config); - IAudioDest lwcdfDest = config.lossyWAVHybrid ? GetAudioDest(lwcdfPath, bitsPerSample, 2, sampleRate, finalSampleCount, extension, config) : null; + IAudioDest lossyDest = GetAudioDest(AudioEncoderType.Lossless, path, lossyBitsPerSample, 2, sampleRate, finalSampleCount, extension, config); + IAudioDest lwcdfDest = audioEncoderType == AudioEncoderType.Hybrid ? GetAudioDest(AudioEncoderType.Lossless, lwcdfPath, bitsPerSample, 2, sampleRate, finalSampleCount, extension, config) : null; return new LossyWAVWriter(lossyDest, lwcdfDest, bitsPerSample, 2, sampleRate, config.lossyWAVQuality); } } diff --git a/CUETools.Processor/CUETools.Processor.csproj b/CUETools.Processor/CUETools.Processor.csproj index d1dfd50..c77c1fa 100644 --- a/CUETools.Processor/CUETools.Processor.csproj +++ b/CUETools.Processor/CUETools.Processor.csproj @@ -78,6 +78,10 @@ prompt + + False + .\CSScriptLibrary.v1.1.dll + False .\ICSharpCode.SharpZipLib.dll diff --git a/CUETools.Processor/Processor.cs b/CUETools.Processor/Processor.cs index a746bc9..f682401 100644 --- a/CUETools.Processor/Processor.cs +++ b/CUETools.Processor/Processor.cs @@ -30,6 +30,9 @@ using System.Net; using System.Security.Cryptography; using System.Threading; using System.Xml; +using System.Drawing; +using System.Drawing.Drawing2D; +using System.Drawing.Imaging; using HDCDDotNet; using CUETools.Codecs; using CUETools.Codecs.LossyWAV; @@ -43,26 +46,26 @@ using UnRarDotNet; using CUETools.Codecs.FLAC; #endif using ICSharpCode.SharpZipLib.Zip; +using CSScriptLibrary; namespace CUETools.Processor { - public enum OutputAudioFormat + + public enum AudioEncoderType { - WAV, - FLAC, - WavPack, - APE, - TTA, + Lossless, + Hybrid, + Lossy, + /// + /// No Audio + /// NoAudio, - UDC1 } public enum CUEAction { Convert, Verify, - VerifyPlusCRCs, - VerifyThenConvert, VerifyAndConvert, CreateDummyCUE, CorrectFilenames @@ -70,29 +73,29 @@ namespace CUETools.Processor public enum CUEStyle { + /// + /// Single file with embedded CUE + /// SingleFileWithCUE, + /// + /// Single file with external CUE + /// SingleFile, + /// + /// Gaps prepended file-per-track + /// GapsPrepended, + /// + /// Gaps appended (noncompliant) file-per-track + /// GapsAppended, + /// + /// Gaps left out file-per-track + /// GapsLeftOut } public static class General { - public static string FormatExtension(OutputAudioFormat value, CUEConfig config) - { - switch (value) - { - case OutputAudioFormat.FLAC: return ".flac"; - case OutputAudioFormat.WavPack: return ".wv"; - case OutputAudioFormat.APE: return ".ape"; - case OutputAudioFormat.TTA: return ".tta"; - case OutputAudioFormat.WAV: return ".wav"; - case OutputAudioFormat.NoAudio: return ".dummy"; - case OutputAudioFormat.UDC1: return "." + config.udc1Extension; - } - return ".wav"; - } - public static CUELine FindCUELine(List list, string command) { command = command.ToUpper(); foreach (CUELine line in list) { @@ -240,9 +243,116 @@ namespace CUETools.Processor } } + public enum CUEToolsTagger + { + TagLibSharp = 0, + APEv2 = 1, + ID3v2 = 2, + } + + public class CUEToolsFormat + { + public CUEToolsFormat( + string _extension, + CUEToolsTagger _tagger, + bool _allowLossless, + bool _allowLossy, + bool _allowLossyWAV, + bool _allowEmbed, + bool _builtin, + string _encoderLossless, + string _encoderLossy, + string _decoder) + { + extension = _extension; + tagger = _tagger; + allowLossless = _allowLossless; + allowLossy = _allowLossy; + allowLossyWAV = _allowLossyWAV; + allowEmbed = _allowEmbed; + builtin = _builtin; + encoderLossless = _encoderLossless; + encoderLossy = _encoderLossy; + decoder = _decoder; + } + public override string ToString() + { + return extension; + } + public string extension; + public string encoderLossless; + public string encoderLossy; + public string decoder; + public CUEToolsTagger tagger; + public bool allowLossless, allowLossy, allowLossyWAV, allowEmbed, builtin; + } + + public class CUEToolsUDC + { + public CUEToolsUDC( + string _name, + string _extension, + bool _lossless, + string _path, + string _parameters + ) + { + name = _name; + extension = _extension; + lossless = _lossless; + path = _path; + parameters = _parameters; + className = null; + } + public CUEToolsUDC( + string _name, + string _extension, + bool _lossless, + string _className) + { + name = _name; + extension = _extension; + lossless = _lossless; + path = null; + parameters = null; + className = _className; + } + public override string ToString() + { + return name; + } + public string name; + public string extension; + public string path; + public string parameters; + public string className; + public bool lossless; + } + + public class CUEToolsScript + { + public CUEToolsScript(string _name, bool _builtin, IEnumerable _conditions, string _code) + { + name = _name; + builtin = _builtin; + conditions = new List(); + foreach(CUEAction condition in _conditions) + conditions.Add(condition); + code = _code; + } + public override string ToString() + { + return name; + } + public string name; + public bool builtin; + public List conditions; + public string code; + } + public class CUEConfig { - public uint fixWhenConfidence; - public uint fixWhenPercent; + public uint fixOffsetMinimumConfidence; + public uint fixOffsetMinimumTracksPercent; public uint encodeWhenConfidence; public uint encodeWhenPercent; public bool encodeWhenZeroOffset; @@ -281,19 +391,34 @@ namespace CUETools.Processor public bool createCUEFileWhenEmbedded; public bool truncate4608ExtraSamples; public int lossyWAVQuality; - public bool lossyWAVHybrid; public bool decodeHDCDtoLW16; public bool decodeHDCDto24bit; - public string udc1Extension, udc1Decoder, udc1Params, udc1Encoder, udc1EncParams; - public bool udc1APEv2, udc1ID3v2; public bool disableAsm; public bool oneInstance; public string language; + public Dictionary formats; + public Dictionary encoders; + public Dictionary decoders; + public Dictionary scripts; + public string defaultVerifyScript; + public string defaultConvertScript; + public string defaultVerifyAndConvertScript; + public bool writeBasicTagsFromCUEData; + public bool copyBasicTags; + public bool copyUnknownTags; + public bool copyAlbumArt; + public bool embedAlbumArt; + //public bool extractAlbumArt; + public bool arLogToSourceFolder; + public bool arLogVerbose; + public bool fixOffsetToNearest; + public int maxAlbumArtSize; + public string arLogExtension; public CUEConfig() { - fixWhenConfidence = 2; - fixWhenPercent = 51; + fixOffsetMinimumConfidence = 2; + fixOffsetMinimumTracksPercent = 51; encodeWhenConfidence = 2; encodeWhenPercent = 100; encodeWhenZeroOffset = false; @@ -312,7 +437,7 @@ namespace CUETools.Processor wvCompressionMode = 1; wvExtraMode = 0; wvStoreMD5 = false; - keepOriginalFilenames = true; + keepOriginalFilenames = false; trackFilenameFormat = "%N. %T"; singleFilenameFormat = "%F"; removeSpecial = false; @@ -333,23 +458,116 @@ namespace CUETools.Processor createCUEFileWhenEmbedded = true; truncate4608ExtraSamples = true; lossyWAVQuality = 5; - lossyWAVHybrid = true; decodeHDCDtoLW16 = false; decodeHDCDto24bit = true; - udc1Extension = udc1Decoder = udc1Params = udc1Encoder = udc1EncParams = ""; - udc1ID3v2 = udc1APEv2 = false; - disableAsm = false; oneInstance = true; + writeBasicTagsFromCUEData = true; + copyBasicTags = true; + copyUnknownTags = true; + copyAlbumArt = true; + embedAlbumArt = true; + maxAlbumArtSize = 300; + + arLogToSourceFolder = false; + arLogVerbose = true; + fixOffsetToNearest = true; + arLogExtension = ".accurip"; + language = Thread.CurrentThread.CurrentUICulture.Name; + + formats = new Dictionary(); + formats.Add("flac", new CUEToolsFormat("flac", CUEToolsTagger.TagLibSharp, true, false, true, true, true, "libFLAC", null, "libFLAC")); + formats.Add("wv", new CUEToolsFormat("wv", CUEToolsTagger.TagLibSharp, true, false, true, true, true, "libwavpack", null, "libwavpack")); + formats.Add("ape", new CUEToolsFormat("ape", CUEToolsTagger.TagLibSharp, true, false, false, true, true, "MAC_SDK", null, "MAC_SDK")); + formats.Add("tta", new CUEToolsFormat("tta", CUEToolsTagger.APEv2, true, false, false, false, true, "ttalib", null, "ttalib")); + formats.Add("wav", new CUEToolsFormat("wav", CUEToolsTagger.TagLibSharp, true, false, true, false, true, "builtin wav", null, "builtin wav")); + formats.Add("tak", new CUEToolsFormat("tak", CUEToolsTagger.APEv2, true, false, true, true, true, "takc", null, "takc")); + formats.Add("m4a", new CUEToolsFormat("m4a", CUEToolsTagger.TagLibSharp, true, true, false, false, true, "ffmpeg alac", "nero aac", "builtin alac")); + formats.Add("mp3", new CUEToolsFormat("mp3", CUEToolsTagger.TagLibSharp, false, true, false, false, true, null, "lame -V0", null)); + formats.Add("ogg", new CUEToolsFormat("ogg", CUEToolsTagger.TagLibSharp, false, true, false, false, true, null, "oggenc", null)); + + encoders = new Dictionary(); +#if !MONO + encoders.Add("libFLAC", new CUEToolsUDC("libFLAC", "flac", true, "FLACWriter")); + encoders.Add("libwavpack", new CUEToolsUDC("libwavpack", "wv", true, "WavPackWriter")); + encoders.Add("MAC_SDK", new CUEToolsUDC("MAC_SDK", "ape", true, "APEWriter")); + encoders.Add("ttalib", new CUEToolsUDC("ttalib", "tta", true, "TTAWriter")); +#endif + encoders.Add("builtin wav", new CUEToolsUDC("builtin wav", "wav", true, "WAVWriter")); + encoders.Add("flake", new CUEToolsUDC("flake", "flac", true, "flake.exe", "-10 - -o %O")); + encoders.Add("takc", new CUEToolsUDC("takc", "tak", true, "takc.exe", "-e -p4m -overwrite - %O")); + encoders.Add("ffmpeg alac", new CUEToolsUDC("ffmpeg alac", "m4a", true, "ffmpeg.exe", "-i - -f ipod -acodec alac -y %O")); + encoders.Add("lame -V2", new CUEToolsUDC("lame -V2", "mp3", false, "lame.exe", "--vbr-new -V2 - %O")); + encoders.Add("lame -V0", new CUEToolsUDC("lame -V0", "mp3", false, "lame.exe", "--vbr-new -V0 - %O")); + encoders.Add("lame 256", new CUEToolsUDC("lame 256", "mp3", false, "lame.exe", "-m s -q 0 -b 256 --noreplaygain - %O")); + encoders.Add("lame 320", new CUEToolsUDC("lame 320", "mp3", false, "lame.exe", "-m s -q 0 -b 320 --noreplaygain - %O")); + encoders.Add("oggenc", new CUEToolsUDC("oggenc", "ogg", false, "oggenc.exe", "-q 3 - -o %O")); + encoders.Add("nero aac", new CUEToolsUDC("nero aac", "mp4", false, "neroAacEnc.exe", "-q 0.4 -if - -of %O")); + + decoders = new Dictionary(); +#if !MONO + decoders.Add("libFLAC", new CUEToolsUDC("libFLAC", "flac", true, "FLACReader")); + decoders.Add("libwavpack", new CUEToolsUDC("libwavpack", "wv", true, "WavPackReader")); + decoders.Add("MAC_SDK", new CUEToolsUDC("MAC_SDK", "ape", true, "APEReader")); + decoders.Add("ttalib", new CUEToolsUDC("ttalib", "tta", true, "TTAReader")); +#endif + decoders.Add("builtin wav", new CUEToolsUDC("builtin wav", "wav", true, "WAVReader")); + decoders.Add("builtin alac", new CUEToolsUDC("builtin alac", "m4a", true, "ALACReader")); + decoders.Add("takc", new CUEToolsUDC("takc", "tak", true, "takc.exe", "-d %I -")); + decoders.Add("ffmpeg alac", new CUEToolsUDC("ffmpeg alac", "m4a", true, "ffmpeg.exe", "%I -f wav -")); + + scripts = new Dictionary(); + scripts.Add("default", new CUEToolsScript("default", true, + new CUEAction[] { CUEAction.VerifyAndConvert, CUEAction.Verify, CUEAction.Convert }, + "return processor.Go();")); + scripts.Add("only if found", new CUEToolsScript("only if found", true, + new CUEAction[] { CUEAction.Verify }, +@"if (processor.ArVerify.AccResult != HttpStatusCode.OK) + return processor.WriteReport(); +return processor.Go();")); + scripts.Add("fix offset", new CUEToolsScript("fix offset", true, + new CUEAction[] { CUEAction.VerifyAndConvert }, +@"if (processor.ArVerify.AccResult != HttpStatusCode.OK) + return processor.WriteReport(); +processor.WriteOffset = 0; +processor.Action = CUEAction.Verify; +string status = processor.Go(); +uint tracksMatch; +int bestOffset; +processor.FindBestOffset(processor.Config.fixOffsetMinimumConfidence, !processor.Config.fixOffsetToNearest, out tracksMatch, out bestOffset); +if (tracksMatch * 100 < processor.Config.fixOffsetMinimumTracksPercent * processor.TrackCount) + return status; +processor.WriteOffset = bestOffset; +processor.Action = CUEAction.VerifyAndConvert; +//MessageBox.Show(null, processor.AccurateRipLog, " + "\"Done\"" + @"MessageBoxButtons.OK, MessageBoxIcon.Information); +return processor.Go(); +")); + scripts.Add("encode if verified", new CUEToolsScript("encode if verified", true, + new CUEAction[] { CUEAction.VerifyAndConvert }, +@"if (processor.ArVerify.AccResult != HttpStatusCode.OK) + return processor.WriteReport(); +processor.Action = CUEAction.Verify; +string status = processor.Go(); +uint tracksMatch; +int bestOffset; +processor.FindBestOffset(processor.Config.encodeWhenConfidence, false, out tracksMatch, out bestOffset); +if (tracksMatch * 100 < processor.Config.encodeWhenPercent * processor.TrackCount || (processor.Config.encodeWhenZeroOffset && bestOffset != 0)) + return status; +processor.Action = CUEAction.VerifyAndConvert; +return processor.Go(); +")); + defaultVerifyScript = "default"; + defaultConvertScript = "default"; + defaultVerifyAndConvertScript = "default"; } public void Save (SettingsWriter sw) { - sw.Save("ArFixWhenConfidence", fixWhenConfidence); - sw.Save("ArFixWhenPercent", fixWhenPercent); + sw.Save("ArFixWhenConfidence", fixOffsetMinimumConfidence); + sw.Save("ArFixWhenPercent", fixOffsetMinimumTracksPercent); sw.Save("ArEncodeWhenConfidence", encodeWhenConfidence); sw.Save("ArEncodeWhenPercent", encodeWhenPercent); sw.Save("ArEncodeWhenZeroOffset", encodeWhenZeroOffset); @@ -389,28 +607,86 @@ namespace CUETools.Processor sw.Save("CreateCUEFileWhenEmbedded", createCUEFileWhenEmbedded); sw.Save("Truncate4608ExtraSamples", truncate4608ExtraSamples); sw.Save("LossyWAVQuality", lossyWAVQuality); - sw.Save("LossyWAVHybrid", lossyWAVHybrid); sw.Save("DecodeHDCDToLossyWAV16", decodeHDCDtoLW16); sw.Save("DecodeHDCDTo24bit", decodeHDCDto24bit); sw.Save("DisableAsm", disableAsm); sw.Save("OneInstance", oneInstance); - if (udc1Extension != "") - { - sw.Save("UDC1Extension", udc1Extension); - sw.Save("UDC1Decoder", udc1Decoder); - sw.Save("UDC1Params", udc1Params); - sw.Save("UDC1Encoder", udc1Encoder); - sw.Save("UDC1EncParams", udc1EncParams); - sw.Save("UDC1APEv2", udc1APEv2); - sw.Save("UDC1ID3v2", udc1ID3v2); - } sw.Save("Language", language); + + sw.Save("WriteBasicTagsFromCUEData", writeBasicTagsFromCUEData); + sw.Save("CopyBasicTags", copyBasicTags); + sw.Save("CopyUnknownTags", copyUnknownTags); + sw.Save("CopyAlbumArt", copyAlbumArt); + sw.Save("EmbedAlbumArt", embedAlbumArt); + sw.Save("MaxAlbumArtSize", maxAlbumArtSize); + + sw.Save("ArLogToSourceFolder", arLogToSourceFolder); + sw.Save("ArLogVerbose", arLogVerbose); + sw.Save("FixOffsetToNearest", fixOffsetToNearest); + sw.Save("ArLogExtension", arLogExtension); + + int nEncoders = 0; + foreach (KeyValuePair encoder in encoders) + if (encoder.Value.path != null) + { + sw.Save(string.Format("ExternalEncoder{0}Name", nEncoders), encoder.Key); + sw.Save(string.Format("ExternalEncoder{0}Extension", nEncoders), encoder.Value.extension); + sw.Save(string.Format("ExternalEncoder{0}Path", nEncoders), encoder.Value.path); + sw.Save(string.Format("ExternalEncoder{0}Parameters", nEncoders), encoder.Value.parameters); + sw.Save(string.Format("ExternalEncoder{0}Lossless", nEncoders), encoder.Value.lossless); + nEncoders++; + } + sw.Save("ExternalEncoders", nEncoders); + + int nDecoders = 0; + foreach (KeyValuePair decoder in decoders) + if (decoder.Value.path != null) + { + sw.Save(string.Format("ExternalDecoder{0}Name", nDecoders), decoder.Key); + sw.Save(string.Format("ExternalDecoder{0}Extension", nDecoders), decoder.Value.extension); + sw.Save(string.Format("ExternalDecoder{0}Path", nDecoders), decoder.Value.path); + sw.Save(string.Format("ExternalDecoder{0}Parameters", nDecoders), decoder.Value.parameters); + nDecoders++; + } + sw.Save("ExternalDecoders", nDecoders); + + int nFormats = 0; + foreach (KeyValuePair format in formats) + { + sw.Save(string.Format("CustomFormat{0}Name", nFormats), format.Key); + sw.Save(string.Format("CustomFormat{0}EncoderLossless", nFormats), format.Value.encoderLossless); + sw.Save(string.Format("CustomFormat{0}EncoderLossy", nFormats), format.Value.encoderLossy); + sw.Save(string.Format("CustomFormat{0}Decoder", nFormats), format.Value.decoder); + sw.Save(string.Format("CustomFormat{0}Tagger", nFormats), (int)format.Value.tagger); + sw.Save(string.Format("CustomFormat{0}AllowLossless", nFormats), format.Value.allowLossless); + sw.Save(string.Format("CustomFormat{0}AllowLossy", nFormats), format.Value.allowLossy); + sw.Save(string.Format("CustomFormat{0}AllowLossyWAV", nFormats), format.Value.allowLossyWAV); + sw.Save(string.Format("CustomFormat{0}AllowEmbed", nFormats), format.Value.allowEmbed); + nFormats++; + } + sw.Save("CustomFormats", nFormats); + + int nScripts = 0; + foreach (KeyValuePair script in scripts) + { + sw.Save(string.Format("CustomScript{0}Name", nScripts), script.Key); + sw.SaveText(string.Format("CustomScript{0}Code", nScripts), script.Value.code); + int nCondition = 0; + foreach (CUEAction action in script.Value.conditions) + sw.Save(string.Format("CustomScript{0}Condition{1}", nScripts, nCondition++), (int)action); + sw.Save(string.Format("CustomScript{0}Conditions", nScripts), nCondition); + nScripts++; + } + sw.Save("CustomScripts", nScripts); + sw.Save("DefaultVerifyScript", defaultVerifyScript); + sw.Save("DefaultConvertScript", defaultConvertScript); + sw.Save("DefaultVerifyAndConvertScript", defaultVerifyAndConvertScript); } public void Load(SettingsReader sr) { - fixWhenConfidence = sr.LoadUInt32("ArFixWhenConfidence", 1, 1000) ?? 2; - fixWhenPercent = sr.LoadUInt32("ArFixWhenPercent", 1, 100) ?? 51; + fixOffsetMinimumConfidence = sr.LoadUInt32("ArFixWhenConfidence", 1, 1000) ?? 2; + fixOffsetMinimumTracksPercent = sr.LoadUInt32("ArFixWhenPercent", 1, 100) ?? 51; encodeWhenConfidence = sr.LoadUInt32("ArEncodeWhenConfidence", 1, 1000) ?? 2; encodeWhenPercent = sr.LoadUInt32("ArEncodeWhenPercent", 1, 100) ?? 100; encodeWhenZeroOffset = sr.LoadBoolean("ArEncodeWhenZeroOffset") ?? false; @@ -429,7 +705,7 @@ namespace CUETools.Processor wvCompressionMode = sr.LoadInt32("WVCompressionMode", 0, 3) ?? 1; wvExtraMode = sr.LoadInt32("WVExtraMode", 0, 6) ?? 0; wvStoreMD5 = sr.LoadBoolean("WVStoreMD5") ?? false; - keepOriginalFilenames = sr.LoadBoolean("KeepOriginalFilenames") ?? true; + keepOriginalFilenames = sr.LoadBoolean("KeepOriginalFilenames") ?? false; singleFilenameFormat = sr.Load("SingleFilenameFormat") ?? "%F"; trackFilenameFormat = sr.Load("TrackFilenameFormat") ?? "%N. %T"; removeSpecial = sr.LoadBoolean("RemoveSpecialCharacters") ?? false; @@ -450,20 +726,121 @@ namespace CUETools.Processor createCUEFileWhenEmbedded = sr.LoadBoolean("CreateCUEFileWhenEmbedded") ?? true; truncate4608ExtraSamples = sr.LoadBoolean("Truncate4608ExtraSamples") ?? true; lossyWAVQuality = sr.LoadInt32("LossyWAVQuality", 0, 10) ?? 5; - lossyWAVHybrid = sr.LoadBoolean("LossyWAVHybrid") ?? true; decodeHDCDtoLW16 = sr.LoadBoolean("DecodeHDCDToLossyWAV16") ?? false; decodeHDCDto24bit = sr.LoadBoolean("DecodeHDCDTo24bit") ?? true; disableAsm = sr.LoadBoolean("DisableAsm") ?? false; oneInstance = sr.LoadBoolean("OneInstance") ?? true; - udc1Extension = sr.Load("UDC1Extension") ?? ""; - udc1Decoder = sr.Load("UDC1Decoder") ?? ""; - udc1Params = sr.Load("UDC1Params") ?? ""; - udc1Encoder = sr.Load("UDC1Encoder") ?? ""; - udc1EncParams = sr.Load("UDC1EncParams") ?? ""; - udc1APEv2 = sr.LoadBoolean("UDC1APEv2") ?? false; - udc1ID3v2 = sr.LoadBoolean("UDC1ID3v2") ?? false; + writeBasicTagsFromCUEData = sr.LoadBoolean("WriteBasicTagsFromCUEData") ?? true; + copyBasicTags = sr.LoadBoolean("CopyBasicTags") ?? true; + copyUnknownTags = sr.LoadBoolean("CopyUnknownTags") ?? true; + copyAlbumArt = sr.LoadBoolean("CopyAlbumArt") ?? true; + embedAlbumArt = sr.LoadBoolean("EmbedAlbumArt") ?? true; + maxAlbumArtSize = sr.LoadInt32("MaxAlbumArtSize", 100, 3000) ?? maxAlbumArtSize; + + arLogToSourceFolder = sr.LoadBoolean("ArLogToSourceFolder") ?? arLogToSourceFolder; + arLogVerbose = sr.LoadBoolean("ArLogVerbose") ?? arLogVerbose; + fixOffsetToNearest = sr.LoadBoolean("FixOffsetToNearest") ?? fixOffsetToNearest; + arLogExtension = sr.Load("ArLogExtension") ?? arLogExtension; + + int totalEncoders = sr.LoadInt32("ExternalEncoders", 0, null) ?? 0; + for (int nEncoders = 0; nEncoders < totalEncoders; nEncoders++) + { + string name = sr.Load(string.Format("ExternalEncoder{0}Name", nEncoders)); + string extension = sr.Load(string.Format("ExternalEncoder{0}Extension", nEncoders)); + string path = sr.Load(string.Format("ExternalEncoder{0}Path", nEncoders)); + string parameters = sr.Load(string.Format("ExternalEncoder{0}Parameters", nEncoders)); + bool lossless = sr.LoadBoolean(string.Format("ExternalEncoder{0}Lossless", nEncoders)) ?? true; + CUEToolsUDC encoder; + if (!encoders.TryGetValue(name, out encoder)) + encoders.Add(name, new CUEToolsUDC(name, extension, lossless, path, parameters)); + else + { + if (encoder.path != null) + { + encoder.extension = extension; + encoder.path = path; + encoder.parameters = parameters; + encoder.lossless = lossless; + } + } + } + + int totalDecoders = sr.LoadInt32("ExternalDecoders", 0, null) ?? 0; + for (int nDecoders = 0; nDecoders < totalDecoders; nDecoders++) + { + string name = sr.Load(string.Format("ExternalDecoder{0}Name", nDecoders)); + string extension = sr.Load(string.Format("ExternalDecoder{0}Extension", nDecoders)); + string path = sr.Load(string.Format("ExternalDecoder{0}Path", nDecoders)); + string parameters = sr.Load(string.Format("ExternalDecoder{0}Parameters", nDecoders)); + CUEToolsUDC decoder; + if (!decoders.TryGetValue(name, out decoder)) + decoders.Add(name, new CUEToolsUDC(name, extension, true, path, parameters)); + else + { + decoder.extension = extension; + decoder.path = path; + decoder.parameters = parameters; + } + } + + int totalFormats = sr.LoadInt32("CustomFormats", 0, null) ?? 0; + for (int nFormats = 0; nFormats < totalFormats; nFormats++) + { + string extension = sr.Load(string.Format("CustomFormat{0}Name", nFormats)); + string encoderLossless = sr.Load(string.Format("CustomFormat{0}EncoderLossless", nFormats)); + string encoderLossy = sr.Load(string.Format("CustomFormat{0}EncoderLossy", nFormats)); + string decoder = sr.Load(string.Format("CustomFormat{0}Decoder", nFormats)); + CUEToolsTagger tagger = (CUEToolsTagger) (sr.LoadInt32(string.Format("CustomFormat{0}Tagger", nFormats), 0, 2) ?? 0); + bool allowLossless = sr.LoadBoolean(string.Format("CustomFormat{0}AllowLossless", nFormats)) ?? false; + bool allowLossy = sr.LoadBoolean(string.Format("CustomFormat{0}AllowLossy", nFormats)) ?? false; + bool allowLossyWav = sr.LoadBoolean(string.Format("CustomFormat{0}AllowLossyWAV", nFormats)) ?? false; + bool allowEmbed = sr.LoadBoolean(string.Format("CustomFormat{0}AllowEmbed", nFormats)) ?? false; + CUEToolsFormat format; + if (!formats.TryGetValue(extension, out format)) + formats.Add(extension, new CUEToolsFormat(extension, tagger, allowLossless, allowLossy, allowLossyWav, allowEmbed, false, encoderLossless, encoderLossy, decoder)); + else + { + format.encoderLossless = encoderLossless; + format.encoderLossy = encoderLossy; + format.decoder = decoder; + if (!format.builtin) + { + format.tagger = tagger; + format.allowLossless = allowLossless; + format.allowLossy = allowLossy; + format.allowLossyWAV = allowLossyWav; + format.allowEmbed = allowEmbed; + } + } + } + + int totalScripts = sr.LoadInt32("CustomScripts", 0, null) ?? 0; + for (int nScripts = 0; nScripts < totalScripts; nScripts++) + { + string name = sr.Load(string.Format("CustomScript{0}Name", nScripts)); + string code = sr.Load(string.Format("CustomScript{0}Code", nScripts)); + List conditions = new List(); + int totalConditions = sr.LoadInt32(string.Format("CustomScript{0}Conditions", nScripts), 0, null) ?? 0; + for (int nCondition = 0; nCondition < totalConditions; nCondition++) + conditions.Add((CUEAction)sr.LoadInt32(string.Format("CustomScript{0}Condition{1}", nScripts, nCondition), 0, null)); + CUEToolsScript script; + if (!scripts.TryGetValue(name, out script)) + scripts.Add(name, new CUEToolsScript(name, false, conditions, code)); + else + { + if (!script.builtin) + { + script.code = code; + script.conditions = conditions; + } + } + } + + defaultVerifyScript = sr.Load("DefaultVerifyScript") ?? "default"; + defaultConvertScript = sr.Load("DefaultConvertScript") ?? "default"; + defaultVerifyAndConvertScript = sr.Load("DefaultVerifyAndConvertScript") ?? "default"; language = sr.Load("Language") ?? Thread.CurrentThread.CurrentUICulture.Name; } @@ -549,12 +926,15 @@ namespace CUETools.Processor private uint? _minDataTrackLength; private string _accurateRipId; private string _eacLog; - private string _cuePath; + private string _inputPath, _inputDir; + private string _outputPath; private TagLib.File _fileInfo; private const int _arOffsetRange = 5 * 588 - 1; private HDCDDotNet.HDCDDotNet hdcdDecoder; + private AudioEncoderType _audioEncoderType = AudioEncoderType.Lossless; private bool _outputLossyWAV = false; - private OutputAudioFormat _outputFormat = OutputAudioFormat.WAV; + private string _outputFormat = "wav"; + private CUEStyle _outputStyle = CUEStyle.SingleFile; private CUEConfig _config; private string _cddbDiscIdTag; private bool _isCD; @@ -585,7 +965,7 @@ namespace CUETools.Processor _sourcePaths = new List(); _stop = false; _pause = false; - _cuePath = null; + _outputPath = null; _paddedToFrame = false; _truncated4608 = false; _usePregapForFirstTrackInSingleFile = false; @@ -786,6 +1166,7 @@ namespace CUETools.Processor bool iscdda2wavlog = false; string lineStr; int prevTrNo = 1, prevTrStart = 0; + uint firstPreGap = 0; while ((lineStr = sr.ReadLine()) != null) { if (isEACLog) @@ -805,6 +1186,44 @@ namespace CUETools.Processor isAudio = false; tocFromLog.AddTrack(new CDTrack(trNo, trStart, trEnd + 1 - trStart, isAudio, false)); } + else + { + string[] sepTrack = { "Track" }; + string[] sepGap = { "Pre-gap length" }; + + string[] partsTrack = lineStr.Split(sepTrack, StringSplitOptions.None); + if (partsTrack.Length == 2 && uint.TryParse(partsTrack[1], out trNo)) + { + prevTrNo = (int) trNo; + continue; + } + + string[] partsGap = lineStr.Split(sepGap, StringSplitOptions.None); + if (partsGap.Length == 2) + { + string[] n1 = partsGap[1].Split(':', '.'); + int h, m, s, f; + if (n1.Length == 4 && int.TryParse(n1[0], out h) && int.TryParse(n1[1], out m) && int.TryParse(n1[2], out s) && int.TryParse(n1[3], out f)) + { + uint gap = (uint)((f * 3 + 2) / 4 + 75 * (s + 60 * (m + 60 * h))); + if (prevTrNo == 1) + gap -= 150; + if (prevTrNo == 1) + firstPreGap = gap - _toc[1].Start; + //else + //firstPreGap += gap; + while (prevTrNo > tocFromLog.TrackCount && _toc.TrackCount > tocFromLog.TrackCount) + { + tocFromLog.AddTrack(new CDTrack((uint)tocFromLog.TrackCount + 1, + _toc[tocFromLog.TrackCount + 1].Start + firstPreGap, + _toc[tocFromLog.TrackCount + 1].Length, + _toc[tocFromLog.TrackCount + 1].IsAudio, false)); + } + if (prevTrNo <= tocFromLog.TrackCount) + tocFromLog[prevTrNo].Pregap = gap; + } + } + } } else if (iscdda2wavlog) { @@ -844,9 +1263,11 @@ namespace CUETools.Processor public void Open(string pathIn) { - string cueDir = Path.GetDirectoryName(pathIn) ?? pathIn; + _inputPath = pathIn; + _inputDir = Path.GetDirectoryName(_inputPath) ?? _inputPath; + if (_inputDir == "") _inputDir = "."; #if !MONO - if (cueDir == pathIn) + if (_inputDir == pathIn) { CDDriveReader ripper = new CDDriveReader(); try @@ -872,19 +1293,6 @@ namespace CUETools.Processor } #endif - SourceInfo sourceInfo; - string lineStr, command, pathAudio = null, fileType; - CUELine line; - TrackInfo trackInfo = null; - int timeRelativeToFileStart, absoluteFileStartTime = 0; - int fileTimeLengthSamples = 0, fileTimeLengthFrames = 0, i; - bool fileIsBinary = false; - int trackNumber = 0; - bool isAudioTrack = true; - bool seenFirstFileIndex = false; - List indexes = new List(); - IndexInfo indexInfo; - TagLib.File _trackFileInfo = null; TextReader sr; if (Directory.Exists(pathIn)) @@ -909,7 +1317,7 @@ namespace CUETools.Processor // _eacLog = selectedLogFile != null ? selectedLogFile.contents : null; //} else if (Path.GetExtension(pathIn).ToLower() == ".zip" || Path.GetExtension(pathIn).ToLower() == ".rar") - { + { _archiveContents = new List(); _isArchive = true; _archivePath = pathIn; @@ -969,18 +1377,21 @@ namespace CUETools.Processor _archiveCUEpath = Path.GetDirectoryName(selectedCUEFile.path); string cueText = selectedCUEFile.contents; if (_config.autoCorrectFilenames) - cueText = CorrectAudioFilenames(_archiveCUEpath, cueText, false, _archiveContents); + { + string extension; + cueText = CorrectAudioFilenames(_config, _archiveCUEpath, cueText, false, _archiveContents, out extension); + } sr = new StringReader(cueText); } else if (Path.GetExtension(pathIn).ToLower() == ".cue") { if (_config.autoCorrectFilenames) - sr = new StringReader (CorrectAudioFilenames(pathIn, false)); + sr = new StringReader(CorrectAudioFilenames(_config, pathIn, false)); else - sr = new StreamReader (pathIn, CUESheet.Encoding); + sr = new StreamReader(pathIn, CUESheet.Encoding); List logFiles = new List(); - foreach (string logPath in Directory.GetFiles(cueDir == "" ? "." : cueDir, "*.log")) + foreach (string logPath in Directory.GetFiles(_inputDir, "*.log")) logFiles.Add(new CUEToolsSourceFile(logPath, new StreamReader(logPath, CUESheet.Encoding))); CUEToolsSourceFile selectedLogFile = ChooseFile(logFiles, Path.GetFileNameWithoutExtension(pathIn), false); _eacLog = selectedLogFile != null ? selectedLogFile.contents : null; @@ -989,7 +1400,10 @@ namespace CUETools.Processor { string extension = Path.GetExtension(pathIn).ToLower(); sr = null; - if (extension == ".flac" || extension == ".wv" || extension == ".ape") + CUEToolsFormat fmt; + if (!extension.StartsWith(".") || !_config.formats.TryGetValue(extension.Substring(1), out fmt) || !fmt.allowLossless) + throw new Exception("Unknown input format."); + if (fmt.allowEmbed) { string cuesheetTag = null; TagLib.File fileInfo; @@ -1003,7 +1417,6 @@ namespace CUETools.Processor if (cuesheetTag != null) { sr = new StringReader(cuesheetTag); - pathAudio = pathIn; _hasEmbeddedCUESheet = true; } } @@ -1014,16 +1427,36 @@ namespace CUETools.Processor throw new Exception("Input file doesn't seem to contain a cue sheet or be part of an album."); sr = new StringReader(cueSheet); List logFiles = new List(); - foreach (string logPath in Directory.GetFiles(cueDir == "" ? "." : cueDir, "*.log")) + foreach (string logPath in Directory.GetFiles(_inputDir, "*.log")) logFiles.Add(new CUEToolsSourceFile(logPath, new StreamReader(logPath, CUESheet.Encoding))); CUEToolsSourceFile selectedLogFile = ChooseFile(logFiles, null, false); _eacLog = selectedLogFile != null ? selectedLogFile.contents : null; } } - using (sr) { + OpenCUE(sr); + } + + public void OpenCUE(TextReader sr) + { + string pathAudio = null; + string lineStr, command, fileType; + bool fileIsBinary = false; + int timeRelativeToFileStart, absoluteFileStartTime = 0; + int fileTimeLengthSamples = 0, fileTimeLengthFrames = 0, i; + TagLib.File _trackFileInfo = null; + bool seenFirstFileIndex = false; + bool isAudioTrack = true; + List indexes = new List(); + IndexInfo indexInfo; + SourceInfo sourceInfo; + TrackInfo trackInfo = null; + int trackNumber = 0; + + using (sr) + { while ((lineStr = sr.ReadLine()) != null) { - line = new CUELine(lineStr); + CUELine line = new CUELine(lineStr); if (line.Params.Count > 0) { command = line.Params[0].ToUpper(); @@ -1039,11 +1472,12 @@ namespace CUETools.Processor if (_isArchive) pathAudio = LocateFile(_archiveCUEpath, line.Params[1], _archiveContents); else - pathAudio = LocateFile(cueDir, line.Params[1], null); + pathAudio = LocateFile(_inputDir, line.Params[1], null); if (pathAudio == null) throw new Exception("Unable to locate file \"" + line.Params[1] + "\"."); } else { + pathAudio = _inputPath; if (_sourcePaths.Count > 0 ) throw new Exception("Extra file in embedded CUE sheet: \"" + line.Params[1] + "\"."); } @@ -1267,7 +1701,7 @@ namespace CUETools.Processor string value = GetCommonTag(delegate(TagLib.File file) { return file.Tag.JoinedAlbumArtists; }); if (value == null) value = GetCommonTag(delegate(TagLib.File file) { return file.Tag.JoinedPerformers; }); - if (value != null) + if (value != null && value != "") General.SetCUELine(_attributes, "PERFORMER", value, true); } if (_config.overwriteCUEData || General.FindCUELine(_attributes, "TITLE") == null) @@ -1297,7 +1731,7 @@ namespace CUETools.Processor string title = _hasTrackFilenames ? track._fileInfo.Tag.Title : _hasEmbeddedCUESheet ? Tagging.TagListToSingleValue(Tagging.GetMiscTag(_fileInfo, String.Format("cue_track{0:00}_TITLE", i + 1))) : null; - if ((_config.overwriteCUEData || track.Artist == "") && artist != null) + if ((_config.overwriteCUEData || track.Artist == "") && artist != null && artist != "") track.Artist = artist; if ((_config.overwriteCUEData || track.Title == "") && title != null) track.Title = title; @@ -1314,9 +1748,16 @@ namespace CUETools.Processor CDImageLayout tocFromLog = _eacLog == null ? null : TocFromLog(_eacLog); - // use pregap from log - if (tocFromLog != null && tocFromLog.Pregap > _toc.Pregap) - PreGapLength = tocFromLog.Pregap; + // use pregaps from log + if (tocFromLog != null) + { + if (PreGapLength < tocFromLog.Pregap) + PreGapLength = tocFromLog.Pregap; + int trNo; + for (trNo = 2; trNo <= tocFromLog.TrackCount; trNo++) + if (_toc[trNo].Pregap < tocFromLog[trNo].Pregap) + _toc[trNo].Pregap = tocFromLog[trNo].Pregap; + } // use data track length from log if (tocFromLog != null && tocFromLog.AudioTracks == _toc.AudioTracks && tocFromLog.TrackCount == tocFromLog.AudioTracks + 1) @@ -1386,8 +1827,6 @@ namespace CUETools.Processor { if (_action == CUEAction.Verify || _action == CUEAction.VerifyAndConvert - || _action == CUEAction.VerifyPlusCRCs - || _action == CUEAction.VerifyThenConvert ) { ShowProgress((string)"Contacting AccurateRip database...", 0, 0, null, null); @@ -1652,13 +2091,14 @@ namespace CUETools.Processor return null; } - public void GenerateFilenames(OutputAudioFormat format, bool outputLossyWAV, string outputPath) + public void GenerateFilenames(AudioEncoderType audioEncoderType, string format, string outputPath) { - _outputLossyWAV = outputLossyWAV; + _audioEncoderType = audioEncoderType; + _outputLossyWAV = format.StartsWith("lossy."); _outputFormat = format; - _cuePath = outputPath; + _outputPath = outputPath; - string extension = General.FormatExtension(format, _config); + string extension = "." + format; List find, replace; string filename; int iTrack; @@ -1681,9 +2121,7 @@ namespace CUETools.Processor replace.Add(null); replace.Add(Path.GetFileNameWithoutExtension(outputPath)); replace.Add(General.EmptyStringToNull(_config.CleanseString(Year))); - - if (_outputLossyWAV) - extension = ".lossy" + extension; + if (_config.detectHDCD && _config.decodeHDCD && (!_outputLossyWAV || !_config.decodeHDCDtoLW16)) { if (_config.decodeHDCDto24bit ) @@ -2003,12 +2441,10 @@ namespace CUETools.Processor for (int iTrack = 0; iTrack < _toc.AudioTracks; iTrack++) { int cdErrors = 0; - bool crcMismatch = _action == CUEAction.VerifyThenConvert && - _arVerify.BackupCRC(iTrack) != _arVerify.CRC(iTrack); for (uint iSector = _toc[iTrack + 1].Start; iSector <= _toc[iTrack + 1].End; iSector++) if (_ripper.Errors[(int)iSector]) cdErrors++; - if (crcMismatch || cdErrors != 0) + if (cdErrors != 0) { if (!wereErrors) { @@ -2017,10 +2453,7 @@ namespace CUETools.Processor logWriter.WriteLine(); } wereErrors = true; - if (crcMismatch) - logWriter.WriteLine("Track {0} contains {1} errors, CRC mismatch: test {2:X8} vs copy {3:X8}", iTrack + 1, cdErrors, _arVerify.BackupCRC(iTrack), _arVerify.CRC(iTrack)); - else - logWriter.WriteLine("Track {0} contains {1} errors", iTrack + 1, cdErrors); + logWriter.WriteLine("Track {0} contains {1} errors", iTrack + 1, cdErrors); } } if (_action != CUEAction.Convert) @@ -2028,7 +2461,7 @@ namespace CUETools.Processor logWriter.WriteLine(); logWriter.WriteLine("AccurateRip summary"); logWriter.WriteLine(); - _arVerify.GenerateFullLog(logWriter, 0); + _arVerify.GenerateFullLog(logWriter, true); logWriter.WriteLine(); } logWriter.WriteLine(); @@ -2058,11 +2491,24 @@ namespace CUETools.Processor return sw.ToString(); } - public string CUESheetContents(CUEStyle style) + public string CUESheetContents() + { + CUEStyle style = _hasEmbeddedCUESheet ? CUEStyle.SingleFile + : _hasSingleFilename ? CUEStyle.SingleFileWithCUE + : CUEStyle.GapsAppended; + bool htoaToFile = _hasHTOAFilename; + return CUESheetContents(style, htoaToFile); + } + + public string CUESheetContents(CUEStyle style) + { + return CUESheetContents(style, (style == CUEStyle.GapsAppended && _config.preserveHTOA && _toc.Pregap != 0)); + } + + public string CUESheetContents(CUEStyle style, bool htoaToFile) { StringWriter sw = new StringWriter(); int i, iTrack, iIndex; - bool htoaToFile = (style == CUEStyle.GapsAppended && _config.preserveHTOA && _toc.Pregap != 0); uint timeRelativeToFileStart = 0; @@ -2160,7 +2606,7 @@ namespace CUETools.Processor if (0 != _writeOffset) sw.WriteLine("Offset applied: {0}", _writeOffset); - _arVerify.GenerateFullLog(sw, 0); + _arVerify.GenerateFullLog(sw, _config.arLogVerbose); } public string GenerateAccurateRipStatus() @@ -2169,8 +2615,7 @@ namespace CUETools.Processor if (hdcdDecoder != null && hdcdDecoder.Detected) prefix += "hdcd detected, "; if (_action == CUEAction.Verify || - _action == CUEAction.VerifyPlusCRCs || - (_action != CUEAction.Convert && _outputFormat != OutputAudioFormat.NoAudio)) + (_action == CUEAction.VerifyAndConvert && _audioEncoderType != AudioEncoderType.NoAudio)) { if (_arVerify.ARStatus != null) prefix += _arVerify.ARStatus; @@ -2191,28 +2636,28 @@ namespace CUETools.Processor return prefix; } - public void GenerateAccurateRipTagsForTrack(NameValueCollection tags, int offset, int bestOffset, int iTrack, string prefix) + public void GenerateAccurateRipTagsForTrack(NameValueCollection tags, int bestOffset, int iTrack, string prefix) { - tags.Add(String.Format("{0}ACCURATERIPCRC", prefix), String.Format("{0:x8}", _arVerify.CRC(iTrack, offset))); + tags.Add(String.Format("{0}ACCURATERIPCRC", prefix), String.Format("{0:x8}", _arVerify.CRC(iTrack, 0))); tags.Add(String.Format("{0}AccurateRipDiscId", prefix), String.Format("{0:000}-{1}-{2:00}", TrackCount, _accurateRipId ?? AccurateRipVerify.CalculateAccurateRipId(_toc), iTrack + 1)); - tags.Add(String.Format("{0}ACCURATERIPCOUNT", prefix), String.Format("{0}", _arVerify.Confidence(iTrack, offset))); + tags.Add(String.Format("{0}ACCURATERIPCOUNT", prefix), String.Format("{0}", _arVerify.Confidence(iTrack, 0))); tags.Add(String.Format("{0}ACCURATERIPCOUNTALLOFFSETS", prefix), String.Format("{0}", _arVerify.SumConfidence(iTrack))); tags.Add(String.Format("{0}ACCURATERIPTOTAL", prefix), String.Format("{0}", _arVerify.Total(iTrack))); - if (bestOffset != offset) + if (bestOffset != 0) tags.Add(String.Format("{0}ACCURATERIPCOUNTWITHOFFSET", prefix), String.Format("{0}", _arVerify.Confidence(iTrack, bestOffset))); } - public void GenerateAccurateRipTags(NameValueCollection tags, int offset, int bestOffset, int iTrack) + public void GenerateAccurateRipTags(NameValueCollection tags, int bestOffset, int iTrack) { tags.Add("ACCURATERIPID", _accurateRipId ?? AccurateRipVerify.CalculateAccurateRipId(_toc)); - if (bestOffset != offset) - tags.Add("ACCURATERIPOFFSET", String.Format("{1}{0}", bestOffset - offset, bestOffset > offset ? "+" : "")); + if (bestOffset != 0) + tags.Add("ACCURATERIPOFFSET", String.Format("{1}{0}", bestOffset, bestOffset > 0 ? "+" : "")); if (iTrack != -1) - GenerateAccurateRipTagsForTrack(tags, offset, bestOffset, iTrack, ""); + GenerateAccurateRipTagsForTrack(tags, bestOffset, iTrack, ""); else for (iTrack = 0; iTrack < TrackCount; iTrack++) { - GenerateAccurateRipTagsForTrack(tags, offset, bestOffset, iTrack, + GenerateAccurateRipTagsForTrack(tags, bestOffset, iTrack, String.Format("cue_track{0:00}_", iTrack + 1)); } } @@ -2225,7 +2670,7 @@ namespace CUETools.Processor tags.Remove (keys[i]); } - private void FindBestOffset(uint minConfidence, bool optimizeConfidence, out uint outTracksMatch, out int outBestOffset) + public void FindBestOffset(uint minConfidence, bool optimizeConfidence, out uint outTracksMatch, out int outBestOffset) { uint bestTracksMatch = 0; uint bestConfidence = 0; @@ -2265,213 +2710,159 @@ namespace CUETools.Processor outTracksMatch = bestTracksMatch; } - public string WriteAudioFiles(string dir, CUEStyle style) { + public string Go() + { string[] destPaths; int[] destLengths; - bool htoaToFile = ((style == CUEStyle.GapsAppended) && _config.preserveHTOA && + bool htoaToFile = ((OutputStyle == CUEStyle.GapsAppended) && _config.preserveHTOA && (_toc.Pregap != 0)); + string dir = OutputDir; - if (_isCD && (style == CUEStyle.GapsLeftOut || style == CUEStyle.GapsPrepended) && (_action == CUEAction.Convert || _action == CUEAction.VerifyAndConvert)) + if (_isCD && (OutputStyle == CUEStyle.GapsLeftOut || OutputStyle == CUEStyle.GapsPrepended) && (_action == CUEAction.Convert || _action == CUEAction.VerifyAndConvert)) throw new Exception("When ripping a CD, gaps Left Out/Gaps prepended modes can only be used in verify-then-convert mode"); if (_usePregapForFirstTrackInSingleFile) throw new Exception("UsePregapForFirstTrackInSingleFile is not supported for writing audio files."); - if (style == CUEStyle.SingleFile || style == CUEStyle.SingleFileWithCUE) { + if (OutputStyle == CUEStyle.SingleFile || OutputStyle == CUEStyle.SingleFileWithCUE) + { destPaths = new string[1]; destPaths[0] = Path.Combine(dir, _singleFilename); } - else { + else + { destPaths = new string[TrackCount + (htoaToFile ? 1 : 0)]; - if (htoaToFile) { + if (htoaToFile) + { destPaths[0] = Path.Combine(dir, _htoaFilename); } - for (int i = 0; i < TrackCount; i++) { + for (int i = 0; i < TrackCount; i++) + { destPaths[i + (htoaToFile ? 1 : 0)] = Path.Combine(dir, _trackFilenames[i]); } } - if (_action != CUEAction.Verify && _action != CUEAction.VerifyPlusCRCs) + if (_action != CUEAction.Verify) for (int i = 0; i < destPaths.Length; i++) for (int j = 0; j < _sourcePaths.Count; j++) if (destPaths[i].ToLower() == _sourcePaths[j].ToLower()) throw new Exception("Source and destination audio file paths cannot be the same."); - destLengths = CalculateAudioFileLengths(style); - - bool SkipOutput = false; + destLengths = CalculateAudioFileLengths(OutputStyle); // Lookup(); - - if (_action == CUEAction.Verify) + + if (_action != CUEAction.Verify) { - if (_arVerify.AccResult != HttpStatusCode.OK) - { - if (_config.writeArLogOnVerify) - { - if (!Directory.Exists(dir)) - Directory.CreateDirectory(dir); - StreamWriter sw = new StreamWriter(Path.ChangeExtension(_cuePath, ".accurip"), - false, CUESheet.Encoding); - GenerateAccurateRipLog(sw); - sw.Close(); - } - return _arVerify.ARStatus; - } + if (!Directory.Exists(dir)) + Directory.CreateDirectory(dir); } - - if (_action == CUEAction.VerifyThenConvert) + if (_isCD) + destLengths = CalculateAudioFileLengths(OutputStyle); // need to recalc, might have changed after scanning the CD + if (_audioEncoderType != AudioEncoderType.NoAudio || _action == CUEAction.Verify) + WriteAudioFilesPass(dir, OutputStyle, destPaths, destLengths, htoaToFile, _action == CUEAction.Verify); + CreateRipperLOG(destPaths, OutputStyle); + if (_action == CUEAction.Convert || _action == CUEAction.VerifyAndConvert) { - if (_arVerify.AccResult != HttpStatusCode.OK && !_isCD) + string cueContents = CUESheetContents(OutputStyle); + uint tracksMatch = 0; + int bestOffset = 0; + + if (_action != CUEAction.Convert && + _config.writeArTagsOnConvert && + _arVerify.AccResult == HttpStatusCode.OK) + FindBestOffset(1, true, out tracksMatch, out bestOffset); + + if (_config.createEACLOG) { - if (_config.noUnverifiedOutput) - { - if (_config.writeArLogOnConvert) - { - if (!Directory.Exists(dir)) - Directory.CreateDirectory(dir); - StreamWriter sw = new StreamWriter(Path.ChangeExtension(_cuePath, ".accurip"), - false, CUESheet.Encoding); - GenerateAccurateRipLog(sw); - sw.Close(); - } - if (_config.createTOC) - { - if (!Directory.Exists(dir)) - Directory.CreateDirectory(dir); - WriteText(Path.ChangeExtension(_cuePath, ".toc"), TOCContents()); - } - return _arVerify.ARStatus; - } - } - else - { - _writeOffset = 0; - WriteAudioFilesPass(dir, style, destPaths, destLengths, htoaToFile, true); - if (!_isCD) - { - uint tracksMatch; - int bestOffset; - - if (_config.noUnverifiedOutput) - { - FindBestOffset(_config.encodeWhenConfidence, false, out tracksMatch, out bestOffset); - if (tracksMatch * 100 < _config.encodeWhenPercent * TrackCount || (_config.encodeWhenZeroOffset && bestOffset != 0)) - SkipOutput = true; - } - - if (!SkipOutput && _config.fixOffset) - { - FindBestOffset(_config.fixWhenConfidence, false, out tracksMatch, out bestOffset); - if (tracksMatch * 100 >= _config.fixWhenPercent * TrackCount) - _writeOffset = bestOffset; - } - } - _arVerify.CreateBackup(_writeOffset); - } - } - - if (!SkipOutput) - { - if (_action != CUEAction.Verify && _action != CUEAction.VerifyPlusCRCs) - { - if (!Directory.Exists(dir)) - Directory.CreateDirectory(dir); - } - if (_isCD) - destLengths = CalculateAudioFileLengths(style); // need to recalc, might have changed after scanning the CD - if (_outputFormat != OutputAudioFormat.NoAudio || _action == CUEAction.Verify || _action == CUEAction.VerifyPlusCRCs) - WriteAudioFilesPass(dir, style, destPaths, destLengths, htoaToFile, _action == CUEAction.Verify || _action == CUEAction.VerifyPlusCRCs); - CreateRipperLOG(destPaths, style); - if (_action == CUEAction.Convert || _action == CUEAction.VerifyAndConvert || _action == CUEAction.VerifyThenConvert) - { - string cueContents = CUESheetContents(style); - uint tracksMatch = 0; - int bestOffset = 0; - - if (_action != CUEAction.Convert && - _config.writeArTagsOnConvert && - _arVerify.AccResult == HttpStatusCode.OK) - FindBestOffset(1, true, out tracksMatch, out bestOffset); - - if (_config.createEACLOG) - { - if (_ripperLog != null) - _ripperLog = CUESheet.Encoding.GetString(CUESheet.Encoding.GetBytes(_ripperLog)); - cueContents = CUESheet.Encoding.GetString(CUESheet.Encoding.GetBytes(cueContents)); - } - if (_ripperLog != null) - WriteText(Path.ChangeExtension(_cuePath, ".log"), _ripperLog); - else - if (_eacLog != null && _config.extractLog) - WriteText(Path.ChangeExtension(_cuePath, ".log"), _eacLog); + _ripperLog = CUESheet.Encoding.GetString(CUESheet.Encoding.GetBytes(_ripperLog)); + cueContents = CUESheet.Encoding.GetString(CUESheet.Encoding.GetBytes(cueContents)); + } - if (style == CUEStyle.SingleFileWithCUE || style == CUEStyle.SingleFile) + if (_ripperLog != null) + WriteText(Path.ChangeExtension(_outputPath, ".log"), _ripperLog); + else + if (_eacLog != null && _config.extractLog) + WriteText(Path.ChangeExtension(_outputPath, ".log"), _eacLog); + + if (OutputStyle == CUEStyle.SingleFileWithCUE || OutputStyle == CUEStyle.SingleFile) + { + if (OutputStyle == CUEStyle.SingleFileWithCUE && _config.createCUEFileWhenEmbedded) + WriteText(Path.ChangeExtension(_outputPath, ".cue"), cueContents); + if (OutputStyle == CUEStyle.SingleFile) + WriteText(_outputPath, cueContents); + if (_audioEncoderType != AudioEncoderType.NoAudio) { - if (style == CUEStyle.SingleFileWithCUE && _config.createCUEFileWhenEmbedded) - WriteText(Path.ChangeExtension(_cuePath, ".cue"), cueContents); - if (style == CUEStyle.SingleFile) - WriteText(_cuePath, cueContents); - if (_outputFormat != OutputAudioFormat.NoAudio) + NameValueCollection tags = GenerateAlbumTags(bestOffset, OutputStyle == CUEStyle.SingleFileWithCUE, _ripperLog ?? _eacLog); + TagLib.UserDefined.AdditionalFileTypes.Config = _config; + TagLib.File fileInfo = TagLib.File.Create(new TagLib.File.LocalFileAbstraction(destPaths[0])); + if (Tagging.UpdateTags(fileInfo, tags, _config)) { - NameValueCollection tags = GenerateAlbumTags(bestOffset, style == CUEStyle.SingleFileWithCUE, _ripperLog ?? _eacLog); - TagLib.UserDefined.AdditionalFileTypes.Config = _config; - TagLib.File fileInfo = TagLib.File.Create(new TagLib.File.LocalFileAbstraction(destPaths[0])); - if (Tagging.UpdateTags(fileInfo, tags, _config)) + TagLib.File sourceFileInfo = _tracks[0]._fileInfo ?? _fileInfo; + + // first, use cue sheet information + if (_config.writeBasicTagsFromCUEData) { uint year; - if (_tracks[0]._fileInfo != null || _fileInfo != null) - { - fileInfo.Tag.DiscCount = (_tracks[0]._fileInfo ?? _fileInfo).Tag.DiscCount; // TODO: GetCommonTag? - fileInfo.Tag.Disc = (_tracks[0]._fileInfo ?? _fileInfo).Tag.Disc; - //fileInfo.Tag.Performers = (_tracks[iTrack]._fileInfo ?? _fileInfo).Tag.Performers; - fileInfo.Tag.AlbumArtists = (_tracks[0]._fileInfo ?? _fileInfo).Tag.AlbumArtists; - fileInfo.Tag.Album = (_tracks[0]._fileInfo ?? _fileInfo).Tag.Album; - fileInfo.Tag.Year = (_tracks[0]._fileInfo ?? _fileInfo).Tag.Year; - fileInfo.Tag.Genres = (_tracks[0]._fileInfo ?? _fileInfo).Tag.Genres; - fileInfo.Tag.Pictures = (_tracks[0]._fileInfo ?? _fileInfo).Tag.Pictures; - } if (fileInfo.Tag.Album == null && Title != "") fileInfo.Tag.Album = Title; - //fileInfo.Tag.Title = null; //if (fileInfo.Tag.Performers.Length == 0) fileInfo.Tag.Performers = new string[] { _tracks[iTrack].Artist != "" ? _tracks[iTrack].Artist : Artist }; if (fileInfo.Tag.AlbumArtists.Length == 0 && Artist != "") fileInfo.Tag.AlbumArtists = new string[] { Artist }; if (fileInfo.Tag.Genres.Length == 0 && Genre != "") fileInfo.Tag.Genres = new string[] { Genre }; if (fileInfo.Tag.Year == 0 && Year != "" && uint.TryParse(Year, out year)) fileInfo.Tag.Year = year; - fileInfo.Save(); } + + // fill up missing information from tags + if (_config.copyBasicTags && sourceFileInfo != null) + { + fileInfo.Tag.DiscCount = sourceFileInfo.Tag.DiscCount; // TODO: GetCommonTag? + fileInfo.Tag.Disc = sourceFileInfo.Tag.Disc; + //fileInfo.Tag.Performers = sourceFileInfo.Tag.Performers; + if (fileInfo.Tag.Album == null) + fileInfo.Tag.Album = sourceFileInfo.Tag.Album; + if (fileInfo.Tag.AlbumArtists.Length == 0) + fileInfo.Tag.AlbumArtists = sourceFileInfo.Tag.AlbumArtists; + if (fileInfo.Tag.Genres.Length == 0) + fileInfo.Tag.Genres = sourceFileInfo.Tag.Genres; + if (fileInfo.Tag.Year == 0) + fileInfo.Tag.Year = sourceFileInfo.Tag.Year; + } + + // copy album art + if (_config.copyAlbumArt && sourceFileInfo != null) + fileInfo.Tag.Pictures = sourceFileInfo.Tag.Pictures; + + if (_config.embedAlbumArt && fileInfo.Tag.Pictures.Length == 0 && _inputDir != null) + EmbedCover(fileInfo); + + fileInfo.Save(); } } - else - { - WriteText(_cuePath, cueContents); - if (_config.createM3U) - WriteText(Path.ChangeExtension(_cuePath, ".m3u"), M3UContents(style)); - if (_outputFormat != OutputAudioFormat.NoAudio) - for (int iTrack = 0; iTrack < TrackCount; iTrack++) + } + else + { + WriteText(_outputPath, cueContents); + if (_config.createM3U) + WriteText(Path.ChangeExtension(_outputPath, ".m3u"), M3UContents(OutputStyle)); + if (_audioEncoderType != AudioEncoderType.NoAudio) + for (int iTrack = 0; iTrack < TrackCount; iTrack++) + { + string path = destPaths[iTrack + (htoaToFile ? 1 : 0)]; + NameValueCollection tags = GenerateTrackTags(iTrack, bestOffset); + TagLib.UserDefined.AdditionalFileTypes.Config = _config; + TagLib.File fileInfo = TagLib.File.Create(new TagLib.File.LocalFileAbstraction(path)); + if (Tagging.UpdateTags(fileInfo, tags, _config)) { - string path = destPaths[iTrack + (htoaToFile ? 1 : 0)]; - NameValueCollection tags = GenerateTrackTags(iTrack, bestOffset); - TagLib.UserDefined.AdditionalFileTypes.Config = _config; - TagLib.File fileInfo = TagLib.File.Create(new TagLib.File.LocalFileAbstraction(path)); - if (Tagging.UpdateTags(fileInfo, tags, _config)) + TagLib.File sourceFileInfo = _tracks[iTrack]._fileInfo ?? _fileInfo; + + if (_config.writeBasicTagsFromCUEData) { uint year; - if (_tracks[iTrack]._fileInfo != null || _fileInfo != null) - { - fileInfo.Tag.DiscCount = (_tracks[iTrack]._fileInfo ?? _fileInfo).Tag.DiscCount; - fileInfo.Tag.Disc = (_tracks[iTrack]._fileInfo ?? _fileInfo).Tag.Disc; - fileInfo.Tag.Performers = (_tracks[iTrack]._fileInfo ?? _fileInfo).Tag.Performers; - fileInfo.Tag.AlbumArtists = (_tracks[iTrack]._fileInfo ?? _fileInfo).Tag.AlbumArtists; - fileInfo.Tag.Album = (_tracks[iTrack]._fileInfo ?? _fileInfo).Tag.Album; - fileInfo.Tag.Year = (_tracks[iTrack]._fileInfo ?? _fileInfo).Tag.Year; - fileInfo.Tag.Genres = (_tracks[iTrack]._fileInfo ?? _fileInfo).Tag.Genres; - fileInfo.Tag.Pictures = (_tracks[iTrack]._fileInfo ?? _fileInfo).Tag.Pictures; - } fileInfo.Tag.TrackCount = (uint)TrackCount; fileInfo.Tag.Track = (uint)iTrack + 1; - fileInfo.Tag.Title = _tracks[iTrack]._fileInfo != null ? _tracks[iTrack]._fileInfo.Tag.Title : _tracks[iTrack].Title; + //fileInfo.Tag.Title = _tracks[iTrack]._fileInfo != null ? _tracks[iTrack]._fileInfo.Tag.Title : _tracks[iTrack].Title; + fileInfo.Tag.Title = _tracks[iTrack].Title != "" ? _tracks[iTrack].Title : _tracks[iTrack]._fileInfo.Tag.Title; if (fileInfo.Tag.Album == null && Title != "") fileInfo.Tag.Album = Title; if (fileInfo.Tag.Performers.Length == 0 && _tracks[iTrack].Artist != "") fileInfo.Tag.Performers = new string[] { _tracks[iTrack].Artist }; if (fileInfo.Tag.Performers.Length == 0 && Artist != "") fileInfo.Tag.Performers = new string[] { Artist }; @@ -2479,19 +2870,102 @@ namespace CUETools.Processor if (fileInfo.Tag.Genres.Length == 0 && Genre != "") fileInfo.Tag.Genres = new string[] { Genre }; if (fileInfo.Tag.Year == 0 && Year != "" && uint.TryParse(Year, out year)) fileInfo.Tag.Year = year; - fileInfo.Save(); } + + if (_config.copyBasicTags && sourceFileInfo != null) + { + fileInfo.Tag.DiscCount = sourceFileInfo.Tag.DiscCount; + fileInfo.Tag.Disc = sourceFileInfo.Tag.Disc; + if (fileInfo.Tag.Performers.Length == 0) + fileInfo.Tag.Performers = sourceFileInfo.Tag.Performers; + if (fileInfo.Tag.AlbumArtists.Length == 0) + fileInfo.Tag.AlbumArtists = sourceFileInfo.Tag.AlbumArtists; + if (fileInfo.Tag.Album == null) + fileInfo.Tag.Album = sourceFileInfo.Tag.Album; + if (fileInfo.Tag.Year == 0) + fileInfo.Tag.Year = sourceFileInfo.Tag.Year; + if (fileInfo.Tag.Genres.Length == 0) + fileInfo.Tag.Genres = sourceFileInfo.Tag.Genres; + } + + if (_config.copyAlbumArt && sourceFileInfo != null) + fileInfo.Tag.Pictures = sourceFileInfo.Tag.Pictures; + + if (_config.embedAlbumArt && fileInfo.Tag.Pictures.Length == 0 && _inputDir != null) + EmbedCover(fileInfo); + + fileInfo.Save(); } - } + } } } + return WriteReport(); + } + + private static Bitmap resizeImage(Image imgToResize, Size size) + { + int sourceWidth = imgToResize.Width; + int sourceHeight = imgToResize.Height; + + float nPercent = 0; + float nPercentW = 0; + float nPercentH = 0; + + nPercentW = ((float)size.Width / (float)sourceWidth); + nPercentH = ((float)size.Height / (float)sourceHeight); + + if (nPercentH < nPercentW) + nPercent = nPercentH; + else + nPercent = nPercentW; + + int destWidth = (int)(sourceWidth * nPercent); + int destHeight = (int)(sourceHeight * nPercent); + + Bitmap b = new Bitmap(destWidth, destHeight); + Graphics g = Graphics.FromImage((Image)b); + g.InterpolationMode = InterpolationMode.HighQualityBicubic; + + g.DrawImage(imgToResize, 0, 0, destWidth, destHeight); + g.Dispose(); + + return b; + } + + public void EmbedCover(TagLib.File fileInfo) + { + string imgPath = Path.Combine(_inputDir, "Folder.jpg"); + if (File.Exists(imgPath)) + { + using (Image img = Image.FromFile(imgPath)) + { + if (img.Width > _config.maxAlbumArtSize || img.Height > _config.maxAlbumArtSize) + { + using (Bitmap small = resizeImage(img, new Size(_config.maxAlbumArtSize, _config.maxAlbumArtSize))) + { + using (MemoryStream encoded = new MemoryStream()) + { + //System.Drawing.Imaging.EncoderParameters encoderParams = new EncoderParameters(1); + //encoderParams.Param[0] = new System.Drawing.Imaging.EncoderParameter(Encoder.Quality, quality); + small.Save(encoded, System.Drawing.Imaging.ImageFormat.Jpeg); + fileInfo.Tag.Pictures = new TagLib.Picture[] { new TagLib.Picture(new TagLib.ByteVector(encoded.ToArray())) }; + } + } + } + else + fileInfo.Tag.Pictures = new TagLib.Picture[] { new TagLib.Picture(imgPath) }; + } + } + } + + public string WriteReport() + { if (_action == CUEAction.Verify || - _action == CUEAction.VerifyPlusCRCs || - (_action != CUEAction.Convert && _outputFormat != OutputAudioFormat.NoAudio)) + (_action != CUEAction.Convert && _audioEncoderType != AudioEncoderType.NoAudio)) { ShowProgress((string)"Generating AccurateRip report...", 0, 0, null, null); - if ((_action == CUEAction.Verify || _action == CUEAction.VerifyPlusCRCs) && _config.writeArTagsOnVerify && _writeOffset == 0 && !_isArchive && !_isCD) + if (_action == CUEAction.Verify && _config.writeArTagsOnVerify && _writeOffset == 0 && !_isArchive && !_isCD) { uint tracksMatch; int bestOffset; @@ -2503,7 +2977,7 @@ namespace CUETools.Processor { NameValueCollection tags = Tagging.Analyze(_fileInfo); CleanupTags(tags, "ACCURATERIP"); - GenerateAccurateRipTags(tags, 0, bestOffset, -1); + GenerateAccurateRipTags(tags, bestOffset, -1); if (Tagging.UpdateTags(_fileInfo, tags, _config)) _fileInfo.Save(); } @@ -2514,28 +2988,28 @@ namespace CUETools.Processor { NameValueCollection tags = Tagging.Analyze(_tracks[iTrack]._fileInfo); CleanupTags(tags, "ACCURATERIP"); - GenerateAccurateRipTags(tags, 0, bestOffset, iTrack); + GenerateAccurateRipTags(tags, bestOffset, iTrack); if (Tagging.UpdateTags(_tracks[iTrack]._fileInfo, tags, _config)) _tracks[iTrack]._fileInfo.Save(); } } } - if ((_action != CUEAction.Verify && _action != CUEAction.VerifyPlusCRCs && _config.writeArLogOnConvert) || - ((_action == CUEAction.Verify || _action == CUEAction.VerifyPlusCRCs) && _config.writeArLogOnVerify)) + if ((_action != CUEAction.Verify && _config.writeArLogOnConvert) || + (_action == CUEAction.Verify && _config.writeArLogOnVerify)) { - if (!Directory.Exists(dir)) - Directory.CreateDirectory(dir); - StreamWriter sw = new StreamWriter(Path.ChangeExtension(_cuePath, ".accurip"), + if (!Directory.Exists(OutputDir)) + Directory.CreateDirectory(OutputDir); + StreamWriter sw = new StreamWriter(Path.ChangeExtension(_outputPath, _config.arLogExtension), false, CUESheet.Encoding); GenerateAccurateRipLog(sw); sw.Close(); } if (_config.createTOC) { - if (!Directory.Exists(dir)) - Directory.CreateDirectory(dir); - WriteText(Path.ChangeExtension(_cuePath, ".toc"), TOCContents()); + if (!Directory.Exists(OutputDir)) + Directory.CreateDirectory(OutputDir); + WriteText(Path.ChangeExtension(_outputPath, ".toc"), TOCContents()); } } return GenerateAccurateRipStatus(); @@ -2544,61 +3018,60 @@ namespace CUETools.Processor private NameValueCollection GenerateTrackTags(int iTrack, int bestOffset) { NameValueCollection destTags = new NameValueCollection(); - - if (_hasEmbeddedCUESheet) + + if (_config.copyUnknownTags) { - string trackPrefix = String.Format("cue_track{0:00}_", iTrack + 1); - NameValueCollection albumTags = Tagging.Analyze(_fileInfo); - foreach (string key in albumTags.AllKeys) + if (_hasEmbeddedCUESheet) { - if (key.ToLower().StartsWith(trackPrefix) - || !key.ToLower().StartsWith("cue_track")) + string trackPrefix = String.Format("cue_track{0:00}_", iTrack + 1); + NameValueCollection albumTags = Tagging.Analyze(_fileInfo); + foreach (string key in albumTags.AllKeys) { - string name = key.ToLower().StartsWith(trackPrefix) ? - key.Substring(trackPrefix.Length) : key; - string[] values = albumTags.GetValues(key); - for (int j = 0; j < values.Length; j++) - destTags.Add(name, values[j]); + if (key.ToLower().StartsWith(trackPrefix) + || !key.ToLower().StartsWith("cue_track")) + { + string name = key.ToLower().StartsWith(trackPrefix) ? + key.Substring(trackPrefix.Length) : key; + string[] values = albumTags.GetValues(key); + for (int j = 0; j < values.Length; j++) + destTags.Add(name, values[j]); + } } } - } - else if (_hasTrackFilenames) - destTags.Add(Tagging.Analyze(_tracks[iTrack]._fileInfo)); - else if (_hasSingleFilename) - { - // TODO? + else if (_hasTrackFilenames) + destTags.Add(Tagging.Analyze(_tracks[iTrack]._fileInfo)); + else if (_hasSingleFilename) + { + // TODO? + } + + // these will be set explicitely + destTags.Remove("ARTIST"); + destTags.Remove("TITLE"); + destTags.Remove("ALBUM"); + destTags.Remove("ALBUMARTIST"); + destTags.Remove("DATE"); + destTags.Remove("GENRE"); + destTags.Remove("TRACKNUMBER"); + destTags.Remove("TRACKTOTAL"); + destTags.Remove("TOTALTRACKS"); + destTags.Remove("DISCNUMBER"); + destTags.Remove("DISCTOTAL"); + destTags.Remove("TOTALDISCS"); + + destTags.Remove("LOG"); + destTags.Remove("LOGFILE"); + destTags.Remove("EACLOG"); + + // these are not valid + destTags.Remove("CUESHEET"); + CleanupTags(destTags, "ACCURATERIP"); + //CleanupTags(destTags, "REPLAYGAIN"); } - // these will be set explicitely - destTags.Remove("ARTIST"); - destTags.Remove("TITLE"); - destTags.Remove("ALBUM"); - destTags.Remove("ALBUMARTIST"); - destTags.Remove("DATE"); - destTags.Remove("GENRE"); - destTags.Remove("TRACKNUMBER"); - destTags.Remove("TRACKTOTAL"); - destTags.Remove("TOTALTRACKS"); - destTags.Remove("DISCNUMBER"); - destTags.Remove("DISCTOTAL"); - destTags.Remove("TOTALDISCS"); + if (_config.writeArTagsOnConvert && _action == CUEAction.VerifyAndConvert && _arVerify.AccResult == HttpStatusCode.OK) + GenerateAccurateRipTags(destTags, bestOffset, iTrack); - destTags.Remove("LOG"); - destTags.Remove("LOGFILE"); - destTags.Remove("EACLOG"); - - // these are not valid - destTags.Remove("CUESHEET"); - CleanupTags(destTags, "ACCURATERIP"); - //CleanupTags(destTags, "REPLAYGAIN"); - - if (_config.writeArTagsOnConvert) - { - if (_action != CUEAction.Convert && _arVerify.AccResult == HttpStatusCode.OK) - GenerateAccurateRipTags(destTags, _writeOffset, bestOffset, iTrack); - else - destTags.Add("ACCURATERIPID", _accurateRipId ?? AccurateRipVerify.CalculateAccurateRipId(_toc)); - } return destTags; } @@ -2606,73 +3079,70 @@ namespace CUETools.Processor { NameValueCollection destTags = new NameValueCollection(); - if (_hasEmbeddedCUESheet || _hasSingleFilename) + if (_config.copyUnknownTags) { - destTags.Add(Tagging.Analyze(_fileInfo)); - if (!fWithCUE) - CleanupTags(destTags, "CUE_TRACK"); - } - else if (_hasTrackFilenames) - { - for (int iTrack = 0; iTrack < TrackCount; iTrack++) + if (_hasEmbeddedCUESheet || _hasSingleFilename) { - NameValueCollection trackTags = Tagging.Analyze(_tracks[iTrack]._fileInfo); - foreach (string key in trackTags.AllKeys) + destTags.Add(Tagging.Analyze(_fileInfo)); + if (!fWithCUE) + CleanupTags(destTags, "CUE_TRACK"); + } + else if (_hasTrackFilenames) + { + for (int iTrack = 0; iTrack < TrackCount; iTrack++) { - string singleValue = GetCommonMiscTag(key); - if (singleValue != null) + NameValueCollection trackTags = Tagging.Analyze(_tracks[iTrack]._fileInfo); + foreach (string key in trackTags.AllKeys) { - if (destTags.Get(key) == null) - destTags.Add(key, singleValue); - } - else if (fWithCUE && key.ToUpper() != "TRACKNUMBER") - { - string[] values = trackTags.GetValues(key); - for (int j = 0; j < values.Length; j++) - destTags.Add(String.Format("cue_track{0:00}_{1}", iTrack + 1, key), values[j]); + string singleValue = GetCommonMiscTag(key); + if (singleValue != null) + { + if (destTags.Get(key) == null) + destTags.Add(key, singleValue); + } + else if (fWithCUE && key.ToUpper() != "TRACKNUMBER" && key.ToUpper() != "TITLE" && key.ToUpper() != "ARTIST") + { + string[] values = trackTags.GetValues(key); + for (int j = 0; j < values.Length; j++) + destTags.Add(String.Format("cue_track{0:00}_{1}", iTrack + 1, key), values[j]); + } } } } - } - // these will be set explicitely - destTags.Remove("ARTIST"); - destTags.Remove("TITLE"); - destTags.Remove("ALBUM"); - destTags.Remove("ALBUMARTIST"); - destTags.Remove("DATE"); - destTags.Remove("GENRE"); - destTags.Remove("TRACKNUMBER"); - destTags.Remove("TRACKTOTAL"); - destTags.Remove("TOTALTRACKS"); - destTags.Remove("DISCNUMBER"); - destTags.Remove("DISCTOTAL"); - destTags.Remove("TOTALDISCS"); - - // these are not valid - CleanupTags(destTags, "ACCURATERIP"); - //CleanupTags(destTags, "REPLAYGAIN"); - - destTags.Remove("CUESHEET"); - if (fWithCUE) - destTags.Add("CUESHEET", CUESheetContents(CUEStyle.SingleFileWithCUE)); - - if (_config.embedLog) - { + // these will be set explicitely + destTags.Remove("ARTIST"); + destTags.Remove("TITLE"); + destTags.Remove("ALBUM"); + destTags.Remove("ALBUMARTIST"); + destTags.Remove("DATE"); + destTags.Remove("GENRE"); + destTags.Remove("TRACKNUMBER"); + destTags.Remove("TRACKTOTAL"); + destTags.Remove("TOTALTRACKS"); + destTags.Remove("DISCNUMBER"); + destTags.Remove("DISCTOTAL"); + destTags.Remove("TOTALDISCS"); destTags.Remove("LOG"); destTags.Remove("LOGFILE"); destTags.Remove("EACLOG"); - if (logContents != null) - destTags.Add("LOG", logContents); + + // these are not valid + CleanupTags(destTags, "ACCURATERIP"); + //CleanupTags(destTags, "REPLAYGAIN"); + + destTags.Remove("CUESHEET"); } - if (_config.writeArTagsOnConvert) - { - if (fWithCUE && _action != CUEAction.Convert && _arVerify.AccResult == HttpStatusCode.OK) - GenerateAccurateRipTags(destTags, _writeOffset, bestOffset, -1); - else - destTags.Add("ACCURATERIPID", _accurateRipId ?? AccurateRipVerify.CalculateAccurateRipId(_toc)); - } + if (fWithCUE) + destTags.Add("CUESHEET", CUESheetContents(CUEStyle.SingleFileWithCUE)); + + if (_config.embedLog && logContents != null) + destTags.Add("LOG", logContents); + + if (fWithCUE && _config.writeArTagsOnConvert && _action == CUEAction.VerifyAndConvert && _arVerify.AccResult == HttpStatusCode.OK) + GenerateAccurateRipTags(destTags, bestOffset, -1); + return destTags; } @@ -2923,12 +3393,21 @@ namespace CUETools.Processor { pathIn = Path.GetFullPath(pathIn); List fileGroups = CUESheet.ScanFolder(_config, Path.GetDirectoryName(pathIn)); - FileGroupInfo fileGroup = FileGroupInfo.WhichContains(fileGroups, pathIn); - return fileGroup == null ? null : CreateDummyCUESheet(fileGroup); + FileGroupInfo fileGroup = FileGroupInfo.WhichContains(fileGroups, pathIn, FileGroupInfoType.TrackFiles) + ?? FileGroupInfo.WhichContains(fileGroups, pathIn, FileGroupInfoType.FileWithCUE); + return fileGroup == null ? null : CreateDummyCUESheet(_config, fileGroup); } - public static string CreateDummyCUESheet(FileGroupInfo fileGroup) + public static string CreateDummyCUESheet(CUEConfig _config, FileGroupInfo fileGroup) { + if (fileGroup.type == FileGroupInfoType.FileWithCUE) + { + TagLib.UserDefined.AdditionalFileTypes.Config = _config; + TagLib.File.IFileAbstraction fileAbsraction = new TagLib.File.LocalFileAbstraction(fileGroup.main.FullName); + TagLib.File fileInfo = TagLib.File.Create(fileAbsraction); + return Tagging.Analyze(fileInfo).Get("CUESHEET"); + } + StringWriter sw = new StringWriter(); sw.WriteLine(String.Format("REM COMMENT \"CUETools generated dummy CUE sheet\"")); int trackNo = 0; @@ -2942,17 +3421,17 @@ namespace CUETools.Processor return sw.ToString(); } - public static string CorrectAudioFilenames(string path, bool always) + public static string CorrectAudioFilenames(CUEConfig _config, string path, bool always) { StreamReader sr = new StreamReader(path, CUESheet.Encoding); string cue = sr.ReadToEnd(); sr.Close(); - return CorrectAudioFilenames(Path.GetDirectoryName(path), cue, always, null); + string extension; + return CorrectAudioFilenames(_config, Path.GetDirectoryName(path), cue, always, null, out extension); } - public static string CorrectAudioFilenames(string dir, string cue, bool always, List files) + public static string CorrectAudioFilenames(CUEConfig _config, string dir, string cue, bool always, List files, out string extension) { - string[] audioExts = new string[] { "*.wav", "*.flac", "*.wv", "*.ape", "*.m4a", "*.tta", "*.tak", "*.ogg" }; List lines = new List(); List filePos = new List(); List origFiles = new List(); @@ -2962,13 +3441,17 @@ namespace CUETools.Processor CUELine line; int i; - using (StringReader sr = new StringReader(cue)) { - while ((lineStr = sr.ReadLine()) != null) { + using (StringReader sr = new StringReader(cue)) + { + while ((lineStr = sr.ReadLine()) != null) + { lines.Add(lineStr); line = new CUELine(lineStr); - if ((line.Params.Count == 3) && (line.Params[0].ToUpper() == "FILE")) { + if ((line.Params.Count == 3) && (line.Params[0].ToUpper() == "FILE")) + { string fileType = line.Params[2].ToUpper(); - if ((fileType != "BINARY") && (fileType != "MOTOROLA")) { + if ((fileType != "BINARY") && (fileType != "MOTOROLA")) + { filePos.Add(lines.Count - 1); origFiles.Add(line.Params[1]); foundAll &= (LocateFile(dir, line.Params[1], files) != null); @@ -2978,57 +3461,66 @@ namespace CUETools.Processor sr.Close(); } - if (!foundAll || always) + + extension = null; + if (foundAll && !always) + return cue; + + foundAll = false; + + foreach (KeyValuePair format in _config.formats) { - foundAll = false; - for (i = 0; i < audioExts.Length; i++) + List newFiles = new List(); + for (int j = 0; j < origFiles.Count; j++) { - List newFiles = new List(); - for (int j = 0; j < origFiles.Count; j++) - { - string newFilename = Path.ChangeExtension(Path.GetFileName(origFiles[j]), audioExts[i].Substring(1)); - string locatedFilename = LocateFile(dir, newFilename, files); - if (locatedFilename != null) - newFiles.Add(locatedFilename); - } - if (newFiles.Count == origFiles.Count) - { - audioFiles = newFiles.ToArray(); - foundAll = true; - break; - } + string newFilename = Path.ChangeExtension(Path.GetFileName(origFiles[j]), "." + format.Key); + string locatedFilename = LocateFile(dir, newFilename, files); + if (locatedFilename != null) + newFiles.Add(locatedFilename); } - if (!foundAll) - for (i = 0; i < audioExts.Length; i++) + if (newFiles.Count == origFiles.Count) + { + audioFiles = newFiles.ToArray(); + extension = format.Key; + foundAll = true; + break; + } + } + + if (!foundAll) + foreach (KeyValuePair format in _config.formats) { if (files == null) - audioFiles = Directory.GetFiles(dir == "" ? "." : dir, audioExts[i]); + audioFiles = Directory.GetFiles(dir == "" ? "." : dir, "*." + format.Key); else { audioFiles = files.FindAll(delegate(string s) { - return Path.GetDirectoryName(s) == dir && Path.GetExtension(s) == audioExts[i].Substring(1); + return Path.GetDirectoryName(s) == dir && Path.GetExtension(s).ToLower() == "." + format.Key; }).ToArray(); } if (audioFiles.Length == filePos.Count) { Array.Sort(audioFiles); + extension = format.Key; foundAll = true; break; } } - if (!foundAll) - throw new Exception("unable to locate the audio files"); - for (i = 0; i < filePos.Count; i++) - lines[filePos[i]] = "FILE \"" + Path.GetFileName(audioFiles[i]) + "\" WAVE"; - } + if (!foundAll) + throw new Exception("unable to locate the audio files"); - using (StringWriter sw = new StringWriter()) { - for (i = 0; i < lines.Count; i++) { + for (i = 0; i < filePos.Count; i++) + lines[filePos[i]] = "FILE \"" + Path.GetFileName(audioFiles[i]) + "\" WAVE"; + + using (StringWriter sw = new StringWriter()) + { + for (i = 0; i < lines.Count; i++) + { sw.WriteLine(lines[i]); } - return sw.ToString (); + return sw.ToString(); } } @@ -3119,6 +3611,23 @@ namespace CUETools.Processor } } + public string OutputPath + { + get + { + return _outputPath; + } + } + + public string OutputDir + { + get + { + string outDir = Path.GetDirectoryName(_outputPath); + return outDir == "" ? "." : outDir; + } + } + public CDImageLayout TOC { get @@ -3131,7 +3640,7 @@ namespace CUETools.Processor { if (noOutput) return new DummyWriter(path, bps, 2, 44100); - return AudioReadWrite.GetAudioDest(path, finalSampleCount, bps, 44100, _config); + return AudioReadWrite.GetAudioDest(_audioEncoderType, path, finalSampleCount, bps, 44100, _config); } private IAudioSource GetAudioSource(int sourceIndex) { @@ -3432,6 +3941,18 @@ namespace CUETools.Processor } } + public CUEStyle OutputStyle + { + get + { + return _outputStyle; + } + set + { + _outputStyle = value; + } + } + public bool IsCD { get @@ -3448,8 +3969,6 @@ namespace CUETools.Processor public static List ScanFolder(CUEConfig _config, IEnumerable files) { - List audioExtensions = new List(new string[] { ".flac", ".wv", ".ape", ".wav", ".m4a", ".tta", ".tak" }); - List embeddedExtensions = new List(new string[] { ".flac", ".wv", ".ape", ".tak" }); List fileGroups = new List(); foreach (FileSystemInfo file in files) { @@ -3501,7 +4020,8 @@ namespace CUETools.Processor fileGroups.Add(new FileGroupInfo(file, FileGroupInfoType.Archive)); continue; } - if (audioExtensions.Contains(ext)) + CUEToolsFormat fmt; + if (ext.StartsWith(".") && _config.formats.TryGetValue(ext.Substring(1), out fmt) && fmt.allowLossless) { uint disc = 0; bool cueFound = false; @@ -3511,7 +4031,7 @@ namespace CUETools.Processor { TagLib.File fileInfo = TagLib.File.Create(fileAbsraction); disc = fileInfo.Tag.Disc; - cueFound = embeddedExtensions.Contains(ext) && Tagging.Analyze(fileInfo).Get("CUESHEET") != null; + cueFound = fmt.allowEmbed && Tagging.Analyze(fileInfo).Get("CUESHEET") != null; } catch { } if (cueFound) @@ -3546,6 +4066,42 @@ namespace CUETools.Processor fileGroups.RemoveAll(new Predicate(FileGroupInfo.IsExcessive)); return fileGroups; } + + public string AccurateRipLog + { + get + { + using (StringWriter logWriter = new StringWriter()) + { + GenerateAccurateRipLog(logWriter); + return logWriter.ToString(); + } + } + } + + public string ExecuteScript(string script) + { + AsmHelper helper = CompileScript(script); + return (string)helper.Invoke("*.Execute", this); + } + + public static AsmHelper CompileScript(string script) + { + //CSScript.GlobalSettings.InMemoryAsssembly = true; + //CSScript.GlobalSettings.HideAutoGeneratedFiles = + //CSScript.CacheEnabled = false; + return new AsmHelper(CSScript.LoadCode("using System; using System.Windows.Forms; using System.Net; using CUETools.Processor; using CUETools.Codecs; using CUETools.AccurateRip; public class Script { " + + "public static string Execute(CUESheet processor) { \r\n" + + script + + "\r\n } " + + " }", null, true)); + } + + public static bool TryCompileScript(string script) + { + AsmHelper helper = CompileScript(script); + return helper != null; + } } public enum FileGroupInfoType @@ -3556,6 +4112,7 @@ namespace CUETools.Processor FileWithCUE, TrackFiles } + public class FileGroupInfo { public List files; @@ -3578,18 +4135,19 @@ namespace CUETools.Processor public bool Contains(string pathIn) { if (type != FileGroupInfoType.TrackFiles) - return false; + return main.FullName.ToLower() == pathIn.ToLower(); bool found = false; foreach (FileSystemInfo file in files) if (file.FullName.ToLower() == pathIn.ToLower()) found = true; return found; } - public static FileGroupInfo WhichContains(IEnumerable fileGroups, string pathIn) + + public static FileGroupInfo WhichContains(IEnumerable fileGroups, string pathIn, FileGroupInfoType type) { foreach (FileGroupInfo fileGroup in fileGroups) { - if (fileGroup.type == FileGroupInfoType.TrackFiles && fileGroup.Contains(pathIn)) + if (fileGroup.type == type && fileGroup.Contains(pathIn)) return fileGroup; } return null; @@ -3775,4 +4333,4 @@ namespace CUETools.Processor public StopException() : base() { } } -} \ No newline at end of file +} diff --git a/CUETools.Processor/Settings.cs b/CUETools.Processor/Settings.cs index 1959fb1..e5dd48a 100644 --- a/CUETools.Processor/Settings.cs +++ b/CUETools.Processor/Settings.cs @@ -43,26 +43,36 @@ namespace CUETools.Processor public class SettingsReader { Dictionary _settings; - public SettingsReader(string appName, string fileName) { + public SettingsReader(string appName, string fileName, string appPath) { _settings = new Dictionary(); + bool userProfilesEnabled = (appPath == null || File.Exists(Path.Combine(Path.GetDirectoryName(appPath), "user_profiles_enabled"))); - string path = Path.Combine(SettingsShared.GetMyAppDataDir(appName), fileName); + string path = Path.Combine( + userProfilesEnabled ? SettingsShared.GetMyAppDataDir(appName) : Path.GetDirectoryName(appPath), + userProfilesEnabled ? fileName : appName + "." + fileName); if (!File.Exists(path)) { return; } using (StreamReader sr = new StreamReader(path, Encoding.UTF8)) { - string line, name, val; + string line, name = null, val; int pos; while ((line = sr.ReadLine()) != null) { pos = line.IndexOf('='); if (pos != -1) { - name = line.Substring(0, pos); - val = line.Substring(pos + 1); - - if (!_settings.ContainsKey(name)) { - _settings.Add(name, val); + if (pos > 0) + { + name = line.Substring(0, pos); + val = line.Substring(pos + 1); + if (!_settings.ContainsKey(name)) + _settings.Add(name, val); + } + else + { + val = line.Substring(pos + 1); + if (_settings.ContainsKey(name)) + _settings[name] += "\r\n" + val; } } } @@ -100,8 +110,12 @@ namespace CUETools.Processor public class SettingsWriter { StreamWriter _sw; - public SettingsWriter(string appName, string fileName) { - string path = Path.Combine(SettingsShared.GetMyAppDataDir(appName), fileName); + public SettingsWriter(string appName, string fileName, string appPath) + { + bool userProfilesEnabled = (appPath == null || File.Exists(Path.Combine(Path.GetDirectoryName(appPath), "user_profiles_enabled"))); + string path = Path.Combine( + userProfilesEnabled ? SettingsShared.GetMyAppDataDir(appName) : Path.GetDirectoryName(appPath), + userProfilesEnabled ? fileName : appName + "." + fileName); _sw = new StreamWriter(path, false, Encoding.UTF8); } @@ -110,6 +124,17 @@ namespace CUETools.Processor _sw.WriteLine(name + "=" + value); } + public void SaveText(string name, string value) + { + _sw.Write(name); + using (StringReader sr = new StringReader(value)) + { + string lineStr; + while ((lineStr = sr.ReadLine()) != null) + _sw.WriteLine("=" + lineStr); + } + } + public void Save(string name, bool value) { Save(name, value ? "1" : "0"); } diff --git a/CUETools.Processor/Tagging.cs b/CUETools.Processor/Tagging.cs index e762d96..4bb7e8b 100644 --- a/CUETools.Processor/Tagging.cs +++ b/CUETools.Processor/Tagging.cs @@ -19,10 +19,15 @@ namespace CUETools.Processor return true; } if (fileInfo is TagLib.Mpeg4.File) - return true; - if (fileInfo is TagLib.UserDefined.File && !(fileInfo as TagLib.UserDefined.File).SupportsAPEv2) { - if (!(fileInfo as TagLib.UserDefined.File).SupportsID3v2) + // remove fb2k/nero nasty tags mess + ((TagLib.Mpeg4.File)fileInfo).UserData.RemoveChild("tags"); + TagLib.Mpeg4.AppleTag mpeg4 = (TagLib.Mpeg4.AppleTag)fileInfo.GetTag(TagLib.TagTypes.Apple, true); + return true; + } + if (fileInfo is TagLib.UserDefined.File && (fileInfo as TagLib.UserDefined.File).Tagger != CUEToolsTagger.APEv2) + { + if ((fileInfo as TagLib.UserDefined.File).Tagger != CUEToolsTagger.ID3v2) return false; TagLib.Id3v2.Tag id3v2 = (TagLib.Id3v2.Tag)fileInfo.GetTag(TagLib.TagTypes.Id3v2, true); return true; diff --git a/CUETools.Processor/UserDefined.cs b/CUETools.Processor/UserDefined.cs index b549e84..847a63f 100644 --- a/CUETools.Processor/UserDefined.cs +++ b/CUETools.Processor/UserDefined.cs @@ -27,6 +27,7 @@ // using System; +using System.Collections.Generic; using TagLib; namespace TagLib.UserDefined { @@ -45,9 +46,7 @@ namespace TagLib.UserDefined { { #region Private Fields - private bool _supportsAPEv2 = true; - - private bool _supportsID3v2 = true; + private CUETools.Processor.CUEToolsTagger tagger; #endregion @@ -72,17 +71,20 @@ namespace TagLib.UserDefined { /// /// is . /// - public File (string path, ReadStyle propertiesStyle, bool supportsAPEv2, bool supportsID3v2) + public File (string path, ReadStyle propertiesStyle, CUETools.Processor.CUEToolsTagger _tagger) : base (path, propertiesStyle) { - _supportsAPEv2 = supportsAPEv2; - _supportsID3v2 = supportsID3v2; - // Make sure we have an APE tag. - if (_supportsAPEv2) - GetTag(TagTypes.Ape, true); - else - if (_supportsID3v2) + tagger = _tagger; + // Make sure we have a tag. + switch (tagger) + { + case CUETools.Processor.CUEToolsTagger.APEv2: + GetTag(TagTypes.Ape, true); + break; + case CUETools.Processor.CUEToolsTagger.ID3v2: GetTag(TagTypes.Id3v2, true); + break; + } } /// @@ -97,17 +99,20 @@ namespace TagLib.UserDefined { /// /// is . /// - public File(string path, bool supportsAPEv2, bool supportsID3v2) + public File(string path, CUETools.Processor.CUEToolsTagger _tagger) : base(path) { - _supportsAPEv2 = supportsAPEv2; - _supportsID3v2 = supportsID3v2; - // Make sure we have an APE tag. - if (_supportsAPEv2) - GetTag(TagTypes.Ape, true); - else - if (_supportsID3v2) + tagger = _tagger; + // Make sure we have a tag. + switch (tagger) + { + case CUETools.Processor.CUEToolsTagger.APEv2: + GetTag(TagTypes.Ape, true); + break; + case CUETools.Processor.CUEToolsTagger.ID3v2: GetTag(TagTypes.Id3v2, true); + break; + } } /// @@ -129,17 +134,20 @@ namespace TagLib.UserDefined { /// />. /// public File (File.IFileAbstraction abstraction, - ReadStyle propertiesStyle, bool supportsAPEv2, bool supportsID3v2) + ReadStyle propertiesStyle, CUETools.Processor.CUEToolsTagger _tagger) : base (abstraction, propertiesStyle) { - _supportsAPEv2 = supportsAPEv2; - _supportsID3v2 = supportsID3v2; - // Make sure we have an APE tag. - if (_supportsAPEv2) - GetTag(TagTypes.Ape, true); - else - if (_supportsID3v2) + tagger = _tagger; + // Make sure we have a tag. + switch (tagger) + { + case CUETools.Processor.CUEToolsTagger.APEv2: + GetTag(TagTypes.Ape, true); + break; + case CUETools.Processor.CUEToolsTagger.ID3v2: GetTag(TagTypes.Id3v2, true); + break; + } } /// @@ -155,17 +163,20 @@ namespace TagLib.UserDefined { /// is . /// - public File(File.IFileAbstraction abstraction, bool supportsAPEv2, bool supportsID3v2) + public File(File.IFileAbstraction abstraction, CUETools.Processor.CUEToolsTagger _tagger) : base (abstraction) { - _supportsAPEv2 = supportsAPEv2; - _supportsID3v2 = supportsID3v2; - // Make sure we have an APE tag. - if (_supportsAPEv2) - GetTag(TagTypes.Ape, true); - else - if (_supportsID3v2) + tagger = _tagger; + // Make sure we have a tag. + switch (tagger) + { + case CUETools.Processor.CUEToolsTagger.APEv2: + GetTag(TagTypes.Ape, true); + break; + case CUETools.Processor.CUEToolsTagger.ID3v2: GetTag(TagTypes.Id3v2, true); + break; + } } #endregion @@ -174,22 +185,13 @@ namespace TagLib.UserDefined { #region Public Methods - public bool SupportsAPEv2 + public CUETools.Processor.CUEToolsTagger Tagger { get { - return _supportsAPEv2; + return tagger; } - } - - public bool SupportsID3v2 - { - get - { - return _supportsID3v2; - } - } - + } /// /// Gets a tag of a specified type from the current instance, @@ -329,12 +331,9 @@ namespace TagLib.UserDefined { private static TagLib.File UserDefinedResolver(TagLib.File.IFileAbstraction abstraction, string mimetype, TagLib.ReadStyle style) { - if (mimetype == "taglib/flac" || mimetype == "taglib/wv" || mimetype == "taglib/ape" || mimetype == "taglib/wav" || mimetype == "taglib/ogg" || mimetype == "taglib/m4a" || mimetype == "taglib/mp3") - return null; - if (mimetype == "taglib/tta") - return new File(abstraction, style, true, false); - if (mimetype == "taglib/" + _config.udc1Extension) - return new File(abstraction, style, _config.udc1APEv2, _config.udc1ID3v2); + foreach (KeyValuePair fmt in _config.formats) + if (fmt.Value.tagger != CUETools.Processor.CUEToolsTagger.TagLibSharp && mimetype == "taglib/" + fmt.Key) + return new File(abstraction, style, fmt.Value.tagger); return null; } diff --git a/CUETools.Ripper.Console/Program.cs b/CUETools.Ripper.Console/Program.cs index 5c22e78..9f48c0b 100644 --- a/CUETools.Ripper.Console/Program.cs +++ b/CUETools.Ripper.Console/Program.cs @@ -268,7 +268,7 @@ namespace CUETools.ConsoleRipper logWriter.WriteLine(); logWriter.WriteLine("AccurateRip summary"); logWriter.WriteLine(); - arVerify.GenerateFullLog(logWriter, 0); + arVerify.GenerateFullLog(logWriter, true); logWriter.WriteLine(); logWriter.WriteLine("End of status report"); logWriter.Close(); diff --git a/CUETools/CUETools.csproj b/CUETools/CUETools.csproj index cb28005..5c02caa 100644 --- a/CUETools/CUETools.csproj +++ b/CUETools/CUETools.csproj @@ -102,12 +102,6 @@ frmChoice.cs - - Form - - - frmFilenameCorrector.cs - Form @@ -170,14 +164,6 @@ Designer frmCUETools.cs - - frmFilenameCorrector.cs - Designer - - - Designer - frmFilenameCorrector.cs - frmPassword.cs Designer @@ -271,13 +257,30 @@ + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 - - - Lassen Sie die CUE-Sheets hier fallen, um die Dateinamen in ihnen zu korrigieren. Die Audiodateien müssen sich im selben Ordner wie die CUE-Sheets befinden. Die Anzahl der Audiodateien in dem Verzeichnis muss mit der Anzahl der referenzierten Stücke übereinstimmen. Die Audiodateien müssen so benannt sein, dass sie beim Sortieren nach dem Dateinamen in der richtigen Reihenfolge angezeigt werden. Um mehrere CUE-Sheets gleichzeitig zu korrigieren, suchen Sie nach *.cue. - - - Dateinamenkorrektor - - \ No newline at end of file diff --git a/CUETools/frmFilenameCorrector.resx b/CUETools/frmFilenameCorrector.resx deleted file mode 100644 index 5cd3924..0000000 --- a/CUETools/frmFilenameCorrector.resx +++ /dev/null @@ -1,174 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 - - - - 8, 8 - - - 272, 144 - - - - 0 - - - Drop CUE sheets here to correct the audio filenames contained inside. The audio files must be located in the same folder as the CUE sheet. The number of audio files in that folder must match the number of files referenced by the CUE sheet. The audio files must be named such that when sorted they are in order by track number. To correct multiple CUE sheets at once, you can drop the search results for *.cue. - - - MiddleLeft - - - lblDescription - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 0 - - - True - - - 6, 13 - - - 286, 159 - - - Tahoma, 8.25pt - - - - Manual - - - Filename Corrector - - - frmFilenameCorrector - - - 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/frmSettings.Designer.cs b/CUETools/frmSettings.Designer.cs index 0c0a6ac..99162c1 100644 --- a/CUETools/frmSettings.Designer.cs +++ b/CUETools/frmSettings.Designer.cs @@ -29,37 +29,21 @@ namespace JDP { this.grpGeneral = new System.Windows.Forms.GroupBox(); this.labelLanguage = new System.Windows.Forms.Label(); this.comboLanguage = new System.Windows.Forms.ComboBox(); - this.chkSingleInstance = new System.Windows.Forms.CheckBox(); - this.chkOverwriteTags = new System.Windows.Forms.CheckBox(); - this.chkExtractLog = new System.Windows.Forms.CheckBox(); + this.chkAllowMultipleInstances = new System.Windows.Forms.CheckBox(); this.chkReducePriority = new System.Windows.Forms.CheckBox(); this.chkTruncateExtra4206Samples = new System.Windows.Forms.CheckBox(); this.chkCreateCUEFileWhenEmbedded = new System.Windows.Forms.CheckBox(); this.chkCreateM3U = new System.Windows.Forms.CheckBox(); - this.chkFillUpCUE = new System.Windows.Forms.CheckBox(); - this.chkEmbedLog = new System.Windows.Forms.CheckBox(); this.chkAutoCorrectFilenames = new System.Windows.Forms.CheckBox(); this.chkPreserveHTOA = new System.Windows.Forms.CheckBox(); - this.numericFLACCompressionLevel = new System.Windows.Forms.NumericUpDown(); - this.lblFLACCompressionLevel = new System.Windows.Forms.Label(); - this.chkFLACVerify = new System.Windows.Forms.CheckBox(); this.btnOK = new System.Windows.Forms.Button(); - this.chkWVStoreMD5 = new System.Windows.Forms.CheckBox(); - this.numWVExtraMode = new System.Windows.Forms.NumericUpDown(); - this.chkWVExtraMode = new System.Windows.Forms.CheckBox(); - this.rbWVVeryHigh = new System.Windows.Forms.RadioButton(); - this.rbWVHigh = new System.Windows.Forms.RadioButton(); - this.rbWVNormal = new System.Windows.Forms.RadioButton(); - this.rbWVFast = new System.Windows.Forms.RadioButton(); this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.chkEncodeWhenZeroOffset = new System.Windows.Forms.CheckBox(); - this.chkArFixOffset = new System.Windows.Forms.CheckBox(); this.chkWriteArLogOnConvert = new System.Windows.Forms.CheckBox(); this.chkWriteArTagsOnConvert = new System.Windows.Forms.CheckBox(); + this.chkEncodeWhenZeroOffset = new System.Windows.Forms.CheckBox(); this.numEncodeWhenPercent = new System.Windows.Forms.NumericUpDown(); this.labelEncodeWhenConfidence = new System.Windows.Forms.Label(); this.numEncodeWhenConfidence = new System.Windows.Forms.NumericUpDown(); - this.chkArNoUnverifiedAudio = new System.Windows.Forms.CheckBox(); this.labelFixWhenConfidence = new System.Windows.Forms.Label(); this.numFixWhenConfidence = new System.Windows.Forms.NumericUpDown(); this.numFixWhenPercent = new System.Windows.Forms.NumericUpDown(); @@ -70,6 +54,7 @@ namespace JDP { this.chkHDCDStopLooking = new System.Windows.Forms.CheckBox(); this.chkHDCD24bit = new System.Windows.Forms.CheckBox(); this.chkHDCDLW16 = new System.Windows.Forms.CheckBox(); + this.chkEmbedLog = new System.Windows.Forms.CheckBox(); this.grpAudioFilenames = new System.Windows.Forms.GroupBox(); this.chkKeepOriginalFilenames = new System.Windows.Forms.CheckBox(); this.txtSpecialExceptions = new System.Windows.Forms.TextBox(); @@ -79,45 +64,108 @@ namespace JDP { this.lblTrackFilenameFormat = new System.Windows.Forms.Label(); this.lblSingleFilenameFormat = new System.Windows.Forms.Label(); this.txtSingleFilenameFormat = new System.Windows.Forms.TextBox(); - this.rbAPEinsane = new System.Windows.Forms.RadioButton(); - this.rbAPEextrahigh = new System.Windows.Forms.RadioButton(); - this.rbAPEhigh = new System.Windows.Forms.RadioButton(); - this.rbAPEnormal = new System.Windows.Forms.RadioButton(); - this.rbAPEfast = new System.Windows.Forms.RadioButton(); this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabPage1 = new System.Windows.Forms.TabPage(); + this.tabPage6 = new System.Windows.Forms.TabPage(); + this.groupBoxTagging = new System.Windows.Forms.GroupBox(); + this.checkBoxEmbedAlbumArt = new System.Windows.Forms.CheckBox(); + this.checkBoxCopyBasicTags = new System.Windows.Forms.CheckBox(); + this.checkBoxCopyAlbumArt = new System.Windows.Forms.CheckBox(); + this.checkBoxWriteCUETags = new System.Windows.Forms.CheckBox(); + this.checkBoxCopyUnknownTags = new System.Windows.Forms.CheckBox(); + this.chkOverwriteTags = new System.Windows.Forms.CheckBox(); + this.chkFillUpCUE = new System.Windows.Forms.CheckBox(); this.tabPage2 = new System.Windows.Forms.TabPage(); - this.groupBox3 = new System.Windows.Forms.GroupBox(); + this.groupBoxARLog = new System.Windows.Forms.GroupBox(); + this.textBoxARLogExtension = new System.Windows.Forms.TextBox(); + this.labelLogFileExtension = new System.Windows.Forms.Label(); + this.checkBoxARLogVerbose = new System.Windows.Forms.CheckBox(); + this.groupBox5 = new System.Windows.Forms.GroupBox(); + this.label2 = new System.Windows.Forms.Label(); + this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.checkBoxFixToNearest = new System.Windows.Forms.CheckBox(); + this.label3 = new System.Windows.Forms.Label(); + this.groupBoxVerify = new System.Windows.Forms.GroupBox(); + this.checkBoxARVerifyUseSourceFolder = new System.Windows.Forms.CheckBox(); this.chkWriteARLogOnVerify = new System.Windows.Forms.CheckBox(); this.tabPage3 = new System.Windows.Forms.TabPage(); - this.tabControl2 = new System.Windows.Forms.TabControl(); - this.tabPage5 = new System.Windows.Forms.TabPage(); - this.tabPage6 = new System.Windows.Forms.TabPage(); - this.tabPage7 = new System.Windows.Forms.TabPage(); - this.tabPage8 = new System.Windows.Forms.TabPage(); + this.groupBoxFormat = new System.Windows.Forms.GroupBox(); + this.comboFormatLossyEncoder = new System.Windows.Forms.ComboBox(); + this.labelFormatLossyEncoder = new System.Windows.Forms.Label(); + this.checkBoxFormatAllowLossy = new System.Windows.Forms.CheckBox(); + this.comboFormatLosslessEncoder = new System.Windows.Forms.ComboBox(); + this.checkBoxFormatSupportsLossyWAV = new System.Windows.Forms.CheckBox(); + this.labelFormatLosslessEncoder = new System.Windows.Forms.Label(); + this.checkBoxFormatEmbedCUESheet = new System.Windows.Forms.CheckBox(); + this.comboFormatDecoder = new System.Windows.Forms.ComboBox(); + this.checkBoxFormatAllowLossless = new System.Windows.Forms.CheckBox(); + this.labelFormatDefaultDecoder = new System.Windows.Forms.Label(); + this.labelFormatTagger = new System.Windows.Forms.Label(); + this.comboBoxFormatTagger = new System.Windows.Forms.ComboBox(); + this.listViewFormats = new System.Windows.Forms.ListView(); + this.columnHeader1 = new System.Windows.Forms.ColumnHeader(); + this.tabPage10 = new System.Windows.Forms.TabPage(); + this.groupBoxExternalEncoder = new System.Windows.Forms.GroupBox(); + this.checkBoxEncoderLossless = new System.Windows.Forms.CheckBox(); + this.textBoxEncoderPath = new System.Windows.Forms.TextBox(); + this.textBoxEncoderParameters = new System.Windows.Forms.TextBox(); + this.labelEncoderPath = new System.Windows.Forms.Label(); + this.labelEncoderParameters = new System.Windows.Forms.Label(); + this.comboBoxEncoderExtension = new System.Windows.Forms.ComboBox(); + this.listViewEncoders = new System.Windows.Forms.ListView(); + this.columnHeader3 = new System.Windows.Forms.ColumnHeader(); + this.groupBoxLibMAC_SDK = new System.Windows.Forms.GroupBox(); + this.rbAPEinsane = new System.Windows.Forms.RadioButton(); + this.rbAPEfast = new System.Windows.Forms.RadioButton(); + this.rbAPEextrahigh = new System.Windows.Forms.RadioButton(); + this.rbAPEnormal = new System.Windows.Forms.RadioButton(); + this.rbAPEhigh = new System.Windows.Forms.RadioButton(); + this.groupBoxLibWavpack = new System.Windows.Forms.GroupBox(); + this.chkWVStoreMD5 = new System.Windows.Forms.CheckBox(); + this.rbWVFast = new System.Windows.Forms.RadioButton(); + this.numWVExtraMode = new System.Windows.Forms.NumericUpDown(); + this.rbWVHigh = new System.Windows.Forms.RadioButton(); + this.rbWVVeryHigh = new System.Windows.Forms.RadioButton(); + this.chkWVExtraMode = new System.Windows.Forms.CheckBox(); + this.rbWVNormal = new System.Windows.Forms.RadioButton(); + this.groupBoxLibFLAC = new System.Windows.Forms.GroupBox(); + this.lblFLACCompressionLevel = new System.Windows.Forms.Label(); + this.numericFLACCompressionLevel = new System.Windows.Forms.NumericUpDown(); + this.chkFLACVerify = new System.Windows.Forms.CheckBox(); + this.labelEncoderExtension = new System.Windows.Forms.Label(); + this.tabPage11 = new System.Windows.Forms.TabPage(); + this.comboBoxDecoderExtension = new System.Windows.Forms.ComboBox(); + this.groupBoxExternalDecoder = new System.Windows.Forms.GroupBox(); + this.textBoxDecoderPath = new System.Windows.Forms.TextBox(); + this.labelDecoderPath = new System.Windows.Forms.Label(); + this.labelDecoderParameters = new System.Windows.Forms.Label(); + this.textBoxDecoderParameters = new System.Windows.Forms.TextBox(); + this.listViewDecoders = new System.Windows.Forms.ListView(); + this.columnHeader4 = new System.Windows.Forms.ColumnHeader(); + this.labelDecoderExtension = new System.Windows.Forms.Label(); + this.tabPage4 = new System.Windows.Forms.TabPage(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); this.label1 = new System.Windows.Forms.Label(); this.numericLossyWAVQuality = new System.Windows.Forms.NumericUpDown(); - this.tabPage9 = new System.Windows.Forms.TabPage(); - this.chkUDC1ID3v2 = new System.Windows.Forms.CheckBox(); - this.chkUDC1APEv2 = new System.Windows.Forms.CheckBox(); - this.label6 = new System.Windows.Forms.Label(); - this.label5 = new System.Windows.Forms.Label(); - this.textUDC1EncParams = new System.Windows.Forms.TextBox(); - this.textUDC1Encoder = new System.Windows.Forms.TextBox(); - this.textUDC1Params = new System.Windows.Forms.TextBox(); - this.textUDC1Decoder = new System.Windows.Forms.TextBox(); - this.textUDC1Extension = new System.Windows.Forms.TextBox(); - this.label4 = new System.Windows.Forms.Label(); - this.label3 = new System.Windows.Forms.Label(); - this.label2 = new System.Windows.Forms.Label(); - this.imageList1 = new System.Windows.Forms.ImageList(this.components); - this.tabPage4 = new System.Windows.Forms.TabPage(); this.grpHDCD = new System.Windows.Forms.GroupBox(); this.chkHDCDDetect = new System.Windows.Forms.CheckBox(); + this.tabPage5 = new System.Windows.Forms.TabPage(); + this.richTextBoxScript = new System.Windows.Forms.RichTextBox(); + this.buttonScriptCompile = new System.Windows.Forms.Button(); + this.groupBoxScriptConditions = new System.Windows.Forms.GroupBox(); + this.listViewScriptConditions = new System.Windows.Forms.ListView(); + this.columnHeader6 = new System.Windows.Forms.ColumnHeader(); + this.listViewScripts = new System.Windows.Forms.ListView(); + this.columnHeader5 = new System.Windows.Forms.ColumnHeader(); + this.labelFormatDecoder = new System.Windows.Forms.Label(); + this.labelFormatEncoder = new System.Windows.Forms.Label(); + this.columnHeader2 = new System.Windows.Forms.ColumnHeader(); + this.groupBoxAlbumArt = new System.Windows.Forms.GroupBox(); + this.chkExtractLog = new System.Windows.Forms.CheckBox(); + this.numericUpDownMaxResolution = new System.Windows.Forms.NumericUpDown(); + this.labelAlbumArtMaximumResolution = new System.Windows.Forms.Label(); btnCancel = new System.Windows.Forms.Button(); this.grpGeneral.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numericFLACCompressionLevel)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.numWVExtraMode)).BeginInit(); this.groupBox1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.numEncodeWhenPercent)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numEncodeWhenConfidence)).BeginInit(); @@ -126,18 +174,32 @@ namespace JDP { this.grpAudioFilenames.SuspendLayout(); this.tabControl1.SuspendLayout(); this.tabPage1.SuspendLayout(); - this.tabPage2.SuspendLayout(); - this.groupBox3.SuspendLayout(); - this.tabPage3.SuspendLayout(); - this.tabControl2.SuspendLayout(); - this.tabPage5.SuspendLayout(); this.tabPage6.SuspendLayout(); - this.tabPage7.SuspendLayout(); - this.tabPage8.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numericLossyWAVQuality)).BeginInit(); - this.tabPage9.SuspendLayout(); + this.groupBoxTagging.SuspendLayout(); + this.tabPage2.SuspendLayout(); + this.groupBoxARLog.SuspendLayout(); + this.groupBox5.SuspendLayout(); + this.groupBox4.SuspendLayout(); + this.groupBoxVerify.SuspendLayout(); + this.tabPage3.SuspendLayout(); + this.groupBoxFormat.SuspendLayout(); + this.tabPage10.SuspendLayout(); + this.groupBoxExternalEncoder.SuspendLayout(); + this.groupBoxLibMAC_SDK.SuspendLayout(); + this.groupBoxLibWavpack.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numWVExtraMode)).BeginInit(); + this.groupBoxLibFLAC.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericFLACCompressionLevel)).BeginInit(); + this.tabPage11.SuspendLayout(); + this.groupBoxExternalDecoder.SuspendLayout(); this.tabPage4.SuspendLayout(); + this.groupBox2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericLossyWAVQuality)).BeginInit(); this.grpHDCD.SuspendLayout(); + this.tabPage5.SuspendLayout(); + this.groupBoxScriptConditions.SuspendLayout(); + this.groupBoxAlbumArt.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownMaxResolution)).BeginInit(); this.SuspendLayout(); // // btnCancel @@ -151,15 +213,11 @@ namespace JDP { // this.grpGeneral.Controls.Add(this.labelLanguage); this.grpGeneral.Controls.Add(this.comboLanguage); - this.grpGeneral.Controls.Add(this.chkSingleInstance); - this.grpGeneral.Controls.Add(this.chkOverwriteTags); - this.grpGeneral.Controls.Add(this.chkExtractLog); + this.grpGeneral.Controls.Add(this.chkAllowMultipleInstances); this.grpGeneral.Controls.Add(this.chkReducePriority); this.grpGeneral.Controls.Add(this.chkTruncateExtra4206Samples); this.grpGeneral.Controls.Add(this.chkCreateCUEFileWhenEmbedded); this.grpGeneral.Controls.Add(this.chkCreateM3U); - this.grpGeneral.Controls.Add(this.chkFillUpCUE); - this.grpGeneral.Controls.Add(this.chkEmbedLog); this.grpGeneral.Controls.Add(this.chkAutoCorrectFilenames); this.grpGeneral.Controls.Add(this.chkPreserveHTOA); resources.ApplyResources(this.grpGeneral, "grpGeneral"); @@ -179,23 +237,11 @@ namespace JDP { resources.ApplyResources(this.comboLanguage, "comboLanguage"); this.comboLanguage.Name = "comboLanguage"; // - // chkSingleInstance + // chkAllowMultipleInstances // - resources.ApplyResources(this.chkSingleInstance, "chkSingleInstance"); - this.chkSingleInstance.Name = "chkSingleInstance"; - this.chkSingleInstance.UseVisualStyleBackColor = true; - // - // chkOverwriteTags - // - resources.ApplyResources(this.chkOverwriteTags, "chkOverwriteTags"); - this.chkOverwriteTags.Name = "chkOverwriteTags"; - this.chkOverwriteTags.UseVisualStyleBackColor = true; - // - // chkExtractLog - // - resources.ApplyResources(this.chkExtractLog, "chkExtractLog"); - this.chkExtractLog.Name = "chkExtractLog"; - this.chkExtractLog.UseVisualStyleBackColor = true; + resources.ApplyResources(this.chkAllowMultipleInstances, "chkAllowMultipleInstances"); + this.chkAllowMultipleInstances.Name = "chkAllowMultipleInstances"; + this.chkAllowMultipleInstances.UseVisualStyleBackColor = true; // // chkReducePriority // @@ -222,20 +268,6 @@ namespace JDP { this.chkCreateM3U.Name = "chkCreateM3U"; this.chkCreateM3U.UseVisualStyleBackColor = true; // - // chkFillUpCUE - // - resources.ApplyResources(this.chkFillUpCUE, "chkFillUpCUE"); - this.chkFillUpCUE.Name = "chkFillUpCUE"; - this.chkFillUpCUE.UseVisualStyleBackColor = true; - this.chkFillUpCUE.CheckedChanged += new System.EventHandler(this.chkFillUpCUE_CheckedChanged); - // - // chkEmbedLog - // - resources.ApplyResources(this.chkEmbedLog, "chkEmbedLog"); - this.chkEmbedLog.Name = "chkEmbedLog"; - this.toolTip1.SetToolTip(this.chkEmbedLog, resources.GetString("chkEmbedLog.ToolTip")); - this.chkEmbedLog.UseVisualStyleBackColor = true; - // // chkAutoCorrectFilenames // resources.ApplyResources(this.chkAutoCorrectFilenames, "chkAutoCorrectFilenames"); @@ -249,32 +281,6 @@ namespace JDP { this.chkPreserveHTOA.Name = "chkPreserveHTOA"; this.chkPreserveHTOA.UseVisualStyleBackColor = true; // - // numericFLACCompressionLevel - // - resources.ApplyResources(this.numericFLACCompressionLevel, "numericFLACCompressionLevel"); - this.numericFLACCompressionLevel.Maximum = new decimal(new int[] { - 8, - 0, - 0, - 0}); - this.numericFLACCompressionLevel.Name = "numericFLACCompressionLevel"; - this.numericFLACCompressionLevel.Value = new decimal(new int[] { - 5, - 0, - 0, - 0}); - // - // lblFLACCompressionLevel - // - resources.ApplyResources(this.lblFLACCompressionLevel, "lblFLACCompressionLevel"); - this.lblFLACCompressionLevel.Name = "lblFLACCompressionLevel"; - // - // chkFLACVerify - // - resources.ApplyResources(this.chkFLACVerify, "chkFLACVerify"); - this.chkFLACVerify.Name = "chkFLACVerify"; - this.chkFLACVerify.UseVisualStyleBackColor = true; - // // btnOK // this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK; @@ -283,97 +289,14 @@ namespace JDP { this.btnOK.UseVisualStyleBackColor = true; this.btnOK.Click += new System.EventHandler(this.btnOK_Click); // - // 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; - this.chkWVExtraMode.CheckedChanged += new System.EventHandler(this.chkWVExtraMode_CheckedChanged); - // - // rbWVVeryHigh - // - resources.ApplyResources(this.rbWVVeryHigh, "rbWVVeryHigh"); - this.rbWVVeryHigh.Name = "rbWVVeryHigh"; - this.rbWVVeryHigh.UseVisualStyleBackColor = true; - // - // rbWVHigh - // - resources.ApplyResources(this.rbWVHigh, "rbWVHigh"); - this.rbWVHigh.Name = "rbWVHigh"; - this.rbWVHigh.UseVisualStyleBackColor = true; - // - // rbWVNormal - // - resources.ApplyResources(this.rbWVNormal, "rbWVNormal"); - this.rbWVNormal.Checked = true; - this.rbWVNormal.Name = "rbWVNormal"; - this.rbWVNormal.TabStop = true; - this.rbWVNormal.UseVisualStyleBackColor = true; - // - // rbWVFast - // - resources.ApplyResources(this.rbWVFast, "rbWVFast"); - this.rbWVFast.Name = "rbWVFast"; - this.rbWVFast.UseVisualStyleBackColor = true; - // // groupBox1 // - this.groupBox1.Controls.Add(this.chkEncodeWhenZeroOffset); - this.groupBox1.Controls.Add(this.chkArFixOffset); this.groupBox1.Controls.Add(this.chkWriteArLogOnConvert); this.groupBox1.Controls.Add(this.chkWriteArTagsOnConvert); - this.groupBox1.Controls.Add(this.numEncodeWhenPercent); - this.groupBox1.Controls.Add(this.labelEncodeWhenConfidence); - this.groupBox1.Controls.Add(this.numEncodeWhenConfidence); - this.groupBox1.Controls.Add(this.chkArNoUnverifiedAudio); - this.groupBox1.Controls.Add(this.labelFixWhenConfidence); - this.groupBox1.Controls.Add(this.numFixWhenConfidence); - this.groupBox1.Controls.Add(this.numFixWhenPercent); resources.ApplyResources(this.groupBox1, "groupBox1"); this.groupBox1.Name = "groupBox1"; this.groupBox1.TabStop = false; // - // chkEncodeWhenZeroOffset - // - resources.ApplyResources(this.chkEncodeWhenZeroOffset, "chkEncodeWhenZeroOffset"); - this.chkEncodeWhenZeroOffset.Name = "chkEncodeWhenZeroOffset"; - this.chkEncodeWhenZeroOffset.UseVisualStyleBackColor = true; - // - // chkArFixOffset - // - resources.ApplyResources(this.chkArFixOffset, "chkArFixOffset"); - this.chkArFixOffset.Checked = true; - this.chkArFixOffset.CheckState = System.Windows.Forms.CheckState.Checked; - this.chkArFixOffset.Name = "chkArFixOffset"; - this.chkArFixOffset.UseVisualStyleBackColor = true; - this.chkArFixOffset.CheckedChanged += new System.EventHandler(this.chkArFixOffset_CheckedChanged); - // // chkWriteArLogOnConvert // resources.ApplyResources(this.chkWriteArLogOnConvert, "chkWriteArLogOnConvert"); @@ -391,14 +314,20 @@ namespace JDP { this.toolTip1.SetToolTip(this.chkWriteArTagsOnConvert, resources.GetString("chkWriteArTagsOnConvert.ToolTip")); this.chkWriteArTagsOnConvert.UseVisualStyleBackColor = true; // + // chkEncodeWhenZeroOffset + // + resources.ApplyResources(this.chkEncodeWhenZeroOffset, "chkEncodeWhenZeroOffset"); + this.chkEncodeWhenZeroOffset.Name = "chkEncodeWhenZeroOffset"; + this.chkEncodeWhenZeroOffset.UseVisualStyleBackColor = true; + // // numEncodeWhenPercent // + resources.ApplyResources(this.numEncodeWhenPercent, "numEncodeWhenPercent"); this.numEncodeWhenPercent.Increment = new decimal(new int[] { 5, 0, 0, 0}); - resources.ApplyResources(this.numEncodeWhenPercent, "numEncodeWhenPercent"); this.numEncodeWhenPercent.Minimum = new decimal(new int[] { 1, 0, @@ -430,15 +359,6 @@ namespace JDP { 0, 0, 0}); - // - // chkArNoUnverifiedAudio - // - resources.ApplyResources(this.chkArNoUnverifiedAudio, "chkArNoUnverifiedAudio"); - this.chkArNoUnverifiedAudio.Checked = true; - this.chkArNoUnverifiedAudio.CheckState = System.Windows.Forms.CheckState.Checked; - this.chkArNoUnverifiedAudio.Name = "chkArNoUnverifiedAudio"; - this.chkArNoUnverifiedAudio.UseVisualStyleBackColor = true; - this.chkArNoUnverifiedAudio.CheckedChanged += new System.EventHandler(this.chkArNoUnverifiedAudio_CheckedChanged); // // labelFixWhenConfidence // @@ -462,12 +382,12 @@ namespace JDP { // // numFixWhenPercent // + resources.ApplyResources(this.numFixWhenPercent, "numFixWhenPercent"); this.numFixWhenPercent.Increment = new decimal(new int[] { 5, 0, 0, 0}); - resources.ApplyResources(this.numFixWhenPercent, "numFixWhenPercent"); this.numFixWhenPercent.Minimum = new decimal(new int[] { 1, 0, @@ -532,6 +452,13 @@ namespace JDP { this.toolTip1.SetToolTip(this.chkHDCDLW16, resources.GetString("chkHDCDLW16.ToolTip")); this.chkHDCDLW16.UseVisualStyleBackColor = true; // + // chkEmbedLog + // + resources.ApplyResources(this.chkEmbedLog, "chkEmbedLog"); + this.chkEmbedLog.Name = "chkEmbedLog"; + this.toolTip1.SetToolTip(this.chkEmbedLog, resources.GetString("chkEmbedLog.ToolTip")); + this.chkEmbedLog.UseVisualStyleBackColor = true; + // // grpAudioFilenames // this.grpAudioFilenames.Controls.Add(this.chkFilenamesANSISafe); @@ -597,76 +524,182 @@ namespace JDP { resources.ApplyResources(this.txtSingleFilenameFormat, "txtSingleFilenameFormat"); this.txtSingleFilenameFormat.Name = "txtSingleFilenameFormat"; // - // rbAPEinsane - // - resources.ApplyResources(this.rbAPEinsane, "rbAPEinsane"); - this.rbAPEinsane.Name = "rbAPEinsane"; - this.rbAPEinsane.TabStop = true; - this.rbAPEinsane.UseVisualStyleBackColor = true; - // - // rbAPEextrahigh - // - resources.ApplyResources(this.rbAPEextrahigh, "rbAPEextrahigh"); - this.rbAPEextrahigh.Name = "rbAPEextrahigh"; - this.rbAPEextrahigh.TabStop = true; - this.rbAPEextrahigh.UseVisualStyleBackColor = true; - // - // rbAPEhigh - // - resources.ApplyResources(this.rbAPEhigh, "rbAPEhigh"); - this.rbAPEhigh.Name = "rbAPEhigh"; - this.rbAPEhigh.TabStop = true; - this.rbAPEhigh.UseVisualStyleBackColor = true; - // - // rbAPEnormal - // - resources.ApplyResources(this.rbAPEnormal, "rbAPEnormal"); - this.rbAPEnormal.Name = "rbAPEnormal"; - this.rbAPEnormal.TabStop = true; - this.rbAPEnormal.UseVisualStyleBackColor = true; - // - // rbAPEfast - // - resources.ApplyResources(this.rbAPEfast, "rbAPEfast"); - this.rbAPEfast.Name = "rbAPEfast"; - this.rbAPEfast.TabStop = true; - this.rbAPEfast.UseVisualStyleBackColor = true; - // // tabControl1 // resources.ApplyResources(this.tabControl1, "tabControl1"); this.tabControl1.Controls.Add(this.tabPage1); + this.tabControl1.Controls.Add(this.tabPage6); this.tabControl1.Controls.Add(this.tabPage2); this.tabControl1.Controls.Add(this.tabPage3); + this.tabControl1.Controls.Add(this.tabPage10); + this.tabControl1.Controls.Add(this.tabPage11); this.tabControl1.Controls.Add(this.tabPage4); + this.tabControl1.Controls.Add(this.tabPage5); this.tabControl1.HotTrack = true; this.tabControl1.Multiline = true; this.tabControl1.Name = "tabControl1"; this.tabControl1.SelectedIndex = 0; + this.tabControl1.Deselecting += new System.Windows.Forms.TabControlCancelEventHandler(this.tabControl1_Deselecting); // // tabPage1 // - this.tabPage1.BackColor = System.Drawing.Color.Transparent; + this.tabPage1.BackColor = System.Drawing.SystemColors.Control; this.tabPage1.Controls.Add(this.grpGeneral); this.tabPage1.Controls.Add(this.grpAudioFilenames); resources.ApplyResources(this.tabPage1, "tabPage1"); this.tabPage1.Name = "tabPage1"; // + // tabPage6 + // + this.tabPage6.BackColor = System.Drawing.SystemColors.Control; + this.tabPage6.Controls.Add(this.groupBoxAlbumArt); + this.tabPage6.Controls.Add(this.groupBoxTagging); + resources.ApplyResources(this.tabPage6, "tabPage6"); + this.tabPage6.Name = "tabPage6"; + // + // groupBoxTagging + // + this.groupBoxTagging.Controls.Add(this.chkExtractLog); + this.groupBoxTagging.Controls.Add(this.checkBoxCopyBasicTags); + this.groupBoxTagging.Controls.Add(this.checkBoxWriteCUETags); + this.groupBoxTagging.Controls.Add(this.checkBoxCopyUnknownTags); + this.groupBoxTagging.Controls.Add(this.chkOverwriteTags); + this.groupBoxTagging.Controls.Add(this.chkFillUpCUE); + this.groupBoxTagging.Controls.Add(this.chkEmbedLog); + resources.ApplyResources(this.groupBoxTagging, "groupBoxTagging"); + this.groupBoxTagging.Name = "groupBoxTagging"; + this.groupBoxTagging.TabStop = false; + // + // checkBoxEmbedAlbumArt + // + resources.ApplyResources(this.checkBoxEmbedAlbumArt, "checkBoxEmbedAlbumArt"); + this.checkBoxEmbedAlbumArt.Name = "checkBoxEmbedAlbumArt"; + this.checkBoxEmbedAlbumArt.UseVisualStyleBackColor = true; + // + // checkBoxCopyBasicTags + // + resources.ApplyResources(this.checkBoxCopyBasicTags, "checkBoxCopyBasicTags"); + this.checkBoxCopyBasicTags.Name = "checkBoxCopyBasicTags"; + this.checkBoxCopyBasicTags.UseVisualStyleBackColor = true; + // + // checkBoxCopyAlbumArt + // + resources.ApplyResources(this.checkBoxCopyAlbumArt, "checkBoxCopyAlbumArt"); + this.checkBoxCopyAlbumArt.Name = "checkBoxCopyAlbumArt"; + this.checkBoxCopyAlbumArt.UseVisualStyleBackColor = true; + // + // checkBoxWriteCUETags + // + resources.ApplyResources(this.checkBoxWriteCUETags, "checkBoxWriteCUETags"); + this.checkBoxWriteCUETags.Name = "checkBoxWriteCUETags"; + this.checkBoxWriteCUETags.UseVisualStyleBackColor = true; + // + // checkBoxCopyUnknownTags + // + resources.ApplyResources(this.checkBoxCopyUnknownTags, "checkBoxCopyUnknownTags"); + this.checkBoxCopyUnknownTags.Name = "checkBoxCopyUnknownTags"; + this.checkBoxCopyUnknownTags.UseVisualStyleBackColor = true; + // + // chkOverwriteTags + // + resources.ApplyResources(this.chkOverwriteTags, "chkOverwriteTags"); + this.chkOverwriteTags.Name = "chkOverwriteTags"; + this.chkOverwriteTags.UseVisualStyleBackColor = true; + // + // chkFillUpCUE + // + resources.ApplyResources(this.chkFillUpCUE, "chkFillUpCUE"); + this.chkFillUpCUE.Name = "chkFillUpCUE"; + this.chkFillUpCUE.UseVisualStyleBackColor = true; + // // tabPage2 // this.tabPage2.BackColor = System.Drawing.SystemColors.Control; - this.tabPage2.Controls.Add(this.groupBox3); + this.tabPage2.Controls.Add(this.groupBoxARLog); + this.tabPage2.Controls.Add(this.groupBox5); + this.tabPage2.Controls.Add(this.groupBox4); + this.tabPage2.Controls.Add(this.groupBoxVerify); this.tabPage2.Controls.Add(this.groupBox1); resources.ApplyResources(this.tabPage2, "tabPage2"); this.tabPage2.Name = "tabPage2"; // - // groupBox3 + // groupBoxARLog // - this.groupBox3.Controls.Add(this.chkWriteARLogOnVerify); - this.groupBox3.Controls.Add(this.chkWriteARTagsOnVerify); - resources.ApplyResources(this.groupBox3, "groupBox3"); - this.groupBox3.Name = "groupBox3"; - this.groupBox3.TabStop = false; + this.groupBoxARLog.Controls.Add(this.textBoxARLogExtension); + this.groupBoxARLog.Controls.Add(this.labelLogFileExtension); + this.groupBoxARLog.Controls.Add(this.checkBoxARLogVerbose); + resources.ApplyResources(this.groupBoxARLog, "groupBoxARLog"); + this.groupBoxARLog.Name = "groupBoxARLog"; + this.groupBoxARLog.TabStop = false; + // + // textBoxARLogExtension + // + resources.ApplyResources(this.textBoxARLogExtension, "textBoxARLogExtension"); + this.textBoxARLogExtension.Name = "textBoxARLogExtension"; + // + // labelLogFileExtension + // + resources.ApplyResources(this.labelLogFileExtension, "labelLogFileExtension"); + this.labelLogFileExtension.Name = "labelLogFileExtension"; + // + // checkBoxARLogVerbose + // + resources.ApplyResources(this.checkBoxARLogVerbose, "checkBoxARLogVerbose"); + this.checkBoxARLogVerbose.Name = "checkBoxARLogVerbose"; + this.checkBoxARLogVerbose.UseVisualStyleBackColor = true; + // + // groupBox5 + // + this.groupBox5.Controls.Add(this.label2); + this.groupBox5.Controls.Add(this.chkEncodeWhenZeroOffset); + this.groupBox5.Controls.Add(this.numEncodeWhenConfidence); + this.groupBox5.Controls.Add(this.labelEncodeWhenConfidence); + this.groupBox5.Controls.Add(this.numEncodeWhenPercent); + resources.ApplyResources(this.groupBox5, "groupBox5"); + this.groupBox5.Name = "groupBox5"; + this.groupBox5.TabStop = false; + // + // label2 + // + resources.ApplyResources(this.label2, "label2"); + this.label2.Name = "label2"; + // + // groupBox4 + // + this.groupBox4.Controls.Add(this.checkBoxFixToNearest); + this.groupBox4.Controls.Add(this.label3); + this.groupBox4.Controls.Add(this.labelFixWhenConfidence); + this.groupBox4.Controls.Add(this.numFixWhenConfidence); + this.groupBox4.Controls.Add(this.numFixWhenPercent); + resources.ApplyResources(this.groupBox4, "groupBox4"); + this.groupBox4.Name = "groupBox4"; + this.groupBox4.TabStop = false; + // + // checkBoxFixToNearest + // + resources.ApplyResources(this.checkBoxFixToNearest, "checkBoxFixToNearest"); + this.checkBoxFixToNearest.Name = "checkBoxFixToNearest"; + this.checkBoxFixToNearest.UseVisualStyleBackColor = true; + // + // label3 + // + resources.ApplyResources(this.label3, "label3"); + this.label3.Name = "label3"; + // + // groupBoxVerify + // + this.groupBoxVerify.Controls.Add(this.checkBoxARVerifyUseSourceFolder); + this.groupBoxVerify.Controls.Add(this.chkWriteARLogOnVerify); + this.groupBoxVerify.Controls.Add(this.chkWriteARTagsOnVerify); + resources.ApplyResources(this.groupBoxVerify, "groupBoxVerify"); + this.groupBoxVerify.Name = "groupBoxVerify"; + this.groupBoxVerify.TabStop = false; + // + // checkBoxARVerifyUseSourceFolder + // + resources.ApplyResources(this.checkBoxARVerifyUseSourceFolder, "checkBoxARVerifyUseSourceFolder"); + this.checkBoxARVerifyUseSourceFolder.Name = "checkBoxARVerifyUseSourceFolder"; + this.checkBoxARVerifyUseSourceFolder.UseVisualStyleBackColor = true; // // chkWriteARLogOnVerify // @@ -679,64 +712,459 @@ namespace JDP { // tabPage3 // this.tabPage3.BackColor = System.Drawing.SystemColors.Control; - this.tabPage3.Controls.Add(this.tabControl2); + this.tabPage3.Controls.Add(this.groupBoxFormat); + this.tabPage3.Controls.Add(this.listViewFormats); resources.ApplyResources(this.tabPage3, "tabPage3"); this.tabPage3.Name = "tabPage3"; // - // tabControl2 + // groupBoxFormat // - this.tabControl2.Controls.Add(this.tabPage5); - this.tabControl2.Controls.Add(this.tabPage6); - this.tabControl2.Controls.Add(this.tabPage7); - this.tabControl2.Controls.Add(this.tabPage8); - this.tabControl2.Controls.Add(this.tabPage9); - this.tabControl2.ImageList = this.imageList1; - resources.ApplyResources(this.tabControl2, "tabControl2"); - this.tabControl2.Multiline = true; - this.tabControl2.Name = "tabControl2"; - this.tabControl2.SelectedIndex = 0; + this.groupBoxFormat.Controls.Add(this.comboFormatLossyEncoder); + this.groupBoxFormat.Controls.Add(this.labelFormatLossyEncoder); + this.groupBoxFormat.Controls.Add(this.checkBoxFormatAllowLossy); + this.groupBoxFormat.Controls.Add(this.comboFormatLosslessEncoder); + this.groupBoxFormat.Controls.Add(this.checkBoxFormatSupportsLossyWAV); + this.groupBoxFormat.Controls.Add(this.labelFormatLosslessEncoder); + this.groupBoxFormat.Controls.Add(this.checkBoxFormatEmbedCUESheet); + this.groupBoxFormat.Controls.Add(this.comboFormatDecoder); + this.groupBoxFormat.Controls.Add(this.checkBoxFormatAllowLossless); + this.groupBoxFormat.Controls.Add(this.labelFormatDefaultDecoder); + this.groupBoxFormat.Controls.Add(this.labelFormatTagger); + this.groupBoxFormat.Controls.Add(this.comboBoxFormatTagger); + resources.ApplyResources(this.groupBoxFormat, "groupBoxFormat"); + this.groupBoxFormat.Name = "groupBoxFormat"; + this.groupBoxFormat.TabStop = false; // - // tabPage5 + // comboFormatLossyEncoder // - this.tabPage5.BackColor = System.Drawing.Color.Transparent; - this.tabPage5.Controls.Add(this.numericFLACCompressionLevel); - this.tabPage5.Controls.Add(this.lblFLACCompressionLevel); - this.tabPage5.Controls.Add(this.chkFLACVerify); - resources.ApplyResources(this.tabPage5, "tabPage5"); - this.tabPage5.Name = "tabPage5"; - this.tabPage5.UseVisualStyleBackColor = true; + this.comboFormatLossyEncoder.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboFormatLossyEncoder.FormattingEnabled = true; + resources.ApplyResources(this.comboFormatLossyEncoder, "comboFormatLossyEncoder"); + this.comboFormatLossyEncoder.Name = "comboFormatLossyEncoder"; // - // tabPage6 + // labelFormatLossyEncoder // - this.tabPage6.Controls.Add(this.chkWVStoreMD5); - this.tabPage6.Controls.Add(this.numWVExtraMode); - this.tabPage6.Controls.Add(this.rbWVFast); - this.tabPage6.Controls.Add(this.chkWVExtraMode); - this.tabPage6.Controls.Add(this.rbWVNormal); - this.tabPage6.Controls.Add(this.rbWVVeryHigh); - this.tabPage6.Controls.Add(this.rbWVHigh); - resources.ApplyResources(this.tabPage6, "tabPage6"); - this.tabPage6.Name = "tabPage6"; - this.tabPage6.UseVisualStyleBackColor = true; + resources.ApplyResources(this.labelFormatLossyEncoder, "labelFormatLossyEncoder"); + this.labelFormatLossyEncoder.Name = "labelFormatLossyEncoder"; // - // tabPage7 + // checkBoxFormatAllowLossy // - this.tabPage7.Controls.Add(this.rbAPEinsane); - this.tabPage7.Controls.Add(this.rbAPEextrahigh); - this.tabPage7.Controls.Add(this.rbAPEfast); - this.tabPage7.Controls.Add(this.rbAPEhigh); - this.tabPage7.Controls.Add(this.rbAPEnormal); - resources.ApplyResources(this.tabPage7, "tabPage7"); - this.tabPage7.Name = "tabPage7"; - this.tabPage7.UseVisualStyleBackColor = true; + resources.ApplyResources(this.checkBoxFormatAllowLossy, "checkBoxFormatAllowLossy"); + this.checkBoxFormatAllowLossy.Name = "checkBoxFormatAllowLossy"; + this.checkBoxFormatAllowLossy.UseVisualStyleBackColor = true; // - // tabPage8 + // comboFormatLosslessEncoder // - this.tabPage8.Controls.Add(this.label1); - this.tabPage8.Controls.Add(this.numericLossyWAVQuality); - resources.ApplyResources(this.tabPage8, "tabPage8"); - this.tabPage8.Name = "tabPage8"; - this.tabPage8.UseVisualStyleBackColor = true; + this.comboFormatLosslessEncoder.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboFormatLosslessEncoder.FormattingEnabled = true; + resources.ApplyResources(this.comboFormatLosslessEncoder, "comboFormatLosslessEncoder"); + this.comboFormatLosslessEncoder.Name = "comboFormatLosslessEncoder"; + // + // checkBoxFormatSupportsLossyWAV + // + resources.ApplyResources(this.checkBoxFormatSupportsLossyWAV, "checkBoxFormatSupportsLossyWAV"); + this.checkBoxFormatSupportsLossyWAV.Name = "checkBoxFormatSupportsLossyWAV"; + this.checkBoxFormatSupportsLossyWAV.UseVisualStyleBackColor = true; + // + // labelFormatLosslessEncoder + // + resources.ApplyResources(this.labelFormatLosslessEncoder, "labelFormatLosslessEncoder"); + this.labelFormatLosslessEncoder.Name = "labelFormatLosslessEncoder"; + // + // checkBoxFormatEmbedCUESheet + // + resources.ApplyResources(this.checkBoxFormatEmbedCUESheet, "checkBoxFormatEmbedCUESheet"); + this.checkBoxFormatEmbedCUESheet.Name = "checkBoxFormatEmbedCUESheet"; + this.checkBoxFormatEmbedCUESheet.UseVisualStyleBackColor = true; + // + // comboFormatDecoder + // + this.comboFormatDecoder.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboFormatDecoder.FormattingEnabled = true; + resources.ApplyResources(this.comboFormatDecoder, "comboFormatDecoder"); + this.comboFormatDecoder.Name = "comboFormatDecoder"; + // + // checkBoxFormatAllowLossless + // + resources.ApplyResources(this.checkBoxFormatAllowLossless, "checkBoxFormatAllowLossless"); + this.checkBoxFormatAllowLossless.Name = "checkBoxFormatAllowLossless"; + this.checkBoxFormatAllowLossless.UseVisualStyleBackColor = true; + // + // labelFormatDefaultDecoder + // + resources.ApplyResources(this.labelFormatDefaultDecoder, "labelFormatDefaultDecoder"); + this.labelFormatDefaultDecoder.Name = "labelFormatDefaultDecoder"; + // + // labelFormatTagger + // + resources.ApplyResources(this.labelFormatTagger, "labelFormatTagger"); + this.labelFormatTagger.Name = "labelFormatTagger"; + // + // comboBoxFormatTagger + // + this.comboBoxFormatTagger.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboBoxFormatTagger.FormattingEnabled = true; + resources.ApplyResources(this.comboBoxFormatTagger, "comboBoxFormatTagger"); + this.comboBoxFormatTagger.Name = "comboBoxFormatTagger"; + // + // listViewFormats + // + this.listViewFormats.BackColor = System.Drawing.SystemColors.Control; + this.listViewFormats.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.listViewFormats.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnHeader1}); + this.listViewFormats.FullRowSelect = true; + this.listViewFormats.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None; + this.listViewFormats.HideSelection = false; + this.listViewFormats.LabelEdit = true; + resources.ApplyResources(this.listViewFormats, "listViewFormats"); + this.listViewFormats.MultiSelect = false; + this.listViewFormats.Name = "listViewFormats"; + this.listViewFormats.UseCompatibleStateImageBehavior = false; + this.listViewFormats.View = System.Windows.Forms.View.Details; + this.listViewFormats.AfterLabelEdit += new System.Windows.Forms.LabelEditEventHandler(this.listViewFormats_AfterLabelEdit); + this.listViewFormats.ItemSelectionChanged += new System.Windows.Forms.ListViewItemSelectionChangedEventHandler(this.listViewFormats_ItemSelectionChanged); + this.listViewFormats.BeforeLabelEdit += new System.Windows.Forms.LabelEditEventHandler(this.listViewFormats_BeforeLabelEdit); + this.listViewFormats.KeyDown += new System.Windows.Forms.KeyEventHandler(this.listViewFormats_KeyDown); + // + // columnHeader1 + // + resources.ApplyResources(this.columnHeader1, "columnHeader1"); + // + // tabPage10 + // + this.tabPage10.BackColor = System.Drawing.SystemColors.Control; + this.tabPage10.Controls.Add(this.groupBoxExternalEncoder); + this.tabPage10.Controls.Add(this.comboBoxEncoderExtension); + this.tabPage10.Controls.Add(this.listViewEncoders); + this.tabPage10.Controls.Add(this.groupBoxLibMAC_SDK); + this.tabPage10.Controls.Add(this.groupBoxLibWavpack); + this.tabPage10.Controls.Add(this.groupBoxLibFLAC); + this.tabPage10.Controls.Add(this.labelEncoderExtension); + resources.ApplyResources(this.tabPage10, "tabPage10"); + this.tabPage10.Name = "tabPage10"; + // + // groupBoxExternalEncoder + // + resources.ApplyResources(this.groupBoxExternalEncoder, "groupBoxExternalEncoder"); + this.groupBoxExternalEncoder.Controls.Add(this.checkBoxEncoderLossless); + this.groupBoxExternalEncoder.Controls.Add(this.textBoxEncoderPath); + this.groupBoxExternalEncoder.Controls.Add(this.textBoxEncoderParameters); + this.groupBoxExternalEncoder.Controls.Add(this.labelEncoderPath); + this.groupBoxExternalEncoder.Controls.Add(this.labelEncoderParameters); + this.groupBoxExternalEncoder.Name = "groupBoxExternalEncoder"; + this.groupBoxExternalEncoder.TabStop = false; + // + // checkBoxEncoderLossless + // + resources.ApplyResources(this.checkBoxEncoderLossless, "checkBoxEncoderLossless"); + this.checkBoxEncoderLossless.Name = "checkBoxEncoderLossless"; + this.checkBoxEncoderLossless.UseVisualStyleBackColor = true; + // + // textBoxEncoderPath + // + resources.ApplyResources(this.textBoxEncoderPath, "textBoxEncoderPath"); + this.textBoxEncoderPath.Name = "textBoxEncoderPath"; + // + // textBoxEncoderParameters + // + resources.ApplyResources(this.textBoxEncoderParameters, "textBoxEncoderParameters"); + this.textBoxEncoderParameters.Name = "textBoxEncoderParameters"; + // + // labelEncoderPath + // + resources.ApplyResources(this.labelEncoderPath, "labelEncoderPath"); + this.labelEncoderPath.Name = "labelEncoderPath"; + // + // labelEncoderParameters + // + resources.ApplyResources(this.labelEncoderParameters, "labelEncoderParameters"); + this.labelEncoderParameters.Name = "labelEncoderParameters"; + // + // comboBoxEncoderExtension + // + this.comboBoxEncoderExtension.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboBoxEncoderExtension.FormattingEnabled = true; + resources.ApplyResources(this.comboBoxEncoderExtension, "comboBoxEncoderExtension"); + this.comboBoxEncoderExtension.Name = "comboBoxEncoderExtension"; + this.comboBoxEncoderExtension.SelectedIndexChanged += new System.EventHandler(this.comboBoxEncoderExtension_SelectedIndexChanged); + // + // listViewEncoders + // + this.listViewEncoders.BackColor = System.Drawing.SystemColors.Control; + this.listViewEncoders.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.listViewEncoders.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnHeader3}); + this.listViewEncoders.FullRowSelect = true; + this.listViewEncoders.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None; + this.listViewEncoders.HideSelection = false; + this.listViewEncoders.LabelEdit = true; + resources.ApplyResources(this.listViewEncoders, "listViewEncoders"); + this.listViewEncoders.MultiSelect = false; + this.listViewEncoders.Name = "listViewEncoders"; + this.listViewEncoders.UseCompatibleStateImageBehavior = false; + this.listViewEncoders.View = System.Windows.Forms.View.Details; + this.listViewEncoders.AfterLabelEdit += new System.Windows.Forms.LabelEditEventHandler(this.listViewEncoders_AfterLabelEdit); + this.listViewEncoders.ItemSelectionChanged += new System.Windows.Forms.ListViewItemSelectionChangedEventHandler(this.listViewEncoders_ItemSelectionChanged); + this.listViewEncoders.BeforeLabelEdit += new System.Windows.Forms.LabelEditEventHandler(this.listViewEncoders_BeforeLabelEdit); + this.listViewEncoders.KeyDown += new System.Windows.Forms.KeyEventHandler(this.listViewEncoders_KeyDown); + // + // columnHeader3 + // + resources.ApplyResources(this.columnHeader3, "columnHeader3"); + // + // groupBoxLibMAC_SDK + // + this.groupBoxLibMAC_SDK.Controls.Add(this.rbAPEinsane); + this.groupBoxLibMAC_SDK.Controls.Add(this.rbAPEfast); + this.groupBoxLibMAC_SDK.Controls.Add(this.rbAPEextrahigh); + this.groupBoxLibMAC_SDK.Controls.Add(this.rbAPEnormal); + this.groupBoxLibMAC_SDK.Controls.Add(this.rbAPEhigh); + resources.ApplyResources(this.groupBoxLibMAC_SDK, "groupBoxLibMAC_SDK"); + this.groupBoxLibMAC_SDK.Name = "groupBoxLibMAC_SDK"; + this.groupBoxLibMAC_SDK.TabStop = false; + // + // rbAPEinsane + // + resources.ApplyResources(this.rbAPEinsane, "rbAPEinsane"); + this.rbAPEinsane.Name = "rbAPEinsane"; + this.rbAPEinsane.TabStop = true; + this.rbAPEinsane.UseVisualStyleBackColor = true; + // + // rbAPEfast + // + resources.ApplyResources(this.rbAPEfast, "rbAPEfast"); + this.rbAPEfast.Name = "rbAPEfast"; + this.rbAPEfast.TabStop = true; + this.rbAPEfast.UseVisualStyleBackColor = true; + // + // rbAPEextrahigh + // + resources.ApplyResources(this.rbAPEextrahigh, "rbAPEextrahigh"); + this.rbAPEextrahigh.Name = "rbAPEextrahigh"; + this.rbAPEextrahigh.TabStop = true; + this.rbAPEextrahigh.UseVisualStyleBackColor = true; + // + // rbAPEnormal + // + resources.ApplyResources(this.rbAPEnormal, "rbAPEnormal"); + this.rbAPEnormal.Name = "rbAPEnormal"; + this.rbAPEnormal.TabStop = true; + this.rbAPEnormal.UseVisualStyleBackColor = true; + // + // rbAPEhigh + // + resources.ApplyResources(this.rbAPEhigh, "rbAPEhigh"); + this.rbAPEhigh.Name = "rbAPEhigh"; + this.rbAPEhigh.TabStop = true; + this.rbAPEhigh.UseVisualStyleBackColor = true; + // + // groupBoxLibWavpack + // + this.groupBoxLibWavpack.Controls.Add(this.chkWVStoreMD5); + this.groupBoxLibWavpack.Controls.Add(this.rbWVFast); + this.groupBoxLibWavpack.Controls.Add(this.numWVExtraMode); + this.groupBoxLibWavpack.Controls.Add(this.rbWVHigh); + this.groupBoxLibWavpack.Controls.Add(this.rbWVVeryHigh); + this.groupBoxLibWavpack.Controls.Add(this.chkWVExtraMode); + this.groupBoxLibWavpack.Controls.Add(this.rbWVNormal); + 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; + // + // rbWVFast + // + resources.ApplyResources(this.rbWVFast, "rbWVFast"); + this.rbWVFast.Name = "rbWVFast"; + this.rbWVFast.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}); + // + // rbWVHigh + // + resources.ApplyResources(this.rbWVHigh, "rbWVHigh"); + this.rbWVHigh.Name = "rbWVHigh"; + this.rbWVHigh.UseVisualStyleBackColor = true; + // + // rbWVVeryHigh + // + resources.ApplyResources(this.rbWVVeryHigh, "rbWVVeryHigh"); + this.rbWVVeryHigh.Name = "rbWVVeryHigh"; + this.rbWVVeryHigh.UseVisualStyleBackColor = true; + // + // chkWVExtraMode + // + resources.ApplyResources(this.chkWVExtraMode, "chkWVExtraMode"); + this.chkWVExtraMode.Name = "chkWVExtraMode"; + this.chkWVExtraMode.UseVisualStyleBackColor = true; + // + // rbWVNormal + // + resources.ApplyResources(this.rbWVNormal, "rbWVNormal"); + this.rbWVNormal.Checked = true; + this.rbWVNormal.Name = "rbWVNormal"; + this.rbWVNormal.TabStop = true; + this.rbWVNormal.UseVisualStyleBackColor = true; + // + // groupBoxLibFLAC + // + this.groupBoxLibFLAC.Controls.Add(this.lblFLACCompressionLevel); + this.groupBoxLibFLAC.Controls.Add(this.numericFLACCompressionLevel); + this.groupBoxLibFLAC.Controls.Add(this.chkFLACVerify); + resources.ApplyResources(this.groupBoxLibFLAC, "groupBoxLibFLAC"); + this.groupBoxLibFLAC.Name = "groupBoxLibFLAC"; + this.groupBoxLibFLAC.TabStop = false; + // + // lblFLACCompressionLevel + // + resources.ApplyResources(this.lblFLACCompressionLevel, "lblFLACCompressionLevel"); + this.lblFLACCompressionLevel.Name = "lblFLACCompressionLevel"; + // + // numericFLACCompressionLevel + // + resources.ApplyResources(this.numericFLACCompressionLevel, "numericFLACCompressionLevel"); + this.numericFLACCompressionLevel.Maximum = new decimal(new int[] { + 8, + 0, + 0, + 0}); + this.numericFLACCompressionLevel.Name = "numericFLACCompressionLevel"; + this.numericFLACCompressionLevel.Value = new decimal(new int[] { + 5, + 0, + 0, + 0}); + // + // chkFLACVerify + // + resources.ApplyResources(this.chkFLACVerify, "chkFLACVerify"); + this.chkFLACVerify.Name = "chkFLACVerify"; + this.chkFLACVerify.UseVisualStyleBackColor = true; + // + // labelEncoderExtension + // + resources.ApplyResources(this.labelEncoderExtension, "labelEncoderExtension"); + this.labelEncoderExtension.MinimumSize = new System.Drawing.Size(100, 16); + this.labelEncoderExtension.Name = "labelEncoderExtension"; + // + // tabPage11 + // + this.tabPage11.BackColor = System.Drawing.SystemColors.Control; + this.tabPage11.Controls.Add(this.comboBoxDecoderExtension); + this.tabPage11.Controls.Add(this.groupBoxExternalDecoder); + this.tabPage11.Controls.Add(this.listViewDecoders); + this.tabPage11.Controls.Add(this.labelDecoderExtension); + resources.ApplyResources(this.tabPage11, "tabPage11"); + this.tabPage11.Name = "tabPage11"; + // + // comboBoxDecoderExtension + // + this.comboBoxDecoderExtension.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboBoxDecoderExtension.FormattingEnabled = true; + resources.ApplyResources(this.comboBoxDecoderExtension, "comboBoxDecoderExtension"); + this.comboBoxDecoderExtension.Name = "comboBoxDecoderExtension"; + this.comboBoxDecoderExtension.SelectedIndexChanged += new System.EventHandler(this.comboBoxDecoderExtension_SelectedIndexChanged); + // + // groupBoxExternalDecoder + // + this.groupBoxExternalDecoder.Controls.Add(this.textBoxDecoderPath); + this.groupBoxExternalDecoder.Controls.Add(this.labelDecoderPath); + this.groupBoxExternalDecoder.Controls.Add(this.labelDecoderParameters); + this.groupBoxExternalDecoder.Controls.Add(this.textBoxDecoderParameters); + resources.ApplyResources(this.groupBoxExternalDecoder, "groupBoxExternalDecoder"); + this.groupBoxExternalDecoder.Name = "groupBoxExternalDecoder"; + this.groupBoxExternalDecoder.TabStop = false; + // + // textBoxDecoderPath + // + resources.ApplyResources(this.textBoxDecoderPath, "textBoxDecoderPath"); + this.textBoxDecoderPath.Name = "textBoxDecoderPath"; + // + // labelDecoderPath + // + resources.ApplyResources(this.labelDecoderPath, "labelDecoderPath"); + this.labelDecoderPath.Name = "labelDecoderPath"; + // + // labelDecoderParameters + // + resources.ApplyResources(this.labelDecoderParameters, "labelDecoderParameters"); + this.labelDecoderParameters.Name = "labelDecoderParameters"; + // + // textBoxDecoderParameters + // + resources.ApplyResources(this.textBoxDecoderParameters, "textBoxDecoderParameters"); + this.textBoxDecoderParameters.Name = "textBoxDecoderParameters"; + // + // listViewDecoders + // + this.listViewDecoders.BackColor = System.Drawing.SystemColors.Control; + this.listViewDecoders.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.listViewDecoders.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnHeader4}); + this.listViewDecoders.FullRowSelect = true; + this.listViewDecoders.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None; + this.listViewDecoders.HideSelection = false; + this.listViewDecoders.LabelEdit = true; + resources.ApplyResources(this.listViewDecoders, "listViewDecoders"); + this.listViewDecoders.MultiSelect = false; + this.listViewDecoders.Name = "listViewDecoders"; + this.listViewDecoders.UseCompatibleStateImageBehavior = false; + this.listViewDecoders.View = System.Windows.Forms.View.Details; + this.listViewDecoders.AfterLabelEdit += new System.Windows.Forms.LabelEditEventHandler(this.listViewDecoders_AfterLabelEdit); + this.listViewDecoders.ItemSelectionChanged += new System.Windows.Forms.ListViewItemSelectionChangedEventHandler(this.listViewDecoders_ItemSelectionChanged); + this.listViewDecoders.BeforeLabelEdit += new System.Windows.Forms.LabelEditEventHandler(this.listViewDecoders_BeforeLabelEdit); + this.listViewDecoders.KeyDown += new System.Windows.Forms.KeyEventHandler(this.listViewDecoders_KeyDown); + // + // columnHeader4 + // + resources.ApplyResources(this.columnHeader4, "columnHeader4"); + // + // labelDecoderExtension + // + resources.ApplyResources(this.labelDecoderExtension, "labelDecoderExtension"); + this.labelDecoderExtension.MinimumSize = new System.Drawing.Size(100, 16); + this.labelDecoderExtension.Name = "labelDecoderExtension"; + // + // tabPage4 + // + this.tabPage4.BackColor = System.Drawing.SystemColors.Control; + this.tabPage4.Controls.Add(this.groupBox2); + this.tabPage4.Controls.Add(this.grpHDCD); + this.tabPage4.Controls.Add(this.chkHDCDDetect); + resources.ApplyResources(this.tabPage4, "tabPage4"); + this.tabPage4.Name = "tabPage4"; + // + // groupBox2 + // + this.groupBox2.Controls.Add(this.label1); + this.groupBox2.Controls.Add(this.numericLossyWAVQuality); + resources.ApplyResources(this.groupBox2, "groupBox2"); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.TabStop = false; // // label1 // @@ -757,101 +1185,6 @@ namespace JDP { 0, 0, 0}); - // - // tabPage9 - // - this.tabPage9.Controls.Add(this.chkUDC1ID3v2); - this.tabPage9.Controls.Add(this.chkUDC1APEv2); - this.tabPage9.Controls.Add(this.label6); - this.tabPage9.Controls.Add(this.label5); - this.tabPage9.Controls.Add(this.textUDC1EncParams); - this.tabPage9.Controls.Add(this.textUDC1Encoder); - this.tabPage9.Controls.Add(this.textUDC1Params); - this.tabPage9.Controls.Add(this.textUDC1Decoder); - this.tabPage9.Controls.Add(this.textUDC1Extension); - this.tabPage9.Controls.Add(this.label4); - this.tabPage9.Controls.Add(this.label3); - this.tabPage9.Controls.Add(this.label2); - resources.ApplyResources(this.tabPage9, "tabPage9"); - this.tabPage9.Name = "tabPage9"; - this.tabPage9.UseVisualStyleBackColor = true; - // - // chkUDC1ID3v2 - // - resources.ApplyResources(this.chkUDC1ID3v2, "chkUDC1ID3v2"); - this.chkUDC1ID3v2.Name = "chkUDC1ID3v2"; - this.chkUDC1ID3v2.UseVisualStyleBackColor = true; - // - // chkUDC1APEv2 - // - resources.ApplyResources(this.chkUDC1APEv2, "chkUDC1APEv2"); - this.chkUDC1APEv2.Name = "chkUDC1APEv2"; - this.chkUDC1APEv2.UseVisualStyleBackColor = true; - // - // label6 - // - resources.ApplyResources(this.label6, "label6"); - this.label6.Name = "label6"; - // - // label5 - // - resources.ApplyResources(this.label5, "label5"); - this.label5.Name = "label5"; - // - // textUDC1EncParams - // - resources.ApplyResources(this.textUDC1EncParams, "textUDC1EncParams"); - this.textUDC1EncParams.Name = "textUDC1EncParams"; - // - // textUDC1Encoder - // - resources.ApplyResources(this.textUDC1Encoder, "textUDC1Encoder"); - this.textUDC1Encoder.Name = "textUDC1Encoder"; - // - // textUDC1Params - // - resources.ApplyResources(this.textUDC1Params, "textUDC1Params"); - this.textUDC1Params.Name = "textUDC1Params"; - // - // textUDC1Decoder - // - resources.ApplyResources(this.textUDC1Decoder, "textUDC1Decoder"); - this.textUDC1Decoder.Name = "textUDC1Decoder"; - // - // textUDC1Extension - // - resources.ApplyResources(this.textUDC1Extension, "textUDC1Extension"); - this.textUDC1Extension.Name = "textUDC1Extension"; - // - // label4 - // - resources.ApplyResources(this.label4, "label4"); - this.label4.Name = "label4"; - // - // label3 - // - resources.ApplyResources(this.label3, "label3"); - this.label3.Name = "label3"; - // - // label2 - // - resources.ApplyResources(this.label2, "label2"); - this.label2.Name = "label2"; - // - // imageList1 - // - this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream"))); - this.imageList1.TransparentColor = System.Drawing.Color.Transparent; - this.imageList1.Images.SetKeyName(0, "flac"); - this.imageList1.Images.SetKeyName(1, "wv"); - // - // tabPage4 - // - this.tabPage4.BackColor = System.Drawing.SystemColors.Control; - this.tabPage4.Controls.Add(this.grpHDCD); - this.tabPage4.Controls.Add(this.chkHDCDDetect); - resources.ApplyResources(this.tabPage4, "tabPage4"); - this.tabPage4.Name = "tabPage4"; // // grpHDCD // @@ -870,6 +1203,144 @@ namespace JDP { this.chkHDCDDetect.UseVisualStyleBackColor = true; this.chkHDCDDetect.CheckedChanged += new System.EventHandler(this.chkHDCDDetect_CheckedChanged); // + // tabPage5 + // + this.tabPage5.BackColor = System.Drawing.SystemColors.Control; + this.tabPage5.Controls.Add(this.richTextBoxScript); + this.tabPage5.Controls.Add(this.buttonScriptCompile); + this.tabPage5.Controls.Add(this.groupBoxScriptConditions); + this.tabPage5.Controls.Add(this.listViewScripts); + resources.ApplyResources(this.tabPage5, "tabPage5"); + this.tabPage5.Name = "tabPage5"; + // + // richTextBoxScript + // + this.richTextBoxScript.AcceptsTab = true; + this.richTextBoxScript.DetectUrls = false; + resources.ApplyResources(this.richTextBoxScript, "richTextBoxScript"); + this.richTextBoxScript.Name = "richTextBoxScript"; + // + // buttonScriptCompile + // + resources.ApplyResources(this.buttonScriptCompile, "buttonScriptCompile"); + this.buttonScriptCompile.Name = "buttonScriptCompile"; + this.buttonScriptCompile.UseVisualStyleBackColor = true; + this.buttonScriptCompile.Click += new System.EventHandler(this.buttonScriptCompile_Click); + // + // groupBoxScriptConditions + // + this.groupBoxScriptConditions.Controls.Add(this.listViewScriptConditions); + resources.ApplyResources(this.groupBoxScriptConditions, "groupBoxScriptConditions"); + this.groupBoxScriptConditions.Name = "groupBoxScriptConditions"; + this.groupBoxScriptConditions.TabStop = false; + // + // listViewScriptConditions + // + this.listViewScriptConditions.BackColor = System.Drawing.SystemColors.Control; + this.listViewScriptConditions.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.listViewScriptConditions.CheckBoxes = true; + this.listViewScriptConditions.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnHeader6}); + this.listViewScriptConditions.FullRowSelect = true; + this.listViewScriptConditions.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None; + this.listViewScriptConditions.Items.AddRange(new System.Windows.Forms.ListViewItem[] { + ((System.Windows.Forms.ListViewItem)(resources.GetObject("listViewScriptConditions.Items"))), + ((System.Windows.Forms.ListViewItem)(resources.GetObject("listViewScriptConditions.Items1"))), + ((System.Windows.Forms.ListViewItem)(resources.GetObject("listViewScriptConditions.Items2")))}); + resources.ApplyResources(this.listViewScriptConditions, "listViewScriptConditions"); + this.listViewScriptConditions.MultiSelect = false; + this.listViewScriptConditions.Name = "listViewScriptConditions"; + this.listViewScriptConditions.UseCompatibleStateImageBehavior = false; + this.listViewScriptConditions.View = System.Windows.Forms.View.Details; + // + // columnHeader6 + // + resources.ApplyResources(this.columnHeader6, "columnHeader6"); + // + // listViewScripts + // + this.listViewScripts.BackColor = System.Drawing.SystemColors.Control; + this.listViewScripts.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.listViewScripts.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnHeader5}); + this.listViewScripts.FullRowSelect = true; + this.listViewScripts.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None; + this.listViewScripts.HideSelection = false; + this.listViewScripts.LabelEdit = true; + resources.ApplyResources(this.listViewScripts, "listViewScripts"); + this.listViewScripts.MultiSelect = false; + this.listViewScripts.Name = "listViewScripts"; + this.listViewScripts.UseCompatibleStateImageBehavior = false; + this.listViewScripts.View = System.Windows.Forms.View.Details; + this.listViewScripts.AfterLabelEdit += new System.Windows.Forms.LabelEditEventHandler(this.listViewScripts_AfterLabelEdit); + this.listViewScripts.ItemSelectionChanged += new System.Windows.Forms.ListViewItemSelectionChangedEventHandler(this.listViewScripts_ItemSelectionChanged); + this.listViewScripts.BeforeLabelEdit += new System.Windows.Forms.LabelEditEventHandler(this.listViewScripts_BeforeLabelEdit); + this.listViewScripts.KeyDown += new System.Windows.Forms.KeyEventHandler(this.listViewScripts_KeyDown); + // + // columnHeader5 + // + resources.ApplyResources(this.columnHeader5, "columnHeader5"); + // + // labelFormatDecoder + // + resources.ApplyResources(this.labelFormatDecoder, "labelFormatDecoder"); + this.labelFormatDecoder.Name = "labelFormatDecoder"; + // + // labelFormatEncoder + // + resources.ApplyResources(this.labelFormatEncoder, "labelFormatEncoder"); + this.labelFormatEncoder.Name = "labelFormatEncoder"; + // + // columnHeader2 + // + resources.ApplyResources(this.columnHeader2, "columnHeader2"); + // + // groupBoxAlbumArt + // + this.groupBoxAlbumArt.Controls.Add(this.labelAlbumArtMaximumResolution); + this.groupBoxAlbumArt.Controls.Add(this.numericUpDownMaxResolution); + this.groupBoxAlbumArt.Controls.Add(this.checkBoxEmbedAlbumArt); + this.groupBoxAlbumArt.Controls.Add(this.checkBoxCopyAlbumArt); + resources.ApplyResources(this.groupBoxAlbumArt, "groupBoxAlbumArt"); + this.groupBoxAlbumArt.Name = "groupBoxAlbumArt"; + this.groupBoxAlbumArt.TabStop = false; + // + // chkExtractLog + // + resources.ApplyResources(this.chkExtractLog, "chkExtractLog"); + this.chkExtractLog.Name = "chkExtractLog"; + this.chkExtractLog.UseVisualStyleBackColor = true; + // + // numericUpDownMaxResolution + // + this.numericUpDownMaxResolution.Increment = new decimal(new int[] { + 100, + 0, + 0, + 0}); + resources.ApplyResources(this.numericUpDownMaxResolution, "numericUpDownMaxResolution"); + this.numericUpDownMaxResolution.Maximum = new decimal(new int[] { + 10000, + 0, + 0, + 0}); + this.numericUpDownMaxResolution.Minimum = new decimal(new int[] { + 100, + 0, + 0, + 0}); + this.numericUpDownMaxResolution.Name = "numericUpDownMaxResolution"; + this.numericUpDownMaxResolution.Value = new decimal(new int[] { + 100, + 0, + 0, + 0}); + // + // labelAlbumArtMaximumResolution + // + resources.ApplyResources(this.labelAlbumArtMaximumResolution, "labelAlbumArtMaximumResolution"); + this.labelAlbumArtMaximumResolution.Name = "labelAlbumArtMaximumResolution"; + // // frmSettings // this.AcceptButton = this.btnOK; @@ -889,8 +1360,6 @@ namespace JDP { this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.frmSettings_FormClosing); this.grpGeneral.ResumeLayout(false); this.grpGeneral.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numericFLACCompressionLevel)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numWVExtraMode)).EndInit(); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.numEncodeWhenPercent)).EndInit(); @@ -901,26 +1370,49 @@ namespace JDP { this.grpAudioFilenames.PerformLayout(); this.tabControl1.ResumeLayout(false); this.tabPage1.ResumeLayout(false); - this.tabPage2.ResumeLayout(false); - this.groupBox3.ResumeLayout(false); - this.groupBox3.PerformLayout(); - this.tabPage3.ResumeLayout(false); - this.tabControl2.ResumeLayout(false); - this.tabPage5.ResumeLayout(false); - this.tabPage5.PerformLayout(); this.tabPage6.ResumeLayout(false); - this.tabPage6.PerformLayout(); - this.tabPage7.ResumeLayout(false); - this.tabPage7.PerformLayout(); - this.tabPage8.ResumeLayout(false); - this.tabPage8.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numericLossyWAVQuality)).EndInit(); - this.tabPage9.ResumeLayout(false); - this.tabPage9.PerformLayout(); + this.groupBoxTagging.ResumeLayout(false); + this.groupBoxTagging.PerformLayout(); + this.tabPage2.ResumeLayout(false); + this.groupBoxARLog.ResumeLayout(false); + this.groupBoxARLog.PerformLayout(); + this.groupBox5.ResumeLayout(false); + this.groupBox5.PerformLayout(); + this.groupBox4.ResumeLayout(false); + this.groupBox4.PerformLayout(); + this.groupBoxVerify.ResumeLayout(false); + this.groupBoxVerify.PerformLayout(); + this.tabPage3.ResumeLayout(false); + this.groupBoxFormat.ResumeLayout(false); + this.groupBoxFormat.PerformLayout(); + this.tabPage10.ResumeLayout(false); + this.tabPage10.PerformLayout(); + this.groupBoxExternalEncoder.ResumeLayout(false); + this.groupBoxExternalEncoder.PerformLayout(); + this.groupBoxLibMAC_SDK.ResumeLayout(false); + this.groupBoxLibMAC_SDK.PerformLayout(); + this.groupBoxLibWavpack.ResumeLayout(false); + this.groupBoxLibWavpack.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numWVExtraMode)).EndInit(); + this.groupBoxLibFLAC.ResumeLayout(false); + this.groupBoxLibFLAC.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericFLACCompressionLevel)).EndInit(); + this.tabPage11.ResumeLayout(false); + this.tabPage11.PerformLayout(); + this.groupBoxExternalDecoder.ResumeLayout(false); + this.groupBoxExternalDecoder.PerformLayout(); this.tabPage4.ResumeLayout(false); this.tabPage4.PerformLayout(); + this.groupBox2.ResumeLayout(false); + this.groupBox2.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericLossyWAVQuality)).EndInit(); this.grpHDCD.ResumeLayout(false); this.grpHDCD.PerformLayout(); + this.tabPage5.ResumeLayout(false); + this.groupBoxScriptConditions.ResumeLayout(false); + this.groupBoxAlbumArt.ResumeLayout(false); + this.groupBoxAlbumArt.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownMaxResolution)).EndInit(); this.ResumeLayout(false); } @@ -929,18 +1421,10 @@ namespace JDP { private System.Windows.Forms.GroupBox grpGeneral; private System.Windows.Forms.CheckBox chkPreserveHTOA; - private System.Windows.Forms.Label lblFLACCompressionLevel; - private System.Windows.Forms.CheckBox chkFLACVerify; private System.Windows.Forms.Button btnOK; - private System.Windows.Forms.RadioButton rbWVVeryHigh; - private System.Windows.Forms.RadioButton rbWVHigh; - private System.Windows.Forms.RadioButton rbWVNormal; - private System.Windows.Forms.RadioButton rbWVFast; - private System.Windows.Forms.CheckBox chkWVExtraMode; private System.Windows.Forms.CheckBox chkAutoCorrectFilenames; private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.CheckBox chkWriteArTagsOnConvert; - private System.Windows.Forms.NumericUpDown numericFLACCompressionLevel; private System.Windows.Forms.ToolTip toolTip1; private System.Windows.Forms.NumericUpDown numFixWhenPercent; private System.Windows.Forms.Label labelFixWhenConfidence; @@ -954,67 +1438,125 @@ namespace JDP { private System.Windows.Forms.Label lblTrackFilenameFormat; private System.Windows.Forms.Label lblSingleFilenameFormat; private System.Windows.Forms.TextBox txtSingleFilenameFormat; - private System.Windows.Forms.CheckBox chkArNoUnverifiedAudio; private System.Windows.Forms.CheckBox chkWriteArLogOnConvert; - private System.Windows.Forms.NumericUpDown numWVExtraMode; private System.Windows.Forms.Label labelEncodeWhenConfidence; private System.Windows.Forms.NumericUpDown numEncodeWhenConfidence; private System.Windows.Forms.NumericUpDown numEncodeWhenPercent; - private System.Windows.Forms.CheckBox chkArFixOffset; - private System.Windows.Forms.CheckBox chkEmbedLog; - private System.Windows.Forms.CheckBox chkFillUpCUE; private System.Windows.Forms.CheckBox chkFilenamesANSISafe; - private System.Windows.Forms.RadioButton rbAPEinsane; - private System.Windows.Forms.RadioButton rbAPEextrahigh; - private System.Windows.Forms.RadioButton rbAPEhigh; - private System.Windows.Forms.RadioButton rbAPEnormal; - private System.Windows.Forms.RadioButton rbAPEfast; private System.Windows.Forms.TabControl tabControl1; private System.Windows.Forms.TabPage tabPage1; private System.Windows.Forms.TabPage tabPage2; private System.Windows.Forms.TabPage tabPage3; - private System.Windows.Forms.GroupBox groupBox3; + private System.Windows.Forms.GroupBox groupBoxVerify; private System.Windows.Forms.CheckBox chkWriteARLogOnVerify; private System.Windows.Forms.CheckBox chkWriteARTagsOnVerify; private System.Windows.Forms.CheckBox chkEncodeWhenZeroOffset; private System.Windows.Forms.TabPage tabPage4; private System.Windows.Forms.CheckBox chkHDCDDecode; private System.Windows.Forms.CheckBox chkHDCDDetect; - private System.Windows.Forms.CheckBox chkWVStoreMD5; private System.Windows.Forms.GroupBox grpHDCD; private System.Windows.Forms.CheckBox chkHDCDStopLooking; private System.Windows.Forms.CheckBox chkCreateM3U; private System.Windows.Forms.CheckBox chkCreateCUEFileWhenEmbedded; private System.Windows.Forms.CheckBox chkTruncateExtra4206Samples; private System.Windows.Forms.CheckBox chkReducePriority; - private System.Windows.Forms.NumericUpDown numericLossyWAVQuality; - private System.Windows.Forms.Label label1; private System.Windows.Forms.CheckBox chkHDCDLW16; private System.Windows.Forms.CheckBox chkHDCD24bit; - private System.Windows.Forms.CheckBox chkExtractLog; - private System.Windows.Forms.CheckBox chkOverwriteTags; - private System.Windows.Forms.TabControl tabControl2; - private System.Windows.Forms.TabPage tabPage5; - private System.Windows.Forms.TabPage tabPage6; - private System.Windows.Forms.TabPage tabPage7; - private System.Windows.Forms.TabPage tabPage8; - private System.Windows.Forms.TabPage tabPage9; - private System.Windows.Forms.TextBox textUDC1Params; - private System.Windows.Forms.TextBox textUDC1Decoder; - private System.Windows.Forms.TextBox textUDC1Extension; - private System.Windows.Forms.Label label4; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.Label label2; - private System.Windows.Forms.Label label6; - private System.Windows.Forms.Label label5; - private System.Windows.Forms.TextBox textUDC1EncParams; - private System.Windows.Forms.TextBox textUDC1Encoder; - private System.Windows.Forms.CheckBox chkUDC1APEv2; - private System.Windows.Forms.CheckBox chkUDC1ID3v2; - private System.Windows.Forms.ImageList imageList1; - private System.Windows.Forms.CheckBox chkSingleInstance; + private System.Windows.Forms.CheckBox chkAllowMultipleInstances; 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.RadioButton rbAPEinsane; + private System.Windows.Forms.RadioButton rbAPEfast; + private System.Windows.Forms.RadioButton rbAPEextrahigh; + private System.Windows.Forms.RadioButton rbAPEnormal; + private System.Windows.Forms.RadioButton rbAPEhigh; + private System.Windows.Forms.GroupBox groupBoxLibWavpack; + private System.Windows.Forms.CheckBox chkWVStoreMD5; + private System.Windows.Forms.RadioButton rbWVFast; + private System.Windows.Forms.NumericUpDown numWVExtraMode; + private System.Windows.Forms.RadioButton rbWVHigh; + private System.Windows.Forms.RadioButton rbWVVeryHigh; + private System.Windows.Forms.CheckBox chkWVExtraMode; + private System.Windows.Forms.RadioButton rbWVNormal; + 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.Label lblFLACCompressionLevel; + private System.Windows.Forms.NumericUpDown numericFLACCompressionLevel; + private System.Windows.Forms.CheckBox chkFLACVerify; + private System.Windows.Forms.Label labelEncoderExtension; + private System.Windows.Forms.TabPage tabPage11; + private System.Windows.Forms.TextBox textBoxDecoderParameters; + private System.Windows.Forms.TextBox textBoxDecoderPath; + private System.Windows.Forms.Label labelDecoderParameters; + private System.Windows.Forms.Label labelDecoderPath; + private System.Windows.Forms.Label labelDecoderExtension; + private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.NumericUpDown numericLossyWAVQuality; + private System.Windows.Forms.ColumnHeader columnHeader2; + private System.Windows.Forms.Label labelFormatDefaultDecoder; + private System.Windows.Forms.Label labelFormatLosslessEncoder; + private System.Windows.Forms.ListView listViewFormats; + private System.Windows.Forms.ColumnHeader columnHeader1; + private System.Windows.Forms.ComboBox comboFormatDecoder; + private System.Windows.Forms.Label labelFormatDecoder; + private System.Windows.Forms.ComboBox comboFormatLosslessEncoder; + private System.Windows.Forms.Label labelFormatEncoder; + private System.Windows.Forms.ListView listViewEncoders; + private System.Windows.Forms.ColumnHeader columnHeader3; + private System.Windows.Forms.ListView listViewDecoders; + private System.Windows.Forms.ColumnHeader columnHeader4; + private System.Windows.Forms.ComboBox comboBoxEncoderExtension; + private System.Windows.Forms.GroupBox groupBoxExternalDecoder; + private System.Windows.Forms.ComboBox comboBoxDecoderExtension; + private System.Windows.Forms.Label labelFormatTagger; + private System.Windows.Forms.ComboBox comboBoxFormatTagger; + private System.Windows.Forms.CheckBox checkBoxFormatSupportsLossyWAV; + private System.Windows.Forms.CheckBox checkBoxFormatEmbedCUESheet; + private System.Windows.Forms.CheckBox checkBoxFormatAllowLossless; + private System.Windows.Forms.GroupBox groupBoxFormat; + private System.Windows.Forms.CheckBox checkBoxEncoderLossless; + private System.Windows.Forms.CheckBox checkBoxFormatAllowLossy; + private System.Windows.Forms.ComboBox comboFormatLossyEncoder; + private System.Windows.Forms.Label labelFormatLossyEncoder; + private System.Windows.Forms.TabPage tabPage5; + private System.Windows.Forms.GroupBox groupBoxScriptConditions; + private System.Windows.Forms.ListView listViewScripts; + private System.Windows.Forms.ColumnHeader columnHeader5; + private System.Windows.Forms.ListView listViewScriptConditions; + private System.Windows.Forms.ColumnHeader columnHeader6; + private System.Windows.Forms.Button buttonScriptCompile; + private System.Windows.Forms.RichTextBox richTextBoxScript; + private System.Windows.Forms.GroupBox groupBox4; + private System.Windows.Forms.GroupBox groupBox5; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.GroupBox groupBoxARLog; + private System.Windows.Forms.TextBox textBoxARLogExtension; + private System.Windows.Forms.Label labelLogFileExtension; + private System.Windows.Forms.CheckBox checkBoxARLogVerbose; + private System.Windows.Forms.CheckBox checkBoxARVerifyUseSourceFolder; + private System.Windows.Forms.TabPage tabPage6; + private System.Windows.Forms.GroupBox groupBoxTagging; + private System.Windows.Forms.CheckBox checkBoxCopyUnknownTags; + private System.Windows.Forms.CheckBox chkOverwriteTags; + private System.Windows.Forms.CheckBox chkFillUpCUE; + private System.Windows.Forms.CheckBox chkEmbedLog; + private System.Windows.Forms.CheckBox checkBoxWriteCUETags; + private System.Windows.Forms.CheckBox checkBoxCopyAlbumArt; + private System.Windows.Forms.CheckBox checkBoxCopyBasicTags; + private System.Windows.Forms.CheckBox checkBoxFixToNearest; + private System.Windows.Forms.CheckBox checkBoxEmbedAlbumArt; + private System.Windows.Forms.GroupBox groupBoxAlbumArt; + private System.Windows.Forms.Label labelAlbumArtMaximumResolution; + private System.Windows.Forms.NumericUpDown numericUpDownMaxResolution; + private System.Windows.Forms.CheckBox chkExtractLog; } } \ No newline at end of file diff --git a/CUETools/frmSettings.cs b/CUETools/frmSettings.cs index 346083f..453d48a 100644 --- a/CUETools/frmSettings.cs +++ b/CUETools/frmSettings.cs @@ -5,25 +5,40 @@ using System.Drawing; using System.Text; using System.Windows.Forms; using System.Globalization; +using System.IO; using System.Threading; using CUETools.Processor; +using CUEControls; namespace JDP { public partial class frmSettings : Form { bool _reducePriority; CUEConfig _config; + private ShellIconMgr m_icon_mgr; public frmSettings() { InitializeComponent(); } + public ShellIconMgr IconMgr + { + get + { + return m_icon_mgr; + } + set + { + m_icon_mgr = value; + } + } + private void frmSettings_Load(object sender, EventArgs e) { chkReducePriority.Checked = _reducePriority; chkPreserveHTOA.Checked = _config.preserveHTOA; chkAutoCorrectFilenames.Checked = _config.autoCorrectFilenames; numericFLACCompressionLevel.Value = _config.flacCompressionLevel; - numFixWhenConfidence.Value = _config.fixWhenConfidence; - numFixWhenPercent.Value = _config.fixWhenPercent; + numFixWhenConfidence.Value = _config.fixOffsetMinimumConfidence; + numFixWhenPercent.Value = _config.fixOffsetMinimumTracksPercent; numEncodeWhenConfidence.Value = _config.encodeWhenConfidence; numEncodeWhenPercent.Value = _config.encodeWhenPercent; chkEncodeWhenZeroOffset.Checked = _config.encodeWhenZeroOffset; @@ -53,8 +68,6 @@ namespace JDP { chkReplaceSpaces.Checked = _config.replaceSpaces; chkWriteArLogOnConvert.Checked = _config.writeArLogOnConvert; chkWriteARLogOnVerify.Checked = _config.writeArLogOnVerify; - chkArNoUnverifiedAudio.Checked = _config.noUnverifiedOutput; - chkArFixOffset.Checked = _config.fixOffset; chkEmbedLog.Checked = _config.embedLog; chkExtractLog.Checked = _config.extractLog; chkFillUpCUE.Checked = _config.fillUpCUE; @@ -69,15 +82,17 @@ namespace JDP { chkHDCDLW16.Checked = _config.decodeHDCDtoLW16; chkHDCD24bit.Checked = _config.decodeHDCDto24bit; chkOverwriteTags.Checked = _config.overwriteCUEData; - chkSingleInstance.Checked = _config.oneInstance; - - textUDC1Extension.Text = _config.udc1Extension; - textUDC1Decoder.Text = _config.udc1Decoder; - textUDC1Params.Text = _config.udc1Params; - textUDC1Encoder.Text = _config.udc1Encoder; - textUDC1EncParams.Text = _config.udc1EncParams; - chkUDC1APEv2.Checked = _config.udc1APEv2; - chkUDC1ID3v2.Checked = _config.udc1ID3v2; + chkAllowMultipleInstances.Checked = !_config.oneInstance; + checkBoxWriteCUETags.Checked = _config.writeBasicTagsFromCUEData; + checkBoxCopyBasicTags.Checked = _config.copyBasicTags; + checkBoxCopyUnknownTags.Checked = _config.copyUnknownTags; + checkBoxCopyAlbumArt.Checked = _config.copyAlbumArt; + checkBoxEmbedAlbumArt.Checked = _config.embedAlbumArt; + checkBoxARVerifyUseSourceFolder.Checked = _config.arLogToSourceFolder; + checkBoxARLogVerbose.Checked = _config.arLogVerbose; + checkBoxFixToNearest.Checked = _config.fixOffsetToNearest; + textBoxARLogExtension.Text = _config.arLogExtension; + numericUpDownMaxResolution.Value = _config.maxAlbumArtSize; string[] cultures = { "en-US", "de-DE", "ru-RU" }; foreach (string culture in cultures) @@ -96,9 +111,59 @@ namespace JDP { if (comboLanguage.SelectedItem == null) comboLanguage.SelectedItem = comboLanguage.Items[0]; + foreach (KeyValuePair encoder in _config.encoders) + { + ListViewItem item = new ListViewItem(encoder.Key); + item.Tag = encoder.Value; + listViewEncoders.Items.Add(item); + } + //listViewEncoders.Items[0].Selected = true; + foreach (KeyValuePair decoder in _config.decoders) + if (decoder.Value.path != null) + { + ListViewItem item = new ListViewItem(decoder.Key); + item.Tag = decoder.Value; + listViewDecoders.Items.Add(item); + } + //listViewDecoders.Items[0].Selected = true; + listViewFormats.SmallImageList = m_icon_mgr.ImageList; + labelEncoderExtension.ImageList = m_icon_mgr.ImageList; + labelDecoderExtension.ImageList = m_icon_mgr.ImageList; + foreach (KeyValuePair format in _config.formats) + { + ListViewItem item = new ListViewItem(format.Key, "." + format.Key); + item.Tag = format.Value; + listViewFormats.Items.Add(item); + comboBoxEncoderExtension.Items.Add(format.Key); + comboBoxDecoderExtension.Items.Add(format.Key); + } + //listViewFormats.Items[0].Selected = true; + comboBoxFormatTagger.Items.Add(CUEToolsTagger.TagLibSharp); + comboBoxFormatTagger.Items.Add(CUEToolsTagger.APEv2); + comboBoxFormatTagger.Items.Add(CUEToolsTagger.ID3v2); + foreach (KeyValuePair script in _config.scripts) + { + ListViewItem item = new ListViewItem(script.Key); + item.Tag = script.Value; + listViewScripts.Items.Add(item); + } + listViewScriptConditions.Items[0].Tag = CUEAction.Verify; + listViewScriptConditions.Items[1].Tag = CUEAction.VerifyAndConvert; + listViewScriptConditions.Items[2].Tag = CUEAction.Convert; + EnableDisable(); } + //private void DictionaryToListView(IDictionary<> dict, ListView view) + //{ + // foreach (KeyValuePair format in dict) + // { + // ListViewItem item = new ListViewItem(format.Key, format.Key); + // item.Tag = format.Value; + // listViewFormats.Items.Add(item); + // } + //} + private void frmSettings_FormClosing(object sender, FormClosingEventArgs e) { } @@ -119,13 +184,22 @@ namespace JDP { private void btnOK_Click(object sender, EventArgs e) { + if (listViewFormats.SelectedIndices.Count > 0) + listViewFormats.Items[listViewFormats.SelectedIndices[0]].Selected = false; + if (listViewEncoders.SelectedIndices.Count > 0) + listViewEncoders.Items[listViewEncoders.SelectedIndices[0]].Selected = false; + if (listViewDecoders.SelectedIndices.Count > 0) + listViewDecoders.Items[listViewDecoders.SelectedIndices[0]].Selected = false; + if (listViewScripts.SelectedItems.Count > 0) + listViewScripts.SelectedItems[0].Selected = false; + _reducePriority = chkReducePriority.Checked; _config.preserveHTOA = chkPreserveHTOA.Checked; _config.autoCorrectFilenames = chkAutoCorrectFilenames.Checked; _config.flacCompressionLevel = (uint)numericFLACCompressionLevel.Value; _config.lossyWAVQuality = (int)numericLossyWAVQuality.Value; - _config.fixWhenPercent = (uint)numFixWhenPercent.Value; - _config.fixWhenConfidence = (uint)numFixWhenConfidence.Value; + _config.fixOffsetMinimumTracksPercent = (uint)numFixWhenPercent.Value; + _config.fixOffsetMinimumConfidence = (uint)numFixWhenConfidence.Value; _config.encodeWhenPercent = (uint)numEncodeWhenPercent.Value; _config.encodeWhenConfidence = (uint)numEncodeWhenConfidence.Value; _config.encodeWhenZeroOffset = chkEncodeWhenZeroOffset.Checked; @@ -152,8 +226,6 @@ namespace JDP { _config.replaceSpaces = chkReplaceSpaces.Checked; _config.writeArLogOnConvert = chkWriteArLogOnConvert.Checked; _config.writeArLogOnVerify = chkWriteARLogOnVerify.Checked; - _config.noUnverifiedOutput = chkArNoUnverifiedAudio.Checked; - _config.fixOffset = chkArFixOffset.Checked; _config.embedLog = chkEmbedLog.Checked; _config.extractLog = chkExtractLog.Checked; _config.fillUpCUE = chkFillUpCUE.Checked; @@ -167,30 +239,24 @@ namespace JDP { _config.decodeHDCDtoLW16 = chkHDCDLW16.Checked; _config.decodeHDCDto24bit = chkHDCD24bit.Checked; _config.overwriteCUEData = chkOverwriteTags.Checked; - _config.oneInstance = chkSingleInstance.Checked; + _config.oneInstance = !chkAllowMultipleInstances.Checked; + _config.writeBasicTagsFromCUEData = checkBoxWriteCUETags.Checked ; + _config.copyBasicTags = checkBoxCopyBasicTags.Checked; + _config.copyUnknownTags = checkBoxCopyUnknownTags.Checked; + _config.copyAlbumArt = checkBoxCopyAlbumArt.Checked; + _config.embedAlbumArt = checkBoxEmbedAlbumArt.Checked; - _config.udc1Extension = textUDC1Extension.Text; - _config.udc1Decoder = textUDC1Decoder.Text; - _config.udc1Params = textUDC1Params.Text; - _config.udc1Encoder = textUDC1Encoder.Text; - _config.udc1EncParams = textUDC1EncParams.Text; - _config.udc1APEv2 = chkUDC1APEv2.Checked; - _config.udc1ID3v2 = chkUDC1ID3v2.Checked; + _config.arLogToSourceFolder = checkBoxARVerifyUseSourceFolder.Checked; + _config.arLogVerbose = checkBoxARLogVerbose.Checked; + _config.fixOffsetToNearest = checkBoxFixToNearest.Checked; + _config.arLogExtension = textBoxARLogExtension.Text; + _config.maxAlbumArtSize = (int) numericUpDownMaxResolution.Value; _config.language = ((CultureInfo)comboLanguage.SelectedItem).Name; } private void EnableDisable() { - numFixWhenConfidence.Enabled = - labelFixWhenConfidence.Enabled = - numFixWhenPercent.Enabled = chkArFixOffset.Checked; - - numEncodeWhenConfidence.Enabled = - labelEncodeWhenConfidence.Enabled = - numEncodeWhenPercent.Enabled = - chkEncodeWhenZeroOffset.Enabled = chkArNoUnverifiedAudio.Checked; - grpHDCD.Enabled = chkHDCDDetect.Checked; chkHDCDLW16.Enabled = chkHDCDDetect.Checked && chkHDCDDecode.Checked; chkHDCD24bit.Enabled = chkHDCDDetect.Checked && chkHDCDDecode.Checked; @@ -239,5 +305,605 @@ namespace JDP { { EnableDisable(); } + + private void tabControl1_Deselecting(object sender, TabControlCancelEventArgs e) + { + if (listViewFormats.SelectedItems.Count > 0) + listViewFormats.SelectedItems[0].Selected = false; + if (listViewEncoders.SelectedItems.Count > 0) + listViewEncoders.SelectedItems[0].Selected = false; + if (listViewDecoders.SelectedItems.Count > 0) + listViewDecoders.SelectedItems[0].Selected = false; + if (listViewScripts.SelectedItems.Count > 0) + listViewScripts.SelectedItems[0].Selected = false; + } + + private void listViewFormats_BeforeLabelEdit(object sender, LabelEditEventArgs e) + { + CUEToolsFormat format = (CUEToolsFormat)listViewFormats.Items[e.Item].Tag; + if (format.builtin) + e.CancelEdit = true; + } + + private void listViewFormats_AfterLabelEdit(object sender, LabelEditEventArgs e) + { + CUEToolsFormat format; + if (e.Label == null || _config.formats.TryGetValue(e.Label, out format)) + { + e.CancelEdit = true; + return; + } + format = (CUEToolsFormat)listViewFormats.Items[e.Item].Tag; + if (format.builtin) + { + e.CancelEdit = true; + return; + } + + foreach (KeyValuePair encoder in _config.encoders) + if (encoder.Value.extension == format.extension) + encoder.Value.extension = e.Label; + + foreach (KeyValuePair decoder in _config.decoders) + if (decoder.Value.extension == format.extension) + decoder.Value.extension = e.Label; + + comboBoxEncoderExtension.Items.Remove(format.extension); + comboBoxEncoderExtension.Items.Add(e.Label); + comboBoxDecoderExtension.Items.Remove(format.extension); + comboBoxDecoderExtension.Items.Add(e.Label); + + _config.formats.Remove(format.extension); + format.extension = e.Label; + _config.formats.Add(format.extension, format); + } + + private void listViewFormats_KeyDown(object sender, KeyEventArgs e) + { + switch (e.KeyCode) + { + case Keys.Insert: + { + CUEToolsFormat format; + if (_config.formats.TryGetValue("new", out format)) + return; + format = new CUEToolsFormat("new", CUEToolsTagger.TagLibSharp, true, true, false, false, false, null, null, null); + _config.formats.Add("new", format); + ListViewItem item = new ListViewItem(format.extension, "." + format.extension); + item.Tag = format; + listViewFormats.Items.Add(item); + comboBoxEncoderExtension.Items.Add(format.extension); + comboBoxDecoderExtension.Items.Add(format.extension); + item.BeginEdit(); + break; + } + case Keys.Delete: + { + if (listViewFormats.SelectedItems.Count <= 0) + return; + CUEToolsFormat format = (CUEToolsFormat)listViewFormats.SelectedItems[0].Tag; + if (format.builtin) + return; + List decodersToRemove = new List(); + foreach (KeyValuePair decoder in _config.decoders) + if (decoder.Value.extension == format.extension) + decodersToRemove.Add(decoder.Key); + foreach (string decoder in decodersToRemove) + { + _config.decoders.Remove(decoder); + foreach (ListViewItem item in listViewDecoders.Items) + if (item.Text == decoder) + { + item.Remove(); + break; + } + } + List encodersToRemove = new List(); + foreach (KeyValuePair encoder in _config.encoders) + if (encoder.Value.extension == format.extension) + encodersToRemove.Add(encoder.Key); + foreach (string encoder in encodersToRemove) + { + _config.encoders.Remove(encoder); + foreach (ListViewItem item in listViewEncoders.Items) + if (item.Text == encoder) + { + item.Remove(); + break; + } + } + _config.formats.Remove(format.extension); + listViewFormats.SelectedItems[0].Remove(); + break; + } + } + } + + private void listViewFormats_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e) + { + if (e.IsSelected) + { + CUEToolsFormat format = (CUEToolsFormat)e.Item.Tag; + if (format == null) + return; + + comboFormatLosslessEncoder.Items.Clear(); + foreach (KeyValuePair encoder in _config.encoders) + if (encoder.Value.extension == format.extension && encoder.Value.lossless) + comboFormatLosslessEncoder.Items.Add(encoder.Key); + comboFormatLosslessEncoder.SelectedItem = format.encoderLossless; + comboFormatLosslessEncoder.Enabled = format.allowLossless; + + comboFormatLossyEncoder.Items.Clear(); + foreach (KeyValuePair encoder in _config.encoders) + if (encoder.Value.extension == format.extension && !encoder.Value.lossless) + comboFormatLossyEncoder.Items.Add(encoder.Key); + comboFormatLossyEncoder.SelectedItem = format.encoderLossy; + comboFormatLossyEncoder.Enabled = format.allowLossy; + + comboFormatDecoder.Items.Clear(); + foreach (KeyValuePair decoder in _config.decoders) + if (decoder.Value.extension == format.extension) + comboFormatDecoder.Items.Add(decoder.Key); + comboFormatDecoder.SelectedItem = format.decoder; + comboFormatDecoder.Enabled = format.allowLossless; + + comboBoxFormatTagger.SelectedItem = format.tagger; + + checkBoxFormatEmbedCUESheet.Checked = format.allowEmbed; + checkBoxFormatAllowLossless.Checked = format.allowLossless; + checkBoxFormatAllowLossy.Checked = format.allowLossy; + checkBoxFormatSupportsLossyWAV.Checked = format.allowLossyWAV; + + comboBoxFormatTagger.Enabled = + checkBoxFormatEmbedCUESheet.Enabled = + checkBoxFormatSupportsLossyWAV.Enabled = + checkBoxFormatAllowLossless.Enabled = + checkBoxFormatAllowLossy.Enabled = + !format.builtin; + + groupBoxFormat.Visible = true; + } + else + { + groupBoxFormat.Visible = false; + + CUEToolsFormat format = (CUEToolsFormat)e.Item.Tag; + if (format == null) + return; + + format.encoderLossless = (string)comboFormatLosslessEncoder.SelectedItem; + format.encoderLossy = (string)comboFormatLossyEncoder.SelectedItem; + format.decoder = (string)comboFormatDecoder.SelectedItem; + if (!format.builtin) + { + format.tagger = (CUEToolsTagger)comboBoxFormatTagger.SelectedItem; + format.allowEmbed = checkBoxFormatEmbedCUESheet.Checked; + format.allowLossyWAV = checkBoxFormatSupportsLossyWAV.Checked; + format.allowLossless = checkBoxFormatAllowLossless.Checked; + format.allowLossy = checkBoxFormatAllowLossy.Checked; + } + } + } + + private void comboBoxEncoderExtension_SelectedIndexChanged(object sender, EventArgs e) + { + labelEncoderExtension.ImageKey = "." + (string)comboBoxEncoderExtension.SelectedItem; + CUEToolsFormat format; + if (_config.formats.TryGetValue((string)comboBoxEncoderExtension.SelectedItem, out format)) + { + checkBoxEncoderLossless.Enabled = format.allowLossless && format.allowLossy; + if (!checkBoxEncoderLossless.Enabled) + checkBoxEncoderLossless.Checked = format.allowLossless; + } + } + + private void listViewEncoders_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e) + { + if (e.IsSelected) + { + CUEToolsUDC encoder = (CUEToolsUDC)e.Item.Tag; + if (encoder == null) return; + + comboBoxEncoderExtension.Visible = true; + comboBoxEncoderExtension.SelectedItem = encoder.extension; + labelEncoderExtension.Visible = true; + if (encoder.path != null) + { + CUEToolsFormat format; + comboBoxEncoderExtension.Enabled = true; + groupBoxExternalEncoder.Visible = true; + textBoxEncoderPath.Text = encoder.path; + textBoxEncoderParameters.Text = encoder.parameters; + checkBoxEncoderLossless.Checked = encoder.lossless; + checkBoxEncoderLossless.Enabled = _config.formats.TryGetValue(encoder.extension, out format) && format.allowLossless && format.allowLossy; + } + else + { + comboBoxEncoderExtension.Enabled = false; + switch (encoder.className) + { + case "FLACWriter": + groupBoxLibFLAC.Visible = true; + break; + case "WavPackWriter": + groupBoxLibWavpack.Visible = true; + break; + case "APEWriter": + groupBoxLibMAC_SDK.Visible = true; + break; + } + } + } + else + { + CUEToolsUDC encoder = (CUEToolsUDC)e.Item.Tag; + if (encoder == null) return; + + if (encoder.path != null) + { + if (encoder.extension != (string)comboBoxEncoderExtension.SelectedItem || encoder.lossless != checkBoxEncoderLossless.Checked) + { + if (listViewFormats.SelectedItems.Count > 0) + listViewFormats.SelectedItems[0].Selected = false; + CUEToolsFormat format; + if (_config.formats.TryGetValue(encoder.extension, out format)) + { + if (format.encoderLossless == encoder.name) + format.encoderLossless = null; + if (format.encoderLossy == encoder.name) + format.encoderLossy = null; + } + encoder.extension = (string)comboBoxEncoderExtension.SelectedItem; + } + encoder.path = textBoxEncoderPath.Text; + encoder.parameters = textBoxEncoderParameters.Text; + encoder.lossless = checkBoxEncoderLossless.Checked; + } + + comboBoxEncoderExtension.Visible = false; + labelEncoderExtension.Visible = false; + groupBoxExternalEncoder.Visible = false; + groupBoxLibFLAC.Visible = false; + groupBoxLibWavpack.Visible = false; + groupBoxLibMAC_SDK.Visible = false; + } + } + + private void listViewEncoders_BeforeLabelEdit(object sender, LabelEditEventArgs e) + { + CUEToolsUDC encoder = (CUEToolsUDC)listViewEncoders.Items[e.Item].Tag; + if (encoder.path == null) + e.CancelEdit = true; + } + + private void listViewEncoders_AfterLabelEdit(object sender, LabelEditEventArgs e) + { + CUEToolsUDC encoder; + if (e.Label == null || _config.encoders.TryGetValue(e.Label, out encoder)) + { + e.CancelEdit = true; + return; + } + encoder = (CUEToolsUDC) listViewEncoders.Items[e.Item].Tag; + if (listViewFormats.SelectedItems.Count > 0) + listViewFormats.SelectedItems[0].Selected = false; + if (_config.formats[encoder.extension].encoderLossless == encoder.name) + _config.formats[encoder.extension].encoderLossless = e.Label; + if (_config.formats[encoder.extension].encoderLossy == encoder.name) + _config.formats[encoder.extension].encoderLossy = e.Label; + _config.encoders.Remove(encoder.name); + encoder.name = e.Label; + _config.encoders.Add(encoder.name, encoder); + } + + private void listViewEncoders_KeyDown(object sender, KeyEventArgs e) + { + switch (e.KeyCode) + { + case Keys.Insert: + { + CUEToolsUDC encoder; + if (_config.encoders.TryGetValue("new", out encoder)) + return; + encoder = new CUEToolsUDC("new", "wav", true, "", ""); + _config.encoders.Add("new", encoder); + ListViewItem item = new ListViewItem(encoder.name); + item.Tag = encoder; + listViewEncoders.Items.Add(item); + item.BeginEdit(); + break; + } + case Keys.Delete: + { + if (listViewEncoders.SelectedItems.Count <= 0) + return; + CUEToolsUDC encoder = (CUEToolsUDC)listViewEncoders.SelectedItems[0].Tag; + if (encoder.path == null) + return; + if (_config.formats[encoder.extension].encoderLossless == encoder.name) + _config.formats[encoder.extension].encoderLossless = null; + if (_config.formats[encoder.extension].encoderLossy == encoder.name) + _config.formats[encoder.extension].encoderLossy = null; + _config.encoders.Remove(encoder.name); + listViewEncoders.Items.Remove(listViewEncoders.SelectedItems[0]); + break; + } + } + } + + private void listViewDecoders_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e) + { + if (e.IsSelected) + { + CUEToolsUDC decoder = (CUEToolsUDC)e.Item.Tag; + if (decoder == null) return; + comboBoxDecoderExtension.SelectedItem = decoder.extension; + comboBoxDecoderExtension.Visible = true; + labelDecoderExtension.Visible = true; + if (decoder.path != null) + { + comboBoxDecoderExtension.Enabled = true; + groupBoxExternalDecoder.Visible = true; + textBoxDecoderPath.Text = decoder.path; + textBoxDecoderParameters.Text = decoder.parameters; + } + else + { + comboBoxDecoderExtension.Enabled = false; + } + } + else + { + CUEToolsUDC decoder = (CUEToolsUDC)e.Item.Tag; + if (decoder == null) return; + + if (decoder.path != null) + { + decoder.path = textBoxDecoderPath.Text; + decoder.parameters = textBoxDecoderParameters.Text; + if (decoder.extension != (string)comboBoxDecoderExtension.SelectedItem) + { + if (listViewFormats.SelectedItems.Count > 0) + listViewFormats.SelectedItems[0].Selected = false; + CUEToolsFormat format; + if (_config.formats.TryGetValue(decoder.extension, out format) && format.decoder == decoder.name) + format.decoder = null; + decoder.extension = (string)comboBoxDecoderExtension.SelectedItem; + } + } + + comboBoxDecoderExtension.Visible = false; + labelDecoderExtension.Visible = false; + groupBoxExternalDecoder.Visible = false; + } + } + + private void listViewDecoders_AfterLabelEdit(object sender, LabelEditEventArgs e) + { + CUEToolsUDC decoder; + if (e.Label == null || _config.decoders.TryGetValue(e.Label, out decoder)) + { + e.CancelEdit = true; + return; + } + decoder = (CUEToolsUDC)listViewDecoders.Items[e.Item].Tag; + if (listViewFormats.SelectedItems.Count > 0) + listViewFormats.SelectedItems[0].Selected = false; + if (_config.formats[decoder.extension].decoder == decoder.name) + _config.formats[decoder.extension].decoder = e.Label; + _config.decoders.Remove(decoder.name); + decoder.name = e.Label; + _config.decoders.Add(decoder.name, decoder); + } + + private void listViewDecoders_BeforeLabelEdit(object sender, LabelEditEventArgs e) + { + CUEToolsUDC decoder = (CUEToolsUDC)listViewDecoders.Items[e.Item].Tag; + if (decoder.path == null) + e.CancelEdit = true; + } + + private void listViewDecoders_KeyDown(object sender, KeyEventArgs e) + { + switch (e.KeyCode) + { + case Keys.Insert: + { + CUEToolsUDC decoder; + if (_config.decoders.TryGetValue("new", out decoder)) + return; + decoder = new CUEToolsUDC("new", "wav", true, "", ""); + _config.decoders.Add("new", decoder); + ListViewItem item = new ListViewItem(decoder.name); + item.Tag = decoder; + listViewDecoders.Items.Add(item); + item.BeginEdit(); + break; + } + case Keys.Delete: + { + if (listViewDecoders.SelectedItems.Count <= 0) + return; + CUEToolsUDC decoder = (CUEToolsUDC)listViewDecoders.SelectedItems[0].Tag; + if (decoder.path == null) + return; + if (_config.formats[decoder.extension].decoder == decoder.name) + _config.formats[decoder.extension].decoder = null; + _config.decoders.Remove(decoder.name); + listViewDecoders.Items.Remove(listViewDecoders.SelectedItems[0]); + break; + } + } + } + + private void comboBoxDecoderExtension_SelectedIndexChanged(object sender, EventArgs e) + { + labelDecoderExtension.ImageKey = "." + (string)comboBoxDecoderExtension.SelectedItem; + } + + private void listViewScripts_BeforeLabelEdit(object sender, LabelEditEventArgs e) + { + CUEToolsScript script = (CUEToolsScript)listViewScripts.Items[e.Item].Tag; + if (script.builtin) + e.CancelEdit = true; + } + + private void listViewScripts_AfterLabelEdit(object sender, LabelEditEventArgs e) + { + CUEToolsScript script; + if (e.Label == null || _config.scripts.TryGetValue(e.Label, out script)) + { + e.CancelEdit = true; + return; + } + script = (CUEToolsScript)listViewScripts.Items[e.Item].Tag; + if (script.builtin) + { + e.CancelEdit = true; + return; + } + _config.scripts.Remove(script.name); + script.name = e.Label; + _config.scripts.Add(script.name, script); + } + + private void listViewScripts_KeyDown(object sender, KeyEventArgs e) + { + switch (e.KeyCode) + { + case Keys.Insert: + { + CUEToolsScript script; + if (_config.scripts.TryGetValue("new", out script)) + return; + script = new CUEToolsScript("new", false, new CUEAction[] {}, ""); + _config.scripts.Add("new", script); + ListViewItem item = new ListViewItem(script.name); + item.Tag = script; + listViewScripts.Items.Add(item); + item.BeginEdit(); + break; + } + case Keys.Delete: + { + if (listViewScripts.SelectedItems.Count <= 0) + return; + CUEToolsScript script = (CUEToolsScript)listViewScripts.SelectedItems[0].Tag; + if (script.builtin) + return; + _config.scripts.Remove(script.name); + listViewScripts.Items.Remove(listViewScripts.SelectedItems[0]); + break; + } + } + } + + private void listViewScripts_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e) + { + if (e.IsSelected) + { + CUEToolsScript script = (CUEToolsScript)e.Item.Tag; + if (script == null) return; + foreach (ListViewItem item in listViewScriptConditions.Items) + item.Checked = script.conditions.Contains((CUEAction)item.Tag); + groupBoxScriptConditions.Visible = true; + richTextBoxScript.Text = script.code; + richTextBoxScript.Visible = true; + buttonScriptCompile.Visible = true; + + groupBoxScriptConditions.Enabled = + buttonScriptCompile.Enabled = + !script.builtin; + richTextBoxScript.ReadOnly = script.builtin; + } + else + { + CUEToolsScript script = (CUEToolsScript)e.Item.Tag; + if (script == null) return; + if (!script.builtin) + { + script.conditions.Clear(); + foreach (ListViewItem item in listViewScriptConditions.Items) + if (item.Checked) + script.conditions.Add((CUEAction)item.Tag); + script.code = richTextBoxScript.Text; + } + groupBoxScriptConditions.Visible = false; + richTextBoxScript.Visible = false; + buttonScriptCompile.Visible = false; + } + } + + private static int WordLength(string text, int pos) + { + if ((text[pos] >= 'a' && text[pos] <= 'z') || + (text[pos] >= 'A' && text[pos] <= 'Z') || + (text[pos] == '_')) + { + for (int len = 1; len < text.Length - pos; len++) + { + bool ok = (text[pos + len] >= 'a' && text[pos + len] <= 'z') || + (text[pos + len] >= 'A' && text[pos + len] <= 'Z') || + (text[pos + len] == '_'); + if (!ok) + return len; + } + return text.Length - pos; + } + return 1; + } + + private void buttonScriptCompile_Click(object sender, EventArgs e) + { + richTextBoxScript.SelectAll(); + richTextBoxScript.SelectionColor = richTextBoxScript.ForeColor; + richTextBoxScript.DeselectAll(); + try + { + CUESheet.TryCompileScript(richTextBoxScript.Text); + } + catch (Exception ex) + { + using (StringWriter sw = new StringWriter()) + { + using (StringReader sr = new StringReader(ex.Message)) + { + string lineStr; + while ((lineStr = sr.ReadLine()) != null) + { + string[] s = { ".tmp(" }; + string[] n = lineStr.Split(s, 2, StringSplitOptions.None); + if (n.Length == 2) + { + string[] n2 = n[1].Split(")".ToCharArray(), 2); + if (n2.Length == 2) + { + string[] n3 = n2[0].Split(",".ToCharArray(), 2); + int row, col; + if (n3.Length == 2 && int.TryParse(n3[0], out row) && int.TryParse(n3[1], out col) && row > 1) + { + int pos = richTextBoxScript.GetFirstCharIndexFromLine(row - 2); + if (pos >= 0) + { + pos += col - 1; + richTextBoxScript.Select(pos, WordLength(richTextBoxScript.Text, pos)); + richTextBoxScript.SelectionColor = Color.Red; + richTextBoxScript.DeselectAll(); + } + } + } + sw.WriteLine("({0}", n[1]); + } + else + sw.WriteLine("{0}", lineStr); + } + } + MessageBox.Show(this, sw.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + return; + } + MessageBox.Show(this, "Script compiled successfully.", "Ok", MessageBoxButtons.OK, MessageBoxIcon.Information); + } } } \ No newline at end of file diff --git a/CUETools/frmSettings.resx b/CUETools/frmSettings.resx index 98ea353..bd00622 100644 --- a/CUETools/frmSettings.resx +++ b/CUETools/frmSettings.resx @@ -194,94 +194,37 @@ 1 - + True - + 12, 21 - - 151, 17 + + 138, 17 - + 0 - - Disallow multiple instances + + Allow multiple instances - - chkSingleInstance + + chkAllowMultipleInstances - + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + grpGeneral - + 2 - - True - - - 30, 191 - - - 122, 17 - - - 10 - - - Overwrite CUE data - - - chkOverwriteTags - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpGeneral - - - 3 - - - True - - - - NoControl - - - 12, 89 - - - 95, 17 - - - 4 - - - Extract log file - - - chkExtractLog - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpGeneral - - - 4 - True + NoControl @@ -307,16 +250,13 @@ grpGeneral - 5 + 3 - - 17, 17 - True - 12, 140 + 12, 72 215, 17 @@ -327,6 +267,9 @@ Truncate extra 4608 samples if present + + 17, 17 + Some erroneous FLAC encoders add extra 4608 zero samples at the end of each file. These extra samples can be detected and removed. @@ -340,13 +283,13 @@ grpGeneral - 6 + 4 True - 12, 123 + 12, 106 189, 17 @@ -367,13 +310,13 @@ grpGeneral - 7 + 5 True - 12, 106 + 12, 89 127, 17 @@ -394,64 +337,7 @@ grpGeneral - 8 - - - True - - - 12, 174 - - - 187, 17 - - - 9 - - - Fill up missing CUE data from tags - - - chkFillUpCUE - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpGeneral - - - 9 - - - True - - - 12, 72 - - - 134, 17 - - - 3 - - - Embed log file as a tag - - - File should be in the same directory as source file and have a .log extension - - - chkEmbedLog - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpGeneral - - - 10 + 6 True @@ -481,13 +367,13 @@ grpGeneral - 11 + 7 True - 12, 157 + 12, 123 229, 17 @@ -508,7 +394,7 @@ grpGeneral - 12 + 8 6, 6 @@ -534,84 +420,6 @@ 0 - - 123, 6 - - - 36, 21 - - - 1 - - - Right - - - numericFLACCompressionLevel - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage5 - - - 0 - - - True - - - 6, 8 - - - 97, 13 - - - 0 - - - Compression level: - - - lblFLACCompressionLevel - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage5 - - - 1 - - - True - - - 9, 37 - - - 54, 17 - - - 2 - - - Verify - - - chkFLACVerify - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage5 - - - 2 - 194, 290 @@ -636,413 +444,11 @@ 2 - - True - - - 5, 101 - - - 125, 17 - - - 6 - - - Store MD5 checksum - - - chkWVStoreMD5 - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage6 - - - 0 - - - 96, 78 - - - 36, 21 - - - 5 - - - Right - - - numWVExtraMode - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage6 - - - 1 - - - True - - - 5, 79 - - - 85, 17 - - - 4 - - - Extra mode: - - - chkWVExtraMode - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage6 - - - 3 - - - True - - - 6, 57 - - - 71, 17 - - - 3 - - - Very High - - - rbWVVeryHigh - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage6 - - - 5 - - - True - - - 6, 40 - - - 46, 17 - - - 2 - - - High - - - rbWVHigh - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage6 - - - 6 - - - True - - - 6, 23 - - - 58, 17 - - - 1 - - - Normal - - - rbWVNormal - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage6 - - - 4 - - - True - - - 6, 6 - - - 46, 17 - - - 0 - - - Fast - - - rbWVFast - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage6 - - - 2 - - - chkEncodeWhenZeroOffset - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 0 - - - chkArFixOffset - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 1 - - - chkWriteArLogOnConvert - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 2 - - - chkWriteArTagsOnConvert - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 3 - - - numEncodeWhenPercent - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 4 - - - labelEncodeWhenConfidence - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 5 - - - numEncodeWhenConfidence - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 6 - - - chkArNoUnverifiedAudio - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 7 - - - labelFixWhenConfidence - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 8 - - - numFixWhenConfidence - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 9 - - - numFixWhenPercent - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 10 - - - 211, 6 - - - 310, 215 - - - 1 - - - Verify, then convert - - - groupBox1 - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage2 - - - 1 - - - Top, Right - - - True - - - 204, 61 - - - Yes - - - 100, 17 - - - 4 - - - and zero offset - - - chkEncodeWhenZeroOffset - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 0 - - - True - - - 6, 85 - - - 198, 17 - - - 5 - - - Fix offset if % of verified tracks >= - - - chkArFixOffset - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 1 - True - 6, 172 + 6, 37 130, 17 @@ -1063,16 +469,13 @@ groupBox1 - 2 + 0 - - 17, 17 - True - 6, 149 + 6, 20 137, 17 @@ -1096,10 +499,70 @@ groupBox1 - 3 + 1 + + + 8, 103 + + + 248, 61 + + + 1 + + + Encode and verify + + + groupBox1 + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage2 + + + 4 + + + Top, Right + + + True + + + 138, 63 + + + Yes + + + 100, 17 + + + 4 + + + and zero offset + + + chkEncodeWhenZeroOffset + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox5 + + + 1 + + + Top, Right - 266, 19 + 200, 15 38, 21 @@ -1114,22 +577,16 @@ System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - groupBox1 + groupBox5 4 - - Top, Right - - - True - - 21, 42 + 9, 36 - 101, 13 + 185, 21 2 @@ -1137,6 +594,9 @@ with confidence >= + + MiddleRight + labelEncodeWhenConfidence @@ -1144,13 +604,16 @@ System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - groupBox1 + groupBox5 - 5 + 3 + + + Top, Right - 266, 40 + 200, 36 38, 21 @@ -1165,49 +628,19 @@ System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - groupBox1 + groupBox5 - 6 + 2 - - True - - - 6, 20 - - - 210, 17 - - - 0 - - - Encode only if % of verified tracks >= - - - chkArNoUnverifiedAudio - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 7 - - - Top, Right - - - True + + NoControl - 21, 107 + 6, 36 - 101, 13 + 192, 21 7 @@ -1215,6 +648,9 @@ with confidence >= + + MiddleRight + labelFixWhenConfidence @@ -1222,13 +658,16 @@ System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - groupBox1 + groupBox4 - 8 + 2 + + + Top, Right - 267, 105 + 205, 36 37, 21 @@ -1243,13 +682,16 @@ System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - groupBox1 + groupBox4 - 9 + 3 + + + Top, Right - 266, 84 + 204, 15 38, 21 @@ -1264,14 +706,11 @@ System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - groupBox1 + groupBox4 - 10 + 4 - - 17, 17 - True @@ -1309,7 +748,7 @@ NoControl - 6, 149 + 6, 20 137, 17 @@ -1330,10 +769,10 @@ System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - groupBox3 + groupBoxVerify - 1 + 2 True @@ -1458,126 +897,39 @@ 1 - - chkKeepOriginalFilenames + + True - + + NoControl + + + 6, 47 + + + 184, 17 + + + 11 + + + Write extraction log to "LOG" tag + + + File should be in the same directory as source file and have a .log extension + + + chkEmbedLog + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpAudioFilenames + + groupBoxTagging - - 1 - - - txtSpecialExceptions - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpAudioFilenames - - - 2 - - - chkRemoveSpecial - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpAudioFilenames - - - 3 - - - chkReplaceSpaces - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpAudioFilenames - - - 4 - - - txtTrackFilenameFormat - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpAudioFilenames - - - 5 - - - lblTrackFilenameFormat - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpAudioFilenames - - + 6 - - lblSingleFilenameFormat - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpAudioFilenames - - - 7 - - - txtSingleFilenameFormat - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpAudioFilenames - - - 8 - - - 264, 6 - - - 252, 249 - - - 1 - - - Audio Filenames - - - grpAudioFilenames - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage1 - - - 1 - True @@ -1800,141 +1152,30 @@ 8 - - True + + 264, 6 - - 6, 74 + + 252, 249 - - 58, 17 - - - 4 - - - Insane - - - rbAPEinsane - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage7 - - - 0 - - - True - - - 6, 57 - - - 75, 17 - - - 3 - - - Extra High - - - rbAPEextrahigh - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage7 - - + 1 - - True + + Audio Filenames - - 6, 40 + + grpAudioFilenames - - 46, 17 + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 2 + + tabPage1 - - High - - - rbAPEhigh - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage7 - - - 3 - - - True - - - 6, 23 - - - 58, 17 - - + 1 - - Normal - - - rbAPEnormal - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage7 - - - 4 - - - True - - - 6, 6 - - - 46, 17 - - - 0 - - - Fast - - - rbAPEfast - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage7 - - - 2 - Top, Left, Right @@ -1965,18 +1206,678 @@ 0 - - groupBox3 + + True - + + NoControl + + + 6, 83 + + + 108, 13 + + + 20 + + + Resize if resolution > + + + labelAlbumArtMaximumResolution + + + System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxAlbumArt + + + 0 + + + 161, 81 + + + 58, 21 + + + 19 + + + Right + + + numericUpDownMaxResolution + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxAlbumArt + + + 1 + + + True + + + 6, 47 + + + 110, 17 + + + 18 + + + Embed Folder.jpg + + + checkBoxEmbedAlbumArt + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxAlbumArt + + + 2 + + + True + + + 6, 30 + + + 99, 17 + + + 16 + + + Copy album art + + + checkBoxCopyAlbumArt + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxAlbumArt + + + 3 + + + 242, 3 + + + 284, 255 + + + 1 + + + Album Art + + + groupBoxAlbumArt + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + tabPage6 + + + 0 + + + True + + + NoControl + + + 6, 30 + + + 95, 17 + + + 18 + + + Extract log file + + + chkExtractLog + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxTagging + + + 0 + + + True + + + NoControl + + + 6, 115 + + + 102, 17 + + + 17 + + + Copy basic tags + + + checkBoxCopyBasicTags + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxTagging + + + 1 + + + True + + + 6, 64 + + + 176, 17 + + + 15 + + + Write basic tags from CUE data + + + checkBoxWriteCUETags + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxTagging + + + 2 + + + True + + + 6, 132 + + + 121, 17 + + + 14 + + + Copy unknown tags + + + checkBoxCopyUnknownTags + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxTagging + + + 3 + + + True + + + NoControl + + + 18, 98 + + + 122, 17 + + + 13 + + + Overwrite CUE data + + + chkOverwriteTags + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxTagging + + + 4 + + + True + + + NoControl + + + 6, 81 + + + 187, 17 + + + 12 + + + Fill up missing CUE data from tags + + + chkFillUpCUE + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxTagging + + + 5 + + + 8, 3 + + + 226, 255 + + + 0 + + + groupBoxTagging + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage6 + + + 1 + + + 4, 22 + + + 535, 261 + + + 9 + + + Tagging + + + tabPage6 + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabControl1 + + + 1 + + + 110, 20 + + + 134, 21 + + + 2 + + + textBoxARLogExtension + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxARLog + + + 0 + + + True + + + 6, 23 + + + 54, 13 + + + 1 + + + Extension + + + labelLogFileExtension + + + System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxARLog + + + 1 + + + True + + + 6, 53 + + + 65, 17 + + + 0 + + + Verbose + + + checkBoxARLogVerbose + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxARLog + + + 2 + + + 6, 170 + + + 250, 85 + + + 4 + + + Log file + + + groupBoxARLog + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + tabPage2 - + 0 + + 6, 15 + + + 188, 21 + + + 5 + + + % of verified tracks >= + + + MiddleRight + + + label2 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox5 + + + 0 + + + 278, 6 + + + 248, 91 + + + 3 + + + Encode if verified + + + groupBox5 + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage2 + + + 1 + + + Top, Right + + + True + + + NoControl + + + 166, 63 + + + Yes + + + 76, 17 + + + 6 + + + to nearest + + + checkBoxFixToNearest + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox4 + + + 0 + + + NoControl + + + 9, 15 + + + 189, 21 + + + 9 + + + % of verified tracks >= + + + MiddleRight + + + label3 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox4 + + + 1 + + + 278, 103 + + + 248, 91 + + + 2 + + + Fix offset + + + groupBox4 + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage2 + + + 2 + + + True + + + 26, 54 + + + 102, 17 + + + 2 + + + In source folder + + + checkBoxARVerifyUseSourceFolder + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxVerify + + + 0 + + + True + + + NoControl + + + 6, 37 + + + 130, 17 + + + 1 + + + Write AccurateRip log + + + chkWriteARLogOnVerify + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxVerify + + + 1 + + + 8, 6 + + + 248, 91 + + + 0 + + + Verify + + + groupBoxVerify + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage2 + + + 3 + 4, 22 @@ -2002,20 +1903,371 @@ tabControl1 + 2 + + + 155, 74 + + + 184, 21 + + + 18 + + + comboFormatLossyEncoder + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxFormat + + + 0 + + + True + + + NoControl + + + 6, 77 + + + 76, 13 + + + 19 + + + Lossy encoder + + + labelFormatLossyEncoder + + + System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxFormat + + 1 - - tabControl2 + + True - - System.Windows.Forms.TabControl, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + NoControl - + + 6, 169 + + + 142, 17 + + + 18 + + + Supports lossy encoding + + + checkBoxFormatAllowLossy + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxFormat + + + 2 + + + 155, 47 + + + 184, 21 + + + 2 + + + comboFormatLosslessEncoder + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxFormat + + + 3 + + + True + + + 6, 194 + + + 122, 17 + + + 16 + + + Supports LossyWAV + + + checkBoxFormatSupportsLossyWAV + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxFormat + + + 4 + + + True + + + NoControl + + + 6, 50 + + + 88, 13 + + + 8 + + + Lossless encoder + + + labelFormatLosslessEncoder + + + System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxFormat + + + 5 + + + True + + + 6, 219 + + + 181, 17 + + + 15 + + + Supports embedded CUE Sheets + + + checkBoxFormatEmbedCUESheet + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxFormat + + + 6 + + + 155, 20 + + + 184, 21 + + + 4 + + + comboFormatDecoder + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxFormat + + + 7 + + + True + + + 6, 144 + + + 154, 17 + + + 14 + + + Supports lossless encoding + + + checkBoxFormatAllowLossless + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxFormat + + + 8 + + + True + + + NoControl + + + 6, 23 + + + 47, 13 + + + 11 + + + Decoder + + + labelFormatDefaultDecoder + + + System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxFormat + + + 9 + + + True + + + NoControl + + + 6, 104 + + + 41, 13 + + + 13 + + + Tagger + + + labelFormatTagger + + + System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxFormat + + + 10 + + + 155, 101 + + + 184, 21 + + + 12 + + + comboBoxFormatTagger + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxFormat + + + 11 + + + 136, 6 + + + 390, 249 + + + 17 + + + False + + + groupBoxFormat + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + tabPage3 - + 0 + + 120 + + + 6, 6 + + + 124, 249 + + + 0 + + + listViewFormats + + + System.Windows.Forms.ListView, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage3 + + + 1 + 4, 22 @@ -2029,7 +2281,7 @@ 2 - Codecs + Formats tabPage3 @@ -2041,547 +2293,1046 @@ tabControl1 - 2 - - - grpHDCD - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage4 - - - 0 - - - chkHDCDDetect - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage4 - - - 1 - - - 4, 22 - - - 3, 3, 3, 3 - - - 535, 261 - - 3 - - HDCD + + None - - tabPage4 + + Top, Right - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabControl1 - - - 3 - - - 0, 0 - - - 0, 0, 0, 0 - - - 543, 287 - - - 0 - - - tabControl1 - - - System.Windows.Forms.TabControl, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 0 - - - chkWriteARLogOnVerify - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox3 - - - 0 - - - 8, 6 - - - 197, 215 - - - 0 - - - Verify - - - groupBox3 - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage2 - - - 0 - - + True - + + MiddleRight + + + 293, 77 + + + 65, 17 + + + 17 + + + Lossless + + + checkBoxEncoderLossless + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxExternalEncoder + + + 0 + + + 96, 20 + + + 262, 21 + + + 14 + + + textBoxEncoderPath + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxExternalEncoder + + + 1 + + + 96, 49 + + + 262, 21 + + + 16 + + + textBoxEncoderParameters + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxExternalEncoder + + + 2 + + + True + + NoControl - - 5, 172 + + 6, 23 - - 130, 17 + + 46, 13 - - 1 + + 13 - - Write AccurateRip log + + Encoder - - chkWriteARLogOnVerify + + labelEncoderPath - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox3 - - - 0 - - - flac - - - 4, 23 - - - 3, 3, 3, 3 - - - 512, 222 - - - 0 - - - FLAC - - - tabPage5 - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabControl2 - - - 0 - - - wv - - - 4, 23 - - - 3, 3, 3, 3 - - - 512, 222 - - - 1 - - - WavPack - - - tabPage6 - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabControl2 - - - 1 - - - 4, 23 - - - 3, 3, 3, 3 - - - 512, 222 - - - 2 - - - Monkey's Audio - - - tabPage7 - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabControl2 - - - 2 - - - label1 - - + System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - tabPage8 + + groupBoxExternalEncoder - + + 3 + + + True + + + NoControl + + + 6, 52 + + + 62, 13 + + + 15 + + + Parameters + + + labelEncoderParameters + + + System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxExternalEncoder + + + 4 + + + 136, 39 + + + 390, 105 + + + 22 + + + External encoder options + + + False + + + groupBoxExternalEncoder + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage10 + + 0 - - numericLossyWAVQuality + + 459, 12 - + + 67, 21 + + + 26 + + + False + + + comboBoxEncoderExtension + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage10 + + + 1 + + + 120 + + + 3, 6 + + + 124, 249 + + + 25 + + + listViewEncoders + + + System.Windows.Forms.ListView, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage10 + + + 2 + + + True + + + NoControl + + + 9, 88 + + + 58, 17 + + + 29 + + + Insane + + + rbAPEinsane + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxLibMAC_SDK + + + 0 + + + True + + + NoControl + + + 9, 20 + + + 46, 17 + + + 25 + + + Fast + + + rbAPEfast + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxLibMAC_SDK + + + 1 + + + True + + + NoControl + + + 9, 71 + + + 75, 17 + + + 28 + + + Extra High + + + rbAPEextrahigh + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxLibMAC_SDK + + + 2 + + + True + + + NoControl + + + 9, 37 + + + 58, 17 + + + 26 + + + Normal + + + rbAPEnormal + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxLibMAC_SDK + + + 3 + + + True + + + NoControl + + + 9, 54 + + + 46, 17 + + + 27 + + + High + + + rbAPEhigh + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxLibMAC_SDK + + + 4 + + + 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 + + + 3 + + + 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 + + + True + + + NoControl + + + 9, 20 + + + 46, 17 + + + 24 + + + Fast + + + rbWVFast + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxLibWavpack + + + 1 + + + 317, 19 + + + 36, 21 + + + 29 + + + Right + + + numWVExtraMode + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - tabPage8 + + groupBoxLibWavpack - - 1 - - - 4, 23 - - - 3, 3, 3, 3 - - - 512, 222 - - - 3 - - - LossyWAV - - - tabPage8 - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabControl2 - - - 3 - - - chkUDC1ID3v2 - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage9 - - - 0 - - - chkUDC1APEv2 - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage9 - - - 1 - - - label6 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage9 - - + 2 - - label5 + + True - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + NoControl - - tabPage9 + + 9, 54 - + + 46, 17 + + + 26 + + + High + + + rbWVHigh + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxLibWavpack + + 3 - - textUDC1EncParams + + True - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + NoControl - - tabPage9 + + 9, 71 - + + 71, 17 + + + 27 + + + Very High + + + rbWVVeryHigh + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxLibWavpack + + 4 - - textUDC1Encoder + + True - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + NoControl - - tabPage9 + + 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 + + 5 - - textUDC1Params + + True - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + NoControl - - tabPage9 + + 9, 37 - + + 58, 17 + + + 25 + + + Normal + + + rbWVNormal + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxLibWavpack + + 6 - - textUDC1Decoder + + 136, 39 - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 390, 100 - - tabPage9 + + 23 - - 7 + + wavpack options - - textUDC1Extension + + False - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + groupBoxLibWavpack - - tabPage9 + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 8 + + tabPage10 - - label4 + + 4 - + + True + + + NoControl + + + 6, 17 + + + 97, 13 + + + 18 + + + Compression level: + + + lblFLACCompressionLevel + + System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - tabPage9 + + groupBoxLibFLAC - - 9 + + 0 - - label3 + + 123, 15 - + + 36, 21 + + + 19 + + + Right + + + numericFLACCompressionLevel + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxLibFLAC + + + 1 + + + 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 + + + 2 + + + 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 + + + 5 + + + True + + + MiddleRight + + + (none) + + + NoControl + + + 351, 15 + + + 100, 16 + + + 12 + + + Extension + + + False + + + labelEncoderExtension + + System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - tabPage9 + + tabPage10 - - 10 + + 6 - - label2 + + 4, 22 - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage9 - - - 11 - - - 4, 23 - - + 3, 3, 3, 3 - - 512, 222 + + 535, 261 - - 4 + + 6 - - User defined + + Encoders - - tabPage9 + + tabPage10 - + System.Windows.Forms.TabPage, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - tabControl2 + + tabControl1 - + 4 - - 114, 17 - - - - AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w - LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 - ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABg - DQAAAk1TRnQBSQFMAgEBAgEAAQQBAAEEAQABEAEAARABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAFA - AwABEAMAAQEBAAEgBgABEBUAAf8DAAH/ARsBZwESAf8BGwFnARIB/wMAAf8BGwFnARIB/wEbAWcBEgH/ - AwAB/wMAAf8BGwEaARsB/wEjASIBIwH/ARIBFgESAf8DAAH/AwAB/wMAAf8DAAX/AQcBAwEBAf8BCAEE - AQEB/wEIAQQBAQH/AQgBBAEBAf8BCQEEAQEB/wEKAQUBAgH/AQgBBAEBAf8BCAEEAQEB/wEIAQQBAQH/ - AQgBBAEBAf8BCAEEAQEB/wEIAQQBAQH/AQgBBAEBAf8BBwEDAQEF/4AAAVQBVwFUAf8BKwEqASsB/wEz - Ad8BPAH/ATMB3wE8Af8DAAH/ATMB3wE8Af8BMwHfATwB/wMAAf8DAAH/AYwBjgGMAf8B1gHTAdYB/wHW - AdMB1gH/AVQBUwFUAf8DAAH/AwAB/wMAAf8BCAEEAQEB/wHOAY4BWwH/Ac4BjgFbAf8B1AGTAV4B/wHO - AY4BWwH/AaYBbQFJAf8BHAERAQoB/wHOAY4BWwH/Ac4BjgFbAf8BzgGOAVsB/wHOAY4BWwH/Ac4BjgFb - Af8BzgGOAVsB/wHOAY4BWwH/Ac4BjgFbAf8BCAEEAQEB/4AAAW0BbwFtAf8BKwEqASsB/wEzAd8BPAH/ - ATMB3wE8Af8DAAH/ATMB3wE8Af8BMwHfATwB/wMAAf8DAAH/AbUBtgG1Cf8BbQFvAW0B/wMAAf8DAAH/ - AwAB/wEKAQUBAgH/Ac4BjgFbAf8BzgGOAVsB/wHOAY4BWwH/Ac4BjgFbAf8B0AGQAVsB/wMAAf8BlQFh - AT8B/wHOAY4BWwH/AdIBkAFdAf8B0wGRAV0B/wHTAZEBXQH/AdMBkQFdAf8BzgGOAVsB/wHOAY4BWwH/ - AQkBBAEBAf+AAAFtAW8BbQH/ASsBKgErAf8BAAEeAQAB/wECASoBAgH/AwAB/wECASoBCgH/AQIBIgEC - Af8DAAH/AwAB/wG1AbIBtQn/AW0BawFtAf8DAAH/AwAB/wMAAf8BCgEFAQIB/wHOAY4BWwH/Ac4BjgFb - Af8BzgGOAVsB/wHQAY8BWwH/Ac4BjgFbAf8BGQEPAQcB/wElARgBDgH/Ac4BjgFbAf8BzgGOAVsB/wHO - AY4BWwH/Ac4BjgFbAf8B0AGPAVwB/wHOAY4BWwH/Ac4BjgFbAf8BCQEEAQEB/4AAAW0BbwFtAf8BKwEq - ASsB/wEjAa4BKwH/ASMBrgErAf8DAAH/ASMBrgErAf8BIwGuASsB/wMAAf8DAAH/AbUBsgG1Cf8BbQFr - AW0B/wMAAf8DAAH/AwAB/wEKAQUBAgH/Ac4BjgFbAf8BzgGOAVsB/wHOAY4BWwH/Ac4BjgFbAf8BzgGO - AVsB/wGYAWMBQQH/AwAB/wMAAf8DAAH/ATEBHwETAf8BzgGOAVsB/wHOAY4BWwH/Ac4BjgFbAf8BzgGO - AVsB/wEJAQQBAQH/gAABbQFvAW0B/wErASoBKwH/ATMB3wE8Af8BMwHfATwB/wMAAf8BMwHfATwB/wEz - Ad8BPAH/AwAB/wMAAf8BtQGyAbUJ/wFtAWsBbQH/AwAB/wMAAf8DAAH/AQoBBQECAf8BzgGOAVsB/wHS - AZEBXAH/Ac4BjgFbAf8B0QGQAVwB/wHOAY4BWwH/Ac4BjgFbAf8DAAH/AUsBMgEgAf8BrQFxAUwB/wEq - ARsBEQH/AwAB/wHOAY4BWwH/Ac4BjgFbAf8BzgGOAVsB/wEJAQQBAQH/gAABbQFvAW0B/wErASoBKwH/ - ATMB3wE8Af8BMwHfATwB/wMAAf8BMwHfATwB/wEzAd8BPAH/AwAB/wMAAf8BrQGuAa0J/wFlAWcBZQH/ - AwAB/wMAAf8DAAH/AQoBBQECAf8BzgGOAVsB/wHRAZABXAH/Ac4BjgFbAf8BkQFeAT4B/wHOAY4BWwH/ - Ac4BjgFbAf8BOwEmARgB/wECAgAB/wHOAY4BWwH/Ac4BjgFbAf8DAAH/AT8BKgEaAf8BzgGOAVsB/wHO - AY4BWwH/AQkBBAEBAf+AAAFtAW8BbQH/ASsBKgErAf8BAAEiASMB/wEAASoBKwH/AwAB/wEAASoBKwH/ - AQABIgEjAf8DAAH/AwAB/wGtAaoBrQn/AWUBYwFlAf8DAAH/AwAB/wMAAf8BCgEFAQIB/wHOAY4BWwH/ - Ac4BjgFbAf8BzgGOAVsB/wMAAf8BqwFwAUoB/wHOAY4BWwH/AbkBeQFQAf8DAAH/Ac4BjgFbAf8BzgGO - AVsB/wECAgAB/wEOAQYBBAH/Ac4BjgFbAf8BzgGOAVsB/wEJAQQBAQH/gAABbQFvAW0B/wErASoBKwH/ - AQABngGcAf8BAAGeAZwB/wMAAf8BAAGeAZwB/wEAAZ4BnAH/ARIBHgEbGf8BIwEiASMB/wMAAf8BCgEF - AQIB/wHOAY4BWwH/Ac4BjgFbAf8BzgGOAVsB/wMAAf8BFwEOAQgB/wHOAY4BWwH/AcQBhwFYAf8DAAH/ - AwAB/wMAAf8DAAH/AYcBVgE4Af8BzgGOAVsB/wHOAY4BWwH/AQkBBAEBAf+AAAFtAW8BbQH/ASsBKgEr - Af8BAAP/AQAD/wMAAf8BAAP/AQAD/wMAGf8BIwEiASMB/wMAAf8BCgEFAQIB/wHOAY4BWwH/Ac4BjgFb - Af8BzgGOAVsB/wMAAf8DAAH/AaoBbgFJAf8BmQFkAUIB/wMAAf8DAAH/AaIBaAFFAf8BzgGOAVsB/wHO - AY4BWwH/Ac4BjgFbAf8BzgGOAVsB/wEJAQQBAQH/gAABbQFvAW0B/wErASoBKwH/AQAD/wEAA/8DAAH/ - AQAD/wEAA/8DAAH/AVQBTwFMAf8B3gHbAd4J/wG1AbIBtQH/AXUBdwF1Af8BAgEGAQIB/wMAAf8BCgEF - AQIB/wHOAY4BWwH/Ac4BjgFbAf8BngFmAUQB/wMAAf8BWwE8ASgB/wERAQoBBQH/AV8BPwEqAf8BGQEQ - AQgB/wElARgBDwH/AT8BKQEaAf8BzgGOAVsB/wHRAZABXAH/Ac4BjgFbAf8BzgGOAVsB/wEJAQQBAQH/ - gAABbQFvAW0B/wErASoBKwH/AwAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/AwAB/wGUAZYBlAn/AbUBtgG1 - Af8DAAH/AwAB/wMAAf8BCgEFAQIB/wHOAY4BWwH/Ac4BjgFbAf8BcQFMATMB/wMAAf8BzgGOAVsB/wMA - Af8DAAH/AVEBNgEkAf8BrgFzAUwB/wMAAf8BzgGOAVsB/wHOAY4BWwH/AdMBkQFdAf8B1AGTAV4B/wEJ - AQQBAQH/gAABnAGaAZwB/wErASoBKwH/AgABpQH/AgABpQH/AwAB/wMAAf8DAAH/AwAB/wMAAf8BKwEq - ASsR/wG9AboBvQH/AwAB/wEKAQUBAgH/Ac4BjgFbAf8BzgGOAVsB/wE/ASkBGwH/AwAB/wHOAY4BWwH/ - AWoBRwEuAf8DAAH/AYMBVAE4Af8BzgGOAVsB/wMAAf8BMAEeARQB/wHOAY4BWwH/Ac4BjgFbAf8B1AGT - AV4B/wEJAQQBAQH/gAABlAGSAZQB/wErASoBKwH/AgAC/wIAAv8DAAH/AwAB/wMAAf8DAAH/AwAB/wMA - Af8BnAGaAZwN/wGUAZYBlAH/AwAB/wEKAQUBAgH/Ac4BjgFbAf8BzgGOAVsB/wMAAf8BIgEWAQ0B/wHO - AY4BWwH/Ac4BjgFbAf8DAAH/AZ8BZwFFAf8BzgGOAVsB/wGLAVkBOwH/AwAB/wHOAY4BWwH/Ac4BjgFb - Af8BzgGOAVsB/wEJAQQBAQH/gAABpQGmAaUB/wGUAZIBlAH/AgABpQH/AgABtQH/ASsBKgErAf8BKwEq - ASsB/wErASoBKwH/ASsBKgErAf8BKwEqASsB/wErASoBKwH/ASsBLgErAf8BTAFPAUwB/wGtAaoBrQH/ - Aa0BqgGtAf8BRAFHAUQB/wMAAf8BCAEEAQEB/wHOAY4BWwH/Ac4BjgFbAf8BcQFLATIB/wGlAWwBRwH/ - Ac4BjgFbAf8BzgGOAVsB/wGYAWMBQQH/Ac4BjgFbAf8BzgGOAVsB/wHOAY4BWwH/AWwBSQEwAf8BrgFx - AUwB/wHOAY4BWwH/Ac4BjgFbAf8BCAEEAQEB/4AAAd4B2wHeAf8BpQGmAaUB/wGlAaYBpQH/AXUBcwF1 - Af8BbQFvAW0B/wFtAW8BbQH/AW0BbwFtAf8BbQFvAW0B/wFtAW8BbQH/AW0BbwFtAf8BbQFvAW0B/wFt - AW8BbQH/AW0BbwFtAf8BKwEqASsB/wErASoBKwH/AwAF/wEIAQQBAQH/AQkBBQEBAf8BCgEFAQIB/wEK - AQUBAQH/AQkBBQEBAf8BCQEFAQEB/wEKAQUBAQH/AQoBBQEBAf8BCQEFAQEB/wEJAQUBAQH/AQoBBQEC - Af8BCgEFAQEB/wEJAQUBAQH/AQgBBAEBBf+AAAFCAU0BPgcAAT4DAAEoAwABQAMAARADAAEBAQABAQUA - AYAXAAP/gQAL - + + 459, 12 - - 6, 6 + + 67, 21 - - 520, 249 + + 28 - + + False + + + comboBoxDecoderExtension + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage11 + + 0 - - tabControl2 + + 96, 20 - - System.Windows.Forms.TabControl, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 262, 21 - - tabPage3 + + 21 - + + textBoxDecoderPath + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxExternalDecoder + + 0 + + True + + + NoControl + + + 6, 23 + + + 47, 13 + + + 20 + + + Decoder + + + labelDecoderPath + + + System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxExternalDecoder + + + 1 + + + True + + + NoControl + + + 6, 50 + + + 62, 13 + + + 22 + + + Parameters + + + labelDecoderParameters + + + System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxExternalDecoder + + + 2 + + + 96, 47 + + + 262, 21 + + + 23 + + + textBoxDecoderParameters + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxExternalDecoder + + + 3 + + + 136, 39 + + + 390, 87 + + + 27 + + + External decoder options + + + False + + + groupBoxExternalDecoder + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage11 + + + 1 + + + 120 + + + 3, 6 + + + 124, 249 + + + 26 + + + listViewDecoders + + + System.Windows.Forms.ListView, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage11 + + + 2 + + + True + + + MiddleRight + + + NoControl + + + 351, 15 + + + 100, 16 + + + 19 + + + Extension + + + False + + + labelDecoderExtension + + + System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage11 + + + 3 + + + 4, 22 + + + 3, 3, 3, 3 + + + 535, 261 + + + 7 + + + Decoders + + + tabPage11 + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabControl1 + + + 5 + True @@ -2589,13 +3340,13 @@ NoControl - 6, 12 + 6, 17 45, 13 - 3 + 5 Quality: @@ -2607,19 +3358,19 @@ System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - tabPage8 + groupBox2 0 - 98, 10 + 98, 15 36, 21 - 4 + 6 Right @@ -2631,305 +3382,35 @@ System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - tabPage8 + groupBox2 1 - - True + + 228, 42 - - 268, 8 + + 298, 100 - - 79, 17 - - - 3 - - - ID3v2 tags - - - chkUDC1ID3v2 - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage9 - - - 0 - - - True - - - 162, 8 - - - 81, 17 - - - 2 - - - APEv2 tags - - - chkUDC1APEv2 - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage9 - - - 1 - - - True - - - 6, 117 - - - 62, 13 - - - 10 - - - Parameters - - - label6 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage9 - - - 2 - - - True - - - 6, 90 - - - 46, 13 - - - 8 - - - Encoder - - - label5 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage9 - - - 3 - - - 89, 114 - - - 417, 21 - - - 11 - - - textUDC1EncParams - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage9 - - - 4 - - - 89, 87 - - - 417, 21 - - - 9 - - - textUDC1Encoder - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage9 - - - 5 - - - 89, 60 - - - 417, 21 - - + 7 - - textUDC1Params + + LossyWAV - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + groupBox2 - - tabPage9 + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 6 + + tabPage4 - - 89, 33 - - - 417, 21 - - - 5 - - - textUDC1Decoder - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage9 - - - 7 - - - 89, 6 - - - 67, 21 - - - 1 - - - textUDC1Extension - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage9 - - - 8 - - - True - - - 6, 63 - - - 62, 13 - - - 6 - - - Parameters - - - label4 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage9 - - - 9 - - - True - - - 6, 36 - - - 47, 13 - - - 4 - - - Decoder - - - label3 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage9 - - - 10 - - - True - - - 6, 9 - - - 54, 13 - - + 0 - - Extension - - - label2 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage9 - - - 11 - 19, 42 @@ -2952,7 +3433,7 @@ tabPage4 - 0 + 1 True @@ -2979,8 +3460,321 @@ tabPage4 + 2 + + + 4, 22 + + + 3, 3, 3, 3 + + + 535, 261 + + + 3 + + + HDCD + + + tabPage4 + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabControl1 + + + 6 + + + Courier New, 8pt + + + 144, 110 + + + 382, 145 + + + 28 + + + + + + False + + + False + + + richTextBoxScript + + + System.Windows.Forms.RichTextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage5 + + + 0 + + + 422, 19 + + + 75, 23 + + + 27 + + + Compile + + + False + + + buttonScriptCompile + + + System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage5 + + 1 + + 120 + + + + AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w + LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkMAwAAAFFTeXN0 + ZW0uRHJhd2luZywgVmVyc2lvbj0yLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2Vu + PWIwM2Y1ZjdmMTFkNTBhM2EFAQAAACFTeXN0ZW0uV2luZG93cy5Gb3Jtcy5MaXN0Vmlld0l0ZW0HAAAA + BFRleHQKSW1hZ2VJbmRleAlCYWNrQ29sb3IHQ2hlY2tlZARGb250CUZvcmVDb2xvchdVc2VJdGVtU3R5 + bGVGb3JTdWJJdGVtcwEABAAEBAAIFFN5c3RlbS5EcmF3aW5nLkNvbG9yAwAAAAETU3lzdGVtLkRyYXdp + bmcuRm9udAMAAAAUU3lzdGVtLkRyYXdpbmcuQ29sb3IDAAAAAQIAAAAGBAAAAAZWZXJpZnn/////Bfv/ + //8UU3lzdGVtLkRyYXdpbmcuQ29sb3IEAAAABG5hbWUFdmFsdWUKa25vd25Db2xvcgVzdGF0ZQEAAAAJ + BwcDAAAACgAAAAAAAAAABQABAAAJBgAAAAH5////+////woAAAAAAAAAABoAAQABBQYAAAATU3lzdGVt + LkRyYXdpbmcuRm9udAQAAAAETmFtZQRTaXplBVN0eWxlBFVuaXQBAAQECxhTeXN0ZW0uRHJhd2luZy5G + b250U3R5bGUDAAAAG1N5c3RlbS5EcmF3aW5nLkdyYXBoaWNzVW5pdAMAAAADAAAABggAAAAGVGFob21h + AAAEQQX3////GFN5c3RlbS5EcmF3aW5nLkZvbnRTdHlsZQEAAAAHdmFsdWVfXwAIAwAAAAAAAAAF9v// + /xtTeXN0ZW0uRHJhd2luZy5HcmFwaGljc1VuaXQBAAAAB3ZhbHVlX18ACAMAAAADAAAACw== + + + + + AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w + LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkMAwAAAFFTeXN0 + ZW0uRHJhd2luZywgVmVyc2lvbj0yLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2Vu + PWIwM2Y1ZjdmMTFkNTBhM2EFAQAAACFTeXN0ZW0uV2luZG93cy5Gb3Jtcy5MaXN0Vmlld0l0ZW0HAAAA + BFRleHQKSW1hZ2VJbmRleAlCYWNrQ29sb3IHQ2hlY2tlZARGb250CUZvcmVDb2xvchdVc2VJdGVtU3R5 + bGVGb3JTdWJJdGVtcwEABAAEBAAIFFN5c3RlbS5EcmF3aW5nLkNvbG9yAwAAAAETU3lzdGVtLkRyYXdp + bmcuRm9udAMAAAAUU3lzdGVtLkRyYXdpbmcuQ29sb3IDAAAAAQIAAAAGBAAAABJWZXJpZnkgYW5kIGNv + bnZlcnT/////Bfv///8UU3lzdGVtLkRyYXdpbmcuQ29sb3IEAAAABG5hbWUFdmFsdWUKa25vd25Db2xv + cgVzdGF0ZQEAAAAJBwcDAAAACgAAAAAAAAAABQABAAAJBgAAAAH5////+////woAAAAAAAAAABoAAQAB + BQYAAAATU3lzdGVtLkRyYXdpbmcuRm9udAQAAAAETmFtZQRTaXplBVN0eWxlBFVuaXQBAAQECxhTeXN0 + ZW0uRHJhd2luZy5Gb250U3R5bGUDAAAAG1N5c3RlbS5EcmF3aW5nLkdyYXBoaWNzVW5pdAMAAAADAAAA + BggAAAAGVGFob21hAAAEQQX3////GFN5c3RlbS5EcmF3aW5nLkZvbnRTdHlsZQEAAAAHdmFsdWVfXwAI + AwAAAAAAAAAF9v///xtTeXN0ZW0uRHJhd2luZy5HcmFwaGljc1VuaXQBAAAAB3ZhbHVlX18ACAMAAAAD + AAAACw== + + + + + AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w + LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkMAwAAAFFTeXN0 + ZW0uRHJhd2luZywgVmVyc2lvbj0yLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2Vu + PWIwM2Y1ZjdmMTFkNTBhM2EFAQAAACFTeXN0ZW0uV2luZG93cy5Gb3Jtcy5MaXN0Vmlld0l0ZW0HAAAA + BFRleHQKSW1hZ2VJbmRleAlCYWNrQ29sb3IHQ2hlY2tlZARGb250CUZvcmVDb2xvchdVc2VJdGVtU3R5 + bGVGb3JTdWJJdGVtcwEABAAEBAAIFFN5c3RlbS5EcmF3aW5nLkNvbG9yAwAAAAETU3lzdGVtLkRyYXdp + bmcuRm9udAMAAAAUU3lzdGVtLkRyYXdpbmcuQ29sb3IDAAAAAQIAAAAGBAAAAAdDb252ZXJ0/////wX7 + ////FFN5c3RlbS5EcmF3aW5nLkNvbG9yBAAAAARuYW1lBXZhbHVlCmtub3duQ29sb3IFc3RhdGUBAAAA + CQcHAwAAAAoAAAAAAAAAAAUAAQAACQYAAAAB+f////v///8KAAAAAAAAAAAaAAEAAQUGAAAAE1N5c3Rl + bS5EcmF3aW5nLkZvbnQEAAAABE5hbWUEU2l6ZQVTdHlsZQRVbml0AQAEBAsYU3lzdGVtLkRyYXdpbmcu + Rm9udFN0eWxlAwAAABtTeXN0ZW0uRHJhd2luZy5HcmFwaGljc1VuaXQDAAAAAwAAAAYIAAAABlRhaG9t + YQAABEEF9////xhTeXN0ZW0uRHJhd2luZy5Gb250U3R5bGUBAAAAB3ZhbHVlX18ACAMAAAAAAAAABfb/ + //8bU3lzdGVtLkRyYXdpbmcuR3JhcGhpY3NVbml0AQAAAAd2YWx1ZV9fAAgDAAAAAwAAAAs= + + + + 6, 20 + + + 154, 77 + + + 2 + + + listViewScriptConditions + + + System.Windows.Forms.ListView, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxScriptConditions + + + 0 + + + 144, 7 + + + 261, 101 + + + 2 + + + Conditions + + + False + + + groupBoxScriptConditions + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage5 + + + 2 + + + 120 + + + 6, 6 + + + 124, 249 + + + 1 + + + listViewScripts + + + System.Windows.Forms.ListView, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage5 + + + 3 + + + 4, 22 + + + 535, 261 + + + 8 + + + Scripts + + + tabPage5 + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabControl1 + + + 7 + + + 0, 0 + + + 0, 0, 0, 0 + + + 543, 287 + + + 0 + + + tabControl1 + + + System.Windows.Forms.TabControl, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 0 + + + True + + + NoControl + + + 136, 45 + + + 48, 13 + + + 3 + + + Decoder + + + labelFormatDecoder + + + System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + + + NoControl + + + 136, 18 + + + 47, 13 + + + 1 + + + Encoder + + + labelFormatEncoder + + + System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 120 + True @@ -3005,11 +3799,41 @@ System.Windows.Forms.ToolTip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - imageList1 + + columnHeader1 - - System.Windows.Forms.ImageList, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + columnHeader3 + + + System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + columnHeader4 + + + System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + columnHeader6 + + + System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + columnHeader5 + + + System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + columnHeader2 + + + System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 frmSettings