This commit is contained in:
chudov
2009-05-01 15:16:26 +00:00
parent 599c1b2766
commit ade94128bb
59 changed files with 8117 additions and 4534 deletions

View File

@@ -30,10 +30,11 @@ namespace ArCueDotNet
{ {
CUESheet cueSheet = new CUESheet(config); CUESheet cueSheet = new CUESheet(config);
cueSheet.Action = CUEAction.Verify; cueSheet.Action = CUEAction.Verify;
//cueSheet.OutputStyle = CUEStyle.SingleFile;
cueSheet.Open(pathIn); cueSheet.Open(pathIn);
cueSheet.Lookup(); cueSheet.Lookup();
cueSheet.GenerateFilenames(OutputAudioFormat.NoAudio, false, pathIn); cueSheet.GenerateFilenames(AudioEncoderType.NoAudio, "dummy", pathIn);
cueSheet.WriteAudioFiles(Path.GetDirectoryName(pathIn), CUEStyle.SingleFile); cueSheet.Go();
cueSheet.GenerateAccurateRipLog(sw); cueSheet.GenerateAccurateRipLog(sw);
} }
catch (Exception ex) catch (Exception ex)

View File

@@ -116,6 +116,10 @@
</Compile> </Compile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\CUEControls\CUEControls.csproj">
<Project>{CA4D64E6-6544-4A29-8BA5-7DB08D50D072}</Project>
<Name>CUEControls</Name>
</ProjectReference>
<ProjectReference Include="..\CUETools.AccurateRip\CUETools.AccurateRip.csproj"> <ProjectReference Include="..\CUETools.AccurateRip\CUETools.AccurateRip.csproj">
<Project>{5802C7E9-157E-4124-946D-70B5AE48A5A1}</Project> <Project>{5802C7E9-157E-4124-946D-70B5AE48A5A1}</Project>
<Name>CUETools.AccurateRip</Name> <Name>CUETools.AccurateRip</Name>

View File

@@ -43,8 +43,7 @@ namespace CUERipper
this.Start = new System.Windows.Forms.ColumnHeader(); this.Start = new System.Windows.Forms.ColumnHeader();
this.Length = new System.Windows.Forms.ColumnHeader(); this.Length = new System.Windows.Forms.ColumnHeader();
this.buttonGo = new System.Windows.Forms.Button(); this.buttonGo = new System.Windows.Forms.Button();
this.comboLossless = new System.Windows.Forms.ComboBox(); this.comboBoxAudioFormat = new System.Windows.Forms.ComboBox();
this.comboCodec = new System.Windows.Forms.ComboBox();
this.comboImage = new System.Windows.Forms.ComboBox(); this.comboImage = new System.Windows.Forms.ComboBox();
this.buttonAbort = new System.Windows.Forms.Button(); this.buttonAbort = new System.Windows.Forms.Button();
this.buttonPause = 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.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.releaseBindingSource = new System.Windows.Forms.BindingSource(this.components); 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.statusStrip1.SuspendLayout();
this.contextMenuStripRelease.SuspendLayout(); this.contextMenuStripRelease.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.releaseBindingSource)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.releaseBindingSource)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericWriteOffset)).BeginInit();
this.groupBoxSettings.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// comboDrives // comboDrives
@@ -157,29 +166,19 @@ namespace CUERipper
this.buttonGo.UseVisualStyleBackColor = true; this.buttonGo.UseVisualStyleBackColor = true;
this.buttonGo.Click += new System.EventHandler(this.buttonGo_Click); this.buttonGo.Click += new System.EventHandler(this.buttonGo_Click);
// //
// comboLossless // comboBoxAudioFormat
// //
this.comboLossless.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.comboBoxAudioFormat.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboLossless.FormattingEnabled = true; this.comboBoxAudioFormat.FormattingEnabled = true;
this.comboLossless.Items.AddRange(new object[] { this.comboBoxAudioFormat.Items.AddRange(new object[] {
resources.GetString("comboLossless.Items"), resources.GetString("comboBoxAudioFormat.Items"),
resources.GetString("comboLossless.Items1"), resources.GetString("comboBoxAudioFormat.Items1"),
resources.GetString("comboLossless.Items2")}); resources.GetString("comboBoxAudioFormat.Items2"),
resources.ApplyResources(this.comboLossless, "comboLossless"); resources.GetString("comboBoxAudioFormat.Items3"),
this.comboLossless.Name = "comboLossless"; resources.GetString("comboBoxAudioFormat.Items4")});
// resources.ApplyResources(this.comboBoxAudioFormat, "comboBoxAudioFormat");
// comboCodec this.comboBoxAudioFormat.Name = "comboBoxAudioFormat";
// this.comboBoxAudioFormat.SelectedIndexChanged += new System.EventHandler(this.comboBoxAudioFormat_SelectedIndexChanged);
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";
// //
// comboImage // comboImage
// //
@@ -241,18 +240,90 @@ namespace CUERipper
// //
this.releaseBindingSource.DataSource = typeof(MusicBrainz.Release); 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 // frmCUERipper
// //
resources.ApplyResources(this, "$this"); resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.groupBoxSettings);
this.Controls.Add(this.comboRelease); this.Controls.Add(this.comboRelease);
this.Controls.Add(this.buttonPause); 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.listTracks);
this.Controls.Add(this.buttonAbort);
this.Controls.Add(this.buttonGo);
this.Controls.Add(this.statusStrip1); this.Controls.Add(this.statusStrip1);
this.Controls.Add(this.comboDrives); this.Controls.Add(this.comboDrives);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
@@ -265,6 +336,9 @@ namespace CUERipper
this.statusStrip1.PerformLayout(); this.statusStrip1.PerformLayout();
this.contextMenuStripRelease.ResumeLayout(false); this.contextMenuStripRelease.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.releaseBindingSource)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.releaseBindingSource)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numericWriteOffset)).EndInit();
this.groupBoxSettings.ResumeLayout(false);
this.groupBoxSettings.PerformLayout();
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();
@@ -283,8 +357,7 @@ namespace CUERipper
private System.Windows.Forms.ColumnHeader Start; private System.Windows.Forms.ColumnHeader Start;
private System.Windows.Forms.ColumnHeader Length; private System.Windows.Forms.ColumnHeader Length;
private System.Windows.Forms.Button buttonGo; private System.Windows.Forms.Button buttonGo;
private System.Windows.Forms.ComboBox comboLossless; private System.Windows.Forms.ComboBox comboBoxAudioFormat;
private System.Windows.Forms.ComboBox comboCodec;
private System.Windows.Forms.ComboBox comboImage; private System.Windows.Forms.ComboBox comboImage;
private System.Windows.Forms.Button buttonAbort; private System.Windows.Forms.Button buttonAbort;
private System.Windows.Forms.Button buttonPause; private System.Windows.Forms.Button buttonPause;
@@ -295,6 +368,14 @@ namespace CUERipper
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1; private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1;
private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel2; private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel2;
private System.Windows.Forms.ToolStripStatusLabel toolStripStatusAr; 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;
} }
} }

View File

@@ -25,17 +25,19 @@ namespace CUERipper
private CDDriveReader _reader = null; private CDDriveReader _reader = null;
private StartStop _startStop; private StartStop _startStop;
private CUEConfig _config; private CUEConfig _config;
private OutputAudioFormat _format; private string _format;
private CUEStyle _style;
private CUESheet _cueSheet; private CUESheet _cueSheet;
private string _pathOut; private string _pathOut;
private string _pathFormat; private string _pathFormat;
string _defaultLosslessFormat, _defaultLossyFormat, _defaultHybridFormat;
private CUEControls.ShellIconMgr m_icon_mgr;
public frmCUERipper() public frmCUERipper()
{ {
InitializeComponent(); InitializeComponent();
_config = new CUEConfig(); _config = new CUEConfig();
_startStop = new StartStop(); _startStop = new StartStop();
m_icon_mgr = new CUEControls.ShellIconMgr();
} }
//private byte toBCD(int val) //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.createEACLOG = sr.LoadBoolean("CreateEACLOG") ?? false;
_config.preserveHTOA = sr.LoadBoolean("PreserveHTOA") ?? false; _config.preserveHTOA = sr.LoadBoolean("PreserveHTOA") ?? false;
_config.createM3U = sr.LoadBoolean("CreateM3U") ?? true; _config.createM3U = sr.LoadBoolean("CreateM3U") ?? true;
_pathFormat = sr.Load("PathFormat") ?? "%D\\%Y - %C\\%D - %C.cue"; _pathFormat = sr.Load("PathFormat") ?? "%music%\\%artist%\\%year% - %album%\\%artist% - %album%.cue";
comboLossless.SelectedIndex = sr.LoadInt32("ComboLossless", 0, comboLossless.Items.Count - 1) ?? 0; checkBoxEACMode.Checked = _config.createEACLOG;
comboCodec.SelectedIndex = sr.LoadInt32("ComboCodec", 0, comboCodec.Items.Count - 1) ?? 0; 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; comboImage.SelectedIndex = sr.LoadInt32("ComboImage", 0, comboImage.Items.Count - 1) ?? 0;
UpdateDrives(); UpdateDrives();
} }
@@ -153,9 +159,7 @@ namespace CUERipper
listTracks.Enabled = listTracks.Enabled =
comboDrives.Enabled = comboDrives.Enabled =
comboRelease.Enabled = comboRelease.Enabled =
comboCodec.Enabled = groupBoxSettings.Enabled = !running;
comboImage.Enabled =
comboLossless.Enabled = !running;
buttonPause.Visible = buttonPause.Enabled = buttonAbort.Visible = buttonAbort.Enabled = running; buttonPause.Visible = buttonPause.Enabled = buttonAbort.Visible = buttonAbort.Enabled = running;
buttonGo.Visible = buttonGo.Enabled = !running; buttonGo.Visible = buttonGo.Enabled = !running;
toolStripStatusLabel1.Text = String.Empty; toolStripStatusLabel1.Text = String.Empty;
@@ -209,11 +213,11 @@ namespace CUERipper
{ {
CDDriveReader audioSource = (CDDriveReader)o; CDDriveReader audioSource = (CDDriveReader)o;
audioSource.ReadProgress += new EventHandler<ReadProgressArgs>(CDReadProgress); audioSource.ReadProgress += new EventHandler<ReadProgressArgs>(CDReadProgress);
audioSource.DriveOffset = (int)numericWriteOffset.Value;
try try
{ {
string outDir = Path.GetDirectoryName(_pathOut); _cueSheet.Go();
_cueSheet.WriteAudioFiles(outDir == "" ? "." : outDir, _style);
//CUESheet.WriteText(_pathOut, _cueSheet.CUESheetContents(_style)); //CUESheet.WriteText(_pathOut, _cueSheet.CUESheetContents(_style));
//CUESheet.WriteText(Path.ChangeExtension(_pathOut, ".log"), _cueSheet.LOGContents()); //CUESheet.WriteText(Path.ChangeExtension(_pathOut, ".log"), _cueSheet.LOGContents());
} }
@@ -243,12 +247,20 @@ namespace CUERipper
private string GenerateOutputPath() private string GenerateOutputPath()
{ {
List<string> find = new List<string>(); List<string> find = new List<string>();
find.Add("%music%");
find.Add("%artist%");
find.Add("%D"); find.Add("%D");
find.Add("%album%");
find.Add("%C"); find.Add("%C");
find.Add("%year%");
find.Add("%Y"); find.Add("%Y");
List<string> replace = new List<string>(); List<string> replace = new List<string>();
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.Artist)));
replace.Add(General.EmptyStringToNull(_config.CleanseString(_cueSheet.Title))); replace.Add(General.EmptyStringToNull(_config.CleanseString(_cueSheet.Title)));
replace.Add(General.EmptyStringToNull(_config.CleanseString(_cueSheet.Title)));
replace.Add(_cueSheet.Year);
replace.Add(_cueSheet.Year); replace.Add(_cueSheet.Year);
return Path.ChangeExtension(General.ReplaceMultiple(_pathFormat, find, replace) ?? "image.cue", ".cue"); return Path.ChangeExtension(General.ReplaceMultiple(_pathFormat, find, replace) ?? "image.cue", ".cue");
@@ -259,19 +271,13 @@ namespace CUERipper
if (_reader == null) if (_reader == null)
return; return;
_style = comboImage.SelectedIndex == 0 ? CUEStyle.SingleFileWithCUE : _cueSheet.OutputStyle = comboImage.SelectedIndex == 0 ? CUEStyle.SingleFileWithCUE :
CUEStyle.GapsAppended; CUEStyle.GapsAppended;
_pathOut = GenerateOutputPath(); _pathOut = GenerateOutputPath();
_config.lossyWAVHybrid = comboLossless.SelectedIndex == 1; // _cueSheet.Config? if (_cueSheet.OutputStyle == CUEStyle.SingleFileWithCUE)
if (_style == CUEStyle.SingleFileWithCUE)
_cueSheet.SingleFilename = Path.GetFileName(_pathOut); _cueSheet.SingleFilename = Path.GetFileName(_pathOut);
_format = (string)comboCodec.SelectedItem == "wav" ? OutputAudioFormat.WAV : _format = (string)comboBoxAudioFormat.SelectedItem;
(string)comboCodec.SelectedItem == "flac" ? OutputAudioFormat.FLAC : _cueSheet.GenerateFilenames(SelectedOutputAudioType, _format, _pathOut);
(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);
_workThread = new Thread(Rip); _workThread = new Thread(Rip);
_workThread.Priority = ThreadPriority.BelowNormal; _workThread.Priority = ThreadPriority.BelowNormal;
@@ -353,6 +359,7 @@ namespace CUERipper
ReleaseInfo r = new ReleaseInfo(); ReleaseInfo r = new ReleaseInfo();
r.cueSheet = new CUESheet(_config); r.cueSheet = new CUESheet(_config);
r.cueSheet.OpenCD(audioSource); r.cueSheet.OpenCD(audioSource);
//r.cueSheet.WriteOffset =
General.SetCUELine(r.cueSheet.Attributes, "REM", "GENRE", "", true); General.SetCUELine(r.cueSheet.Attributes, "REM", "GENRE", "", true);
General.SetCUELine(r.cueSheet.Attributes, "REM", "DATE", "", false); General.SetCUELine(r.cueSheet.Attributes, "REM", "DATE", "", false);
General.SetCUELine(r.cueSheet.Attributes, "REM", "DISCID", AccurateRipVerify.CalculateCDDBId(audioSource.TOC), false); General.SetCUELine(r.cueSheet.Attributes, "REM", "DISCID", AccurateRipVerify.CalculateCDDBId(audioSource.TOC), false);
@@ -488,7 +495,7 @@ namespace CUERipper
SetupControls(); SetupControls();
comboRelease.SelectedIndex = 0; comboRelease.SelectedIndex = 0;
CUESheet cueSheet = ((ReleaseInfo)comboRelease.SelectedItem).cueSheet; 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.Text = cueSheet.ArVerify.ARStatus == null ? cueSheet.ArVerify.Total(0).ToString() : "?";
toolStripStatusAr.ToolTipText = "AccurateRip: " + (cueSheet.ArVerify.ARStatus ?? "found") + "."; toolStripStatusAr.ToolTipText = "AccurateRip: " + (cueSheet.ArVerify.ARStatus ?? "found") + ".";
}); });
@@ -509,9 +516,11 @@ namespace CUERipper
try try
{ {
_reader.Open(_reader.Path[0]); _reader.Open(_reader.Path[0]);
numericWriteOffset.Value = _reader.DriveOffset;
} }
catch (Exception ex) catch (Exception ex)
{ {
numericWriteOffset.Value = _reader.DriveOffset;
_reader.Close(); _reader.Close();
comboRelease.Items.Add(ex.Message); comboRelease.Items.Add(ex.Message);
comboRelease.SelectedIndex = 0; comboRelease.SelectedIndex = 0;
@@ -603,12 +612,15 @@ namespace CUERipper
private void frmCUERipper_FormClosed(object sender, FormClosedEventArgs e) private void frmCUERipper_FormClosed(object sender, FormClosedEventArgs e)
{ {
SettingsWriter sw = new SettingsWriter("CUERipper", "settings.txt"); SettingsWriter sw = new SettingsWriter("CUERipper", "settings.txt", Application.ExecutablePath);
if (_config.createEACLOG) sw.Save("CreateEACLOG", _config.createEACLOG); sw.Save("DefaultLosslessFormat", _defaultLosslessFormat);
sw.Save("DefaultLossyFormat", _defaultLossyFormat);
sw.Save("DefaultHybridFormat", _defaultHybridFormat);
sw.Save("CreateEACLOG", _config.createEACLOG);
sw.Save("PreserveHTOA", _config.preserveHTOA); sw.Save("PreserveHTOA", _config.preserveHTOA);
sw.Save("CreateM3U", _config.createM3U); sw.Save("CreateM3U", _config.createM3U);
sw.Save("ComboLossless", comboLossless.SelectedIndex); sw.Save("OutputAudioType", (int)SelectedOutputAudioType);
sw.Save("ComboCodec", comboCodec.SelectedIndex); sw.Save("ComboCodec", comboBoxAudioFormat.SelectedIndex);
sw.Save("ComboImage", comboImage.SelectedIndex); sw.Save("ComboImage", comboImage.SelectedIndex);
sw.Save("PathFormat", _pathFormat); sw.Save("PathFormat", _pathFormat);
sw.Close(); sw.Close();
@@ -619,6 +631,139 @@ namespace CUERipper
if (!_reader.TOC[e.Item + 1].IsAudio) if (!_reader.TOC[e.Item + 1].IsAudio)
e.CancelEdit = true; 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<string, CUEToolsFormat> 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<string, CUEToolsFormat> 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<string, CUEToolsUDC> 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 public class StartStop

View File

@@ -126,7 +126,7 @@
<value>6, 6</value> <value>6, 6</value>
</data> </data>
<data name="comboDrives.Size" type="System.Drawing.Size, System.Drawing"> <data name="comboDrives.Size" type="System.Drawing.Size, System.Drawing">
<value>481, 21</value> <value>487, 21</value>
</data> </data>
<assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> <assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="comboDrives.TabIndex" type="System.Int32, mscorlib"> <data name="comboDrives.TabIndex" type="System.Int32, mscorlib">
@@ -142,13 +142,13 @@
<value>$this</value> <value>$this</value>
</data> </data>
<data name="&gt;&gt;comboDrives.ZOrder" xml:space="preserve"> <data name="&gt;&gt;comboDrives.ZOrder" xml:space="preserve">
<value>10</value> <value>8</value>
</data> </data>
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>0, 371</value> <value>0, 443</value>
</metadata> </metadata>
<data name="toolStripStatusLabel1.Size" type="System.Drawing.Size, System.Drawing"> <data name="toolStripStatusLabel1.Size" type="System.Drawing.Size, System.Drawing">
<value>223, 17</value> <value>260, 17</value>
</data> </data>
<data name="toolStripStatusLabel1.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing"> <data name="toolStripStatusLabel1.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleLeft</value> <value>MiddleLeft</value>
@@ -201,10 +201,10 @@
<value>toolStripStatusAr</value> <value>toolStripStatusAr</value>
</data> </data>
<data name="statusStrip1.Location" type="System.Drawing.Point, System.Drawing"> <data name="statusStrip1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 371</value> <value>0, 443</value>
</data> </data>
<data name="statusStrip1.Size" type="System.Drawing.Size, System.Drawing"> <data name="statusStrip1.Size" type="System.Drawing.Size, System.Drawing">
<value>499, 22</value> <value>505, 22</value>
</data> </data>
<data name="statusStrip1.TabIndex" type="System.Int32, mscorlib"> <data name="statusStrip1.TabIndex" type="System.Int32, mscorlib">
<value>12</value> <value>12</value>
@@ -222,7 +222,7 @@
<value>$this</value> <value>$this</value>
</data> </data>
<data name="&gt;&gt;statusStrip1.ZOrder" xml:space="preserve"> <data name="&gt;&gt;statusStrip1.ZOrder" xml:space="preserve">
<value>9</value> <value>7</value>
</data> </data>
<data name="listTracks.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms"> <data name="listTracks.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Left, Right</value> <value>Top, Left, Right</value>
@@ -234,7 +234,7 @@
<value>Title</value> <value>Title</value>
</data> </data>
<data name="Title.Width" type="System.Int32, mscorlib"> <data name="Title.Width" type="System.Int32, mscorlib">
<value>307</value> <value>292</value>
</data> </data>
<data name="TrackNo.DisplayIndex" type="System.Int32, mscorlib"> <data name="TrackNo.DisplayIndex" type="System.Int32, mscorlib">
<value>0</value> <value>0</value>
@@ -261,7 +261,7 @@
<value>6, 60</value> <value>6, 60</value>
</data> </data>
<data name="listTracks.Size" type="System.Drawing.Size, System.Drawing"> <data name="listTracks.Size" type="System.Drawing.Size, System.Drawing">
<value>481, 269</value> <value>487, 272</value>
</data> </data>
<data name="listTracks.TabIndex" type="System.Int32, mscorlib"> <data name="listTracks.TabIndex" type="System.Int32, mscorlib">
<value>0</value> <value>0</value>
@@ -276,7 +276,7 @@
<value>$this</value> <value>$this</value>
</data> </data>
<data name="&gt;&gt;listTracks.ZOrder" xml:space="preserve"> <data name="&gt;&gt;listTracks.ZOrder" xml:space="preserve">
<value>8</value> <value>4</value>
</data> </data>
<data name="buttonGo.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms"> <data name="buttonGo.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Left, Right</value> <value>Top, Left, Right</value>
@@ -285,10 +285,10 @@
<value>NoControl</value> <value>NoControl</value>
</data> </data>
<data name="buttonGo.Location" type="System.Drawing.Point, System.Drawing"> <data name="buttonGo.Location" type="System.Drawing.Point, System.Drawing">
<value>396, 335</value> <value>382, 406</value>
</data> </data>
<data name="buttonGo.Size" type="System.Drawing.Size, System.Drawing"> <data name="buttonGo.Size" type="System.Drawing.Size, System.Drawing">
<value>91, 33</value> <value>111, 33</value>
</data> </data>
<data name="buttonGo.TabIndex" type="System.Int32, mscorlib"> <data name="buttonGo.TabIndex" type="System.Int32, mscorlib">
<value>13</value> <value>13</value>
@@ -306,73 +306,43 @@
<value>$this</value> <value>$this</value>
</data> </data>
<data name="&gt;&gt;buttonGo.ZOrder" xml:space="preserve"> <data name="&gt;&gt;buttonGo.ZOrder" xml:space="preserve">
<value>7</value>
</data>
<data name="comboLossless.Items" xml:space="preserve">
<value>lossless</value>
</data>
<data name="comboLossless.Items1" xml:space="preserve">
<value>hybrid</value>
</data>
<data name="comboLossless.Items2" xml:space="preserve">
<value>lossy</value>
</data>
<data name="comboLossless.Location" type="System.Drawing.Point, System.Drawing">
<value>6, 335</value>
</data>
<data name="comboLossless.Size" type="System.Drawing.Size, System.Drawing">
<value>70, 21</value>
</data>
<data name="comboLossless.TabIndex" type="System.Int32, mscorlib">
<value>16</value>
</data>
<data name="&gt;&gt;comboLossless.Name" xml:space="preserve">
<value>comboLossless</value>
</data>
<data name="&gt;&gt;comboLossless.Type" xml:space="preserve">
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;comboLossless.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;comboLossless.ZOrder" xml:space="preserve">
<value>6</value> <value>6</value>
</data> </data>
<data name="comboCodec.Items" xml:space="preserve"> <data name="comboBoxAudioFormat.Items" xml:space="preserve">
<value>flac</value> <value>flac</value>
</data> </data>
<data name="comboCodec.Items1" xml:space="preserve"> <data name="comboBoxAudioFormat.Items1" xml:space="preserve">
<value>wv</value> <value>wv</value>
</data> </data>
<data name="comboCodec.Items2" xml:space="preserve"> <data name="comboBoxAudioFormat.Items2" xml:space="preserve">
<value>wav</value> <value>wav</value>
</data> </data>
<data name="comboCodec.Items3" xml:space="preserve"> <data name="comboBoxAudioFormat.Items3" xml:space="preserve">
<value>ape</value> <value>ape</value>
</data> </data>
<data name="comboCodec.Items4" xml:space="preserve"> <data name="comboBoxAudioFormat.Items4" xml:space="preserve">
<value>tta</value> <value>tta</value>
</data> </data>
<data name="comboCodec.Location" type="System.Drawing.Point, System.Drawing"> <data name="comboBoxAudioFormat.Location" type="System.Drawing.Point, System.Drawing">
<value>82, 335</value> <value>103, 20</value>
</data> </data>
<data name="comboCodec.Size" type="System.Drawing.Size, System.Drawing"> <data name="comboBoxAudioFormat.Size" type="System.Drawing.Size, System.Drawing">
<value>70, 21</value> <value>89, 21</value>
</data> </data>
<data name="comboCodec.TabIndex" type="System.Int32, mscorlib"> <data name="comboBoxAudioFormat.TabIndex" type="System.Int32, mscorlib">
<value>17</value> <value>17</value>
</data> </data>
<data name="&gt;&gt;comboCodec.Name" xml:space="preserve"> <data name="&gt;&gt;comboBoxAudioFormat.Name" xml:space="preserve">
<value>comboCodec</value> <value>comboBoxAudioFormat</value>
</data> </data>
<data name="&gt;&gt;comboCodec.Type" xml:space="preserve"> <data name="&gt;&gt;comboBoxAudioFormat.Type" xml:space="preserve">
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="&gt;&gt;comboCodec.Parent" xml:space="preserve"> <data name="&gt;&gt;comboBoxAudioFormat.Parent" xml:space="preserve">
<value>$this</value> <value>groupBoxSettings</value>
</data> </data>
<data name="&gt;&gt;comboCodec.ZOrder" xml:space="preserve"> <data name="&gt;&gt;comboBoxAudioFormat.ZOrder" xml:space="preserve">
<value>5</value> <value>1</value>
</data> </data>
<data name="comboImage.Items" xml:space="preserve"> <data name="comboImage.Items" xml:space="preserve">
<value>image</value> <value>image</value>
@@ -381,10 +351,10 @@
<value>tracks</value> <value>tracks</value>
</data> </data>
<data name="comboImage.Location" type="System.Drawing.Point, System.Drawing"> <data name="comboImage.Location" type="System.Drawing.Point, System.Drawing">
<value>158, 335</value> <value>103, 49</value>
</data> </data>
<data name="comboImage.Size" type="System.Drawing.Size, System.Drawing"> <data name="comboImage.Size" type="System.Drawing.Size, System.Drawing">
<value>70, 21</value> <value>89, 21</value>
</data> </data>
<data name="comboImage.TabIndex" type="System.Int32, mscorlib"> <data name="comboImage.TabIndex" type="System.Int32, mscorlib">
<value>18</value> <value>18</value>
@@ -396,10 +366,10 @@
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="&gt;&gt;comboImage.Parent" xml:space="preserve"> <data name="&gt;&gt;comboImage.Parent" xml:space="preserve">
<value>$this</value> <value>groupBoxSettings</value>
</data> </data>
<data name="&gt;&gt;comboImage.ZOrder" xml:space="preserve"> <data name="&gt;&gt;comboImage.ZOrder" xml:space="preserve">
<value>4</value> <value>5</value>
</data> </data>
<data name="buttonAbort.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms"> <data name="buttonAbort.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Left, Right</value> <value>Top, Left, Right</value>
@@ -408,10 +378,10 @@
<value>NoControl</value> <value>NoControl</value>
</data> </data>
<data name="buttonAbort.Location" type="System.Drawing.Point, System.Drawing"> <data name="buttonAbort.Location" type="System.Drawing.Point, System.Drawing">
<value>396, 335</value> <value>382, 406</value>
</data> </data>
<data name="buttonAbort.Size" type="System.Drawing.Size, System.Drawing"> <data name="buttonAbort.Size" type="System.Drawing.Size, System.Drawing">
<value>91, 33</value> <value>111, 33</value>
</data> </data>
<data name="buttonAbort.TabIndex" type="System.Int32, mscorlib"> <data name="buttonAbort.TabIndex" type="System.Int32, mscorlib">
<value>19</value> <value>19</value>
@@ -432,7 +402,7 @@
<value>$this</value> <value>$this</value>
</data> </data>
<data name="&gt;&gt;buttonAbort.ZOrder" xml:space="preserve"> <data name="&gt;&gt;buttonAbort.ZOrder" xml:space="preserve">
<value>3</value> <value>5</value>
</data> </data>
<data name="buttonPause.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms"> <data name="buttonPause.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Left, Right</value> <value>Top, Left, Right</value>
@@ -441,10 +411,10 @@
<value>NoControl</value> <value>NoControl</value>
</data> </data>
<data name="buttonPause.Location" type="System.Drawing.Point, System.Drawing"> <data name="buttonPause.Location" type="System.Drawing.Point, System.Drawing">
<value>299, 335</value> <value>382, 367</value>
</data> </data>
<data name="buttonPause.Size" type="System.Drawing.Size, System.Drawing"> <data name="buttonPause.Size" type="System.Drawing.Size, System.Drawing">
<value>91, 33</value> <value>111, 33</value>
</data> </data>
<data name="buttonPause.TabIndex" type="System.Int32, mscorlib"> <data name="buttonPause.TabIndex" type="System.Int32, mscorlib">
<value>20</value> <value>20</value>
@@ -465,7 +435,7 @@
<value>$this</value> <value>$this</value>
</data> </data>
<data name="&gt;&gt;buttonPause.ZOrder" xml:space="preserve"> <data name="&gt;&gt;buttonPause.ZOrder" xml:space="preserve">
<value>2</value> <value>3</value>
</data> </data>
<data name="comboRelease.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms"> <data name="comboRelease.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Left, Right</value> <value>Top, Left, Right</value>
@@ -492,7 +462,7 @@
<value>6, 33</value> <value>6, 33</value>
</data> </data>
<data name="comboRelease.Size" type="System.Drawing.Size, System.Drawing"> <data name="comboRelease.Size" type="System.Drawing.Size, System.Drawing">
<value>481, 21</value> <value>487, 21</value>
</data> </data>
<data name="comboRelease.TabIndex" type="System.Int32, mscorlib"> <data name="comboRelease.TabIndex" type="System.Int32, mscorlib">
<value>21</value> <value>21</value>
@@ -507,7 +477,7 @@
<value>$this</value> <value>$this</value>
</data> </data>
<data name="&gt;&gt;comboRelease.ZOrder" xml:space="preserve"> <data name="&gt;&gt;comboRelease.ZOrder" xml:space="preserve">
<value>1</value> <value>2</value>
</data> </data>
<data name="toolStripMenuItem1.Size" type="System.Drawing.Size, System.Drawing"> <data name="toolStripMenuItem1.Size" type="System.Drawing.Size, System.Drawing">
<value>181, 22</value> <value>181, 22</value>
@@ -518,6 +488,219 @@
<metadata name="releaseBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="releaseBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>116, 371</value> <value>116, 371</value>
</metadata> </metadata>
<data name="numericWriteOffset.Location" type="System.Drawing.Point, System.Drawing">
<value>305, 19</value>
</data>
<data name="numericWriteOffset.Size" type="System.Drawing.Size, System.Drawing">
<value>54, 20</value>
</data>
<data name="numericWriteOffset.TabIndex" type="System.Int32, mscorlib">
<value>22</value>
</data>
<data name="numericWriteOffset.TextAlign" type="System.Windows.Forms.HorizontalAlignment, System.Windows.Forms">
<value>Right</value>
</data>
<data name="&gt;&gt;numericWriteOffset.Name" xml:space="preserve">
<value>numericWriteOffset</value>
</data>
<data name="&gt;&gt;numericWriteOffset.Type" xml:space="preserve">
<value>System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;numericWriteOffset.Parent" xml:space="preserve">
<value>groupBoxSettings</value>
</data>
<data name="&gt;&gt;numericWriteOffset.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="lblWriteOffset.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="lblWriteOffset.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="lblWriteOffset.Location" type="System.Drawing.Point, System.Drawing">
<value>237, 21</value>
</data>
<data name="lblWriteOffset.Size" type="System.Drawing.Size, System.Drawing">
<value>62, 13</value>
</data>
<data name="lblWriteOffset.TabIndex" type="System.Int32, mscorlib">
<value>23</value>
</data>
<data name="lblWriteOffset.Text" xml:space="preserve">
<value>Read offset</value>
</data>
<data name="&gt;&gt;lblWriteOffset.Name" xml:space="preserve">
<value>lblWriteOffset</value>
</data>
<data name="&gt;&gt;lblWriteOffset.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lblWriteOffset.Parent" xml:space="preserve">
<value>groupBoxSettings</value>
</data>
<data name="&gt;&gt;lblWriteOffset.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="comboBoxEncoder.Location" type="System.Drawing.Point, System.Drawing">
<value>103, 78</value>
</data>
<data name="comboBoxEncoder.Size" type="System.Drawing.Size, System.Drawing">
<value>89, 21</value>
</data>
<data name="comboBoxEncoder.TabIndex" type="System.Int32, mscorlib">
<value>24</value>
</data>
<data name="&gt;&gt;comboBoxEncoder.Name" xml:space="preserve">
<value>comboBoxEncoder</value>
</data>
<data name="&gt;&gt;comboBoxEncoder.Type" xml:space="preserve">
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;comboBoxEncoder.Parent" xml:space="preserve">
<value>groupBoxSettings</value>
</data>
<data name="&gt;&gt;comboBoxEncoder.ZOrder" xml:space="preserve">
<value>7</value>
</data>
<data name="radioButtonAudioLossy.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="radioButtonAudioLossy.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="radioButtonAudioLossy.Location" type="System.Drawing.Point, System.Drawing">
<value>6, 36</value>
</data>
<data name="radioButtonAudioLossy.Size" type="System.Drawing.Size, System.Drawing">
<value>52, 17</value>
</data>
<data name="radioButtonAudioLossy.TabIndex" type="System.Int32, mscorlib">
<value>27</value>
</data>
<data name="radioButtonAudioLossy.Text" xml:space="preserve">
<value>Lossy</value>
</data>
<data name="&gt;&gt;radioButtonAudioLossy.Name" xml:space="preserve">
<value>radioButtonAudioLossy</value>
</data>
<data name="&gt;&gt;radioButtonAudioLossy.Type" xml:space="preserve">
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;radioButtonAudioLossy.Parent" xml:space="preserve">
<value>groupBoxSettings</value>
</data>
<data name="&gt;&gt;radioButtonAudioLossy.ZOrder" xml:space="preserve">
<value>6</value>
</data>
<data name="radioButtonAudioHybrid.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="radioButtonAudioHybrid.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="radioButtonAudioHybrid.Location" type="System.Drawing.Point, System.Drawing">
<value>6, 53</value>
</data>
<data name="radioButtonAudioHybrid.Size" type="System.Drawing.Size, System.Drawing">
<value>55, 17</value>
</data>
<data name="radioButtonAudioHybrid.TabIndex" type="System.Int32, mscorlib">
<value>26</value>
</data>
<data name="radioButtonAudioHybrid.Text" xml:space="preserve">
<value>Hybrid</value>
</data>
<data name="&gt;&gt;radioButtonAudioHybrid.Name" xml:space="preserve">
<value>radioButtonAudioHybrid</value>
</data>
<data name="&gt;&gt;radioButtonAudioHybrid.Type" xml:space="preserve">
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;radioButtonAudioHybrid.Parent" xml:space="preserve">
<value>groupBoxSettings</value>
</data>
<data name="&gt;&gt;radioButtonAudioHybrid.ZOrder" xml:space="preserve">
<value>8</value>
</data>
<data name="radioButtonAudioLossless.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="radioButtonAudioLossless.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="radioButtonAudioLossless.Location" type="System.Drawing.Point, System.Drawing">
<value>6, 19</value>
</data>
<data name="radioButtonAudioLossless.Size" type="System.Drawing.Size, System.Drawing">
<value>65, 17</value>
</data>
<data name="radioButtonAudioLossless.TabIndex" type="System.Int32, mscorlib">
<value>25</value>
</data>
<data name="radioButtonAudioLossless.Text" xml:space="preserve">
<value>Lossless</value>
</data>
<data name="&gt;&gt;radioButtonAudioLossless.Name" xml:space="preserve">
<value>radioButtonAudioLossless</value>
</data>
<data name="&gt;&gt;radioButtonAudioLossless.Type" xml:space="preserve">
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;radioButtonAudioLossless.Parent" xml:space="preserve">
<value>groupBoxSettings</value>
</data>
<data name="&gt;&gt;radioButtonAudioLossless.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="checkBoxEACMode.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="checkBoxEACMode.Location" type="System.Drawing.Point, System.Drawing">
<value>6, 77</value>
</data>
<data name="checkBoxEACMode.Size" type="System.Drawing.Size, System.Drawing">
<value>76, 17</value>
</data>
<data name="checkBoxEACMode.TabIndex" type="System.Int32, mscorlib">
<value>28</value>
</data>
<data name="checkBoxEACMode.Text" xml:space="preserve">
<value>EAC mode</value>
</data>
<data name="&gt;&gt;checkBoxEACMode.Name" xml:space="preserve">
<value>checkBoxEACMode</value>
</data>
<data name="&gt;&gt;checkBoxEACMode.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;checkBoxEACMode.Parent" xml:space="preserve">
<value>groupBoxSettings</value>
</data>
<data name="&gt;&gt;checkBoxEACMode.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="groupBoxSettings.Location" type="System.Drawing.Point, System.Drawing">
<value>6, 332</value>
</data>
<data name="groupBoxSettings.Size" type="System.Drawing.Size, System.Drawing">
<value>370, 108</value>
</data>
<data name="groupBoxSettings.TabIndex" type="System.Int32, mscorlib">
<value>29</value>
</data>
<data name="&gt;&gt;groupBoxSettings.Name" xml:space="preserve">
<value>groupBoxSettings</value>
</data>
<data name="&gt;&gt;groupBoxSettings.Type" xml:space="preserve">
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;groupBoxSettings.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;groupBoxSettings.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
@@ -525,7 +708,7 @@
<value>6, 13</value> <value>6, 13</value>
</data> </data>
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing"> <data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>499, 393</value> <value>505, 465</value>
</data> </data>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
@@ -559,7 +742,7 @@
<value>CenterScreen</value> <value>CenterScreen</value>
</data> </data>
<data name="$this.Text" xml:space="preserve"> <data name="$this.Text" xml:space="preserve">
<value>CUERipper 1.9.5a</value> <value>CUERipper 2.0.2</value>
</data> </data>
<data name="&gt;&gt;toolStripStatusLabel1.Name" xml:space="preserve"> <data name="&gt;&gt;toolStripStatusLabel1.Name" xml:space="preserve">
<value>toolStripStatusLabel1</value> <value>toolStripStatusLabel1</value>

View File

@@ -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) if (AccResult == HttpStatusCode.NotFound)
{ {
@@ -504,9 +504,11 @@ namespace CUETools.AccurateRip
// sw.WriteLine(String.Format(" {0:00}\t[{1:x8}] Database access error {2}", iTrack + 1, _tracks[iTrack].CRC, accResult.ToString())); // sw.WriteLine(String.Format(" {0:00}\t[{1:x8}] Database access error {2}", iTrack + 1, _tracks[iTrack].CRC, accResult.ToString()));
} }
else else
{
if (verbose)
{ {
sw.WriteLine("Track\t[ CRC ] Status"); sw.WriteLine("Track\t[ CRC ] Status");
GenerateLog(sw, offsetApplied); GenerateLog(sw, 0);
uint offsets_match = 0; uint offsets_match = 0;
for (int oi = -_arOffsetRange; oi <= _arOffsetRange; oi++) for (int oi = -_arOffsetRange; oi <= _arOffsetRange; oi++)
{ {
@@ -516,7 +518,7 @@ namespace CUETools.AccurateRip
if ((CRC(iTrack, oi) == AccDisks[di].tracks[iTrack].CRC && AccDisks[di].tracks[iTrack].CRC != 0) || 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)) (CRC450(iTrack, oi) == AccDisks[di].tracks[iTrack].Frame450CRC && AccDisks[di].tracks[iTrack].Frame450CRC != 0))
matches++; matches++;
if (matches != 0 && oi != offsetApplied) if (matches != 0 && oi != 0)
{ {
if (offsets_match++ > 10) if (offsets_match++ > 10)
{ {
@@ -528,7 +530,49 @@ namespace CUETools.AccurateRip
} }
} }
} }
if (CRC32(0) != 0) 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 && (_hasLogCRC || verbose))
{ {
sw.WriteLine(""); sw.WriteLine("");
sw.WriteLine("Track\t[ CRC32 ]\t[W/O NULL]\t{0:10}", _hasLogCRC ? "[ LOG ]" : ""); sw.WriteLine("Track\t[ CRC32 ]\t[W/O NULL]\t{0:10}", _hasLogCRC ? "[ LOG ]" : "");

View File

@@ -165,6 +165,10 @@ namespace CUETools.CDImage
{ {
return _start - _indexes[0].Start; return _start - _indexes[0].Start;
} }
set
{
_indexes[0].Start = _start - value;
}
} }
public CDTrackIndex this[int key] public CDTrackIndex this[int key]

View File

@@ -47,10 +47,11 @@ namespace CUETools.Codecs.ALAC
return AudioSamples.Read(this, buff); return AudioSamples.Read(this, buff);
} }
public uint Read(int[,] buff, uint sampleCount) private void InitTables()
{
if (_predicterror_buffer_a == null)
{ {
if (_predicterror_buffer_a != null)
return;
setinfo_max_samples_per_frame = read_uint32(_codecData, 24); setinfo_max_samples_per_frame = read_uint32(_codecData, 24);
byte setinfo_7a = read_uint8(_codecData, 28); byte setinfo_7a = read_uint8(_codecData, 28);
byte setinfo_sample_size = read_uint8(_codecData, 29); byte setinfo_sample_size = read_uint8(_codecData, 29);
@@ -72,13 +73,17 @@ namespace CUETools.Codecs.ALAC
_framesBuffer = new byte[65536]; _framesBuffer = new byte[65536];
} }
public uint Read(int[,] buff, uint sampleCount)
{
InitTables();
uint offset = 0; uint offset = 0;
while (_samplesInBuffer < sampleCount) while (_samplesInBuffer < sampleCount)
{ {
if (_samplesInBuffer > 0) if (_samplesInBuffer > 0)
{ {
deinterlace(buff, offset); deinterlace(buff, offset, _samplesInBuffer);
sampleCount -= (uint) _samplesInBuffer; sampleCount -= (uint) _samplesInBuffer;
offset += _samplesInBuffer; offset += _samplesInBuffer;
_samplesInBuffer = 0; _samplesInBuffer = 0;
@@ -99,7 +104,7 @@ namespace CUETools.Codecs.ALAC
_iSample++; _iSample++;
} }
deinterlace(buff, offset); deinterlace(buff, offset, sampleCount);
_samplesInBuffer -= sampleCount; _samplesInBuffer -= sampleCount;
_samplesBufferOffset += sampleCount; _samplesBufferOffset += sampleCount;
if (_samplesInBuffer == 0) if (_samplesInBuffer == 0)
@@ -232,6 +237,29 @@ namespace CUETools.Codecs.ALAC
uint duration_cur_index = 0; uint duration_cur_index = 0;
for (duration_cur_index = 0; duration_cur_index < _time_to_sample_count.Length; duration_cur_index++) 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]; _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) 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; return;
int i; int i;
@@ -621,7 +649,7 @@ namespace CUETools.Codecs.ALAC
/* weighted interlacing */ /* weighted interlacing */
if (_interlacing_leftweight != 0) if (_interlacing_leftweight != 0)
{ {
for (i = 0; i < _samplesInBuffer; i++) for (i = 0; i < sampleCount; i++)
{ {
int midright = buf_a[i]; int midright = buf_a[i];
int diff = buf_b[i]; int diff = buf_b[i];
@@ -642,7 +670,7 @@ namespace CUETools.Codecs.ALAC
} }
/* otherwise basic interlacing took place */ /* otherwise basic interlacing took place */
for (i = 0; i < _samplesInBuffer; i++) for (i = 0; i < sampleCount; i++)
{ {
int a = buf_a[i]; int a = buf_a[i];
int b = buf_b[i]; int b = buf_b[i];

View File

@@ -35,15 +35,14 @@ namespace CUETools.Converter
TimeSpan lastPrint = TimeSpan.FromMilliseconds(0); TimeSpan lastPrint = TimeSpan.FromMilliseconds(0);
CUEConfig config = new CUEConfig(); 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.Load(sr);
config.lossyWAVHybrid = false;
#if !DEBUG #if !DEBUG
try try
#endif #endif
{ {
IAudioSource audioSource = AudioReadWrite.GetAudioSource(sourceFile, null, config); 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]; int[,] buff = new int[0x4000, audioSource.ChannelCount];
Console.WriteLine("Filename : {0}", sourceFile); Console.WriteLine("Filename : {0}", sourceFile);

View File

@@ -17,26 +17,32 @@ namespace CUETools.Processor
public static class AudioReadWrite { public static class AudioReadWrite {
public static IAudioSource GetAudioSource(string path, Stream IO, string extension, CUEConfig config) 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); return new WAVReader(path, IO);
case ".m4a": case "ALACReader":
return new ALACReader(path, IO); return new ALACReader(path, IO);
#if !MONO #if !MONO
case ".flac": case "FLACReader":
return new FLACReader(path, IO, config.disableAsm); return new FLACReader(path, IO, config.disableAsm);
case ".wv": case "WavPackReader":
return new WavPackReader(path, IO, null); return new WavPackReader(path, IO, null);
case ".ape": case "APEReader":
return new APEReader(path, IO); return new APEReader(path, IO);
case ".tta": case "TTAReader":
return new TTAReader(path, IO); return new TTAReader(path, IO);
#endif #endif
default: default:
if (extension == "." + config.udc1Extension && config.udc1Decoder != "") if (decoder.path == null)
return new UserDefinedReader(path, IO, config.udc1Decoder, config.udc1Params);
throw new Exception("Unsupported audio type: " + path); 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); 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; IAudioDest dest;
switch (extension) { if (audioEncoderType == AudioEncoderType.NoAudio || extension == ".dummy")
case ".wav": {
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); dest = new WAVWriter(path, bitsPerSample, channelCount, sampleRate, null);
break; break;
#if !MONO #if !MONO
case ".flac": case "FLACWriter":
dest = new FLACWriter(path, bitsPerSample, channelCount, sampleRate); dest = new FLACWriter(path, bitsPerSample, channelCount, sampleRate);
((FLACWriter)dest).CompressionLevel = (int)config.flacCompressionLevel; ((FLACWriter)dest).CompressionLevel = (int)config.flacCompressionLevel;
((FLACWriter)dest).Verify = config.flacVerify; ((FLACWriter)dest).Verify = config.flacVerify;
((FLACWriter)dest).DisableAsm = config.disableAsm; ((FLACWriter)dest).DisableAsm = config.disableAsm;
break; break;
case ".wv": case "WavPackWriter":
dest = new WavPackWriter(path, bitsPerSample, channelCount, sampleRate); dest = new WavPackWriter(path, bitsPerSample, channelCount, sampleRate);
((WavPackWriter)dest).CompressionMode = config.wvCompressionMode; ((WavPackWriter)dest).CompressionMode = config.wvCompressionMode;
((WavPackWriter)dest).ExtraMode = config.wvExtraMode; ((WavPackWriter)dest).ExtraMode = config.wvExtraMode;
((WavPackWriter)dest).MD5Sum = config.wvStoreMD5; ((WavPackWriter)dest).MD5Sum = config.wvStoreMD5;
break; break;
case ".ape": case "APEWriter":
dest = new APEWriter(path, bitsPerSample, channelCount, sampleRate); dest = new APEWriter(path, bitsPerSample, channelCount, sampleRate);
((APEWriter)dest).CompressionLevel = (int)config.apeCompressionLevel; ((APEWriter)dest).CompressionLevel = (int)config.apeCompressionLevel;
break; break;
case ".tta": case "TTAWriter":
dest = new TTAWriter(path, bitsPerSample, channelCount, sampleRate); dest = new TTAWriter(path, bitsPerSample, channelCount, sampleRate);
break; break;
case ".dummy":
dest = new DummyWriter(path, bitsPerSample, channelCount, sampleRate);
break;
#endif #endif
default: default:
if (extension == "." + config.udc1Extension && config.udc1Encoder != "") if (encoder.path == null)
{
dest = new UserDefinedWriter(path, bitsPerSample, channelCount, sampleRate, null, config.udc1Encoder, config.udc1EncParams);
break;
}
throw new Exception("Unsupported audio type: " + path); throw new Exception("Unsupported audio type: " + path);
dest = new UserDefinedWriter(path, bitsPerSample, channelCount, sampleRate, null, encoder.path, encoder.parameters);
break;
} }
dest.FinalSampleCount = finalSampleCount; dest.FinalSampleCount = finalSampleCount;
return dest; 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 extension = Path.GetExtension(path).ToLower();
string filename = Path.GetFileNameWithoutExtension(path); string filename = Path.GetFileNameWithoutExtension(path);
if (Path.GetExtension(filename).ToLower() != ".lossy") if (audioEncoderType == AudioEncoderType.NoAudio || audioEncoderType == AudioEncoderType.Lossless || Path.GetExtension(filename).ToLower() != ".lossy")
return GetAudioDest(path, bitsPerSample, 2, sampleRate, finalSampleCount, extension, config); return GetAudioDest(audioEncoderType, path, bitsPerSample, 2, sampleRate, finalSampleCount, extension, config);
string lwcdfPath = Path.Combine(Path.GetDirectoryName(path), Path.GetFileNameWithoutExtension(filename) + ".lwcdf" + extension); string lwcdfPath = Path.Combine(Path.GetDirectoryName(path), Path.GetFileNameWithoutExtension(filename) + ".lwcdf" + extension);
int lossyBitsPerSample = (config.detectHDCD && config.decodeHDCD && !config.decodeHDCDtoLW16) ? 24 : 16; int lossyBitsPerSample = (config.detectHDCD && config.decodeHDCD && !config.decodeHDCDtoLW16) ? 24 : 16;
IAudioDest lossyDest = GetAudioDest(path, lossyBitsPerSample, 2, sampleRate, finalSampleCount, extension, config); IAudioDest lossyDest = GetAudioDest(AudioEncoderType.Lossless, path, lossyBitsPerSample, 2, sampleRate, finalSampleCount, extension, config);
IAudioDest lwcdfDest = config.lossyWAVHybrid ? GetAudioDest(lwcdfPath, bitsPerSample, 2, sampleRate, finalSampleCount, extension, config) : null; 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); return new LossyWAVWriter(lossyDest, lwcdfDest, bitsPerSample, 2, sampleRate, config.lossyWAVQuality);
} }
} }

View File

@@ -78,6 +78,10 @@
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="CSScriptLibrary.v1.1, Version=2.3.2.0, Culture=neutral">
<SpecificVersion>False</SpecificVersion>
<HintPath>.\CSScriptLibrary.v1.1.dll</HintPath>
</Reference>
<Reference Include="ICSharpCode.SharpZipLib, Version=0.85.5.452, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL"> <Reference Include="ICSharpCode.SharpZipLib, Version=0.85.5.452, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>.\ICSharpCode.SharpZipLib.dll</HintPath> <HintPath>.\ICSharpCode.SharpZipLib.dll</HintPath>

File diff suppressed because it is too large Load Diff

View File

@@ -43,27 +43,37 @@ namespace CUETools.Processor
public class SettingsReader { public class SettingsReader {
Dictionary<string, string> _settings; Dictionary<string, string> _settings;
public SettingsReader(string appName, string fileName) { public SettingsReader(string appName, string fileName, string appPath) {
_settings = new Dictionary<string, string>(); _settings = new Dictionary<string, string>();
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)) { if (!File.Exists(path)) {
return; return;
} }
using (StreamReader sr = new StreamReader(path, Encoding.UTF8)) { using (StreamReader sr = new StreamReader(path, Encoding.UTF8)) {
string line, name, val; string line, name = null, val;
int pos; int pos;
while ((line = sr.ReadLine()) != null) { while ((line = sr.ReadLine()) != null) {
pos = line.IndexOf('='); pos = line.IndexOf('=');
if (pos != -1) { if (pos != -1) {
if (pos > 0)
{
name = line.Substring(0, pos); name = line.Substring(0, pos);
val = line.Substring(pos + 1); val = line.Substring(pos + 1);
if (!_settings.ContainsKey(name))
if (!_settings.ContainsKey(name)) {
_settings.Add(name, val); _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 { public class SettingsWriter {
StreamWriter _sw; StreamWriter _sw;
public SettingsWriter(string appName, string fileName) { public SettingsWriter(string appName, string fileName, string appPath)
string path = Path.Combine(SettingsShared.GetMyAppDataDir(appName), fileName); {
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); _sw = new StreamWriter(path, false, Encoding.UTF8);
} }
@@ -110,6 +124,17 @@ namespace CUETools.Processor
_sw.WriteLine(name + "=" + value); _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) { public void Save(string name, bool value) {
Save(name, value ? "1" : "0"); Save(name, value ? "1" : "0");
} }

View File

@@ -19,10 +19,15 @@ namespace CUETools.Processor
return true; return true;
} }
if (fileInfo is TagLib.Mpeg4.File) 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; return false;
TagLib.Id3v2.Tag id3v2 = (TagLib.Id3v2.Tag)fileInfo.GetTag(TagLib.TagTypes.Id3v2, true); TagLib.Id3v2.Tag id3v2 = (TagLib.Id3v2.Tag)fileInfo.GetTag(TagLib.TagTypes.Id3v2, true);
return true; return true;

View File

@@ -27,6 +27,7 @@
// //
using System; using System;
using System.Collections.Generic;
using TagLib; using TagLib;
namespace TagLib.UserDefined { namespace TagLib.UserDefined {
@@ -45,9 +46,7 @@ namespace TagLib.UserDefined {
{ {
#region Private Fields #region Private Fields
private bool _supportsAPEv2 = true; private CUETools.Processor.CUEToolsTagger tagger;
private bool _supportsID3v2 = true;
#endregion #endregion
@@ -72,17 +71,20 @@ namespace TagLib.UserDefined {
/// <exception cref="ArgumentNullException"> /// <exception cref="ArgumentNullException">
/// <paramref name="path" /> is <see langword="null" />. /// <paramref name="path" /> is <see langword="null" />.
/// </exception> /// </exception>
public File (string path, ReadStyle propertiesStyle, bool supportsAPEv2, bool supportsID3v2) public File (string path, ReadStyle propertiesStyle, CUETools.Processor.CUEToolsTagger _tagger)
: base (path, propertiesStyle) : base (path, propertiesStyle)
{ {
_supportsAPEv2 = supportsAPEv2; tagger = _tagger;
_supportsID3v2 = supportsID3v2; // Make sure we have a tag.
// Make sure we have an APE tag. switch (tagger)
if (_supportsAPEv2) {
case CUETools.Processor.CUEToolsTagger.APEv2:
GetTag(TagTypes.Ape, true); GetTag(TagTypes.Ape, true);
else break;
if (_supportsID3v2) case CUETools.Processor.CUEToolsTagger.ID3v2:
GetTag(TagTypes.Id3v2, true); GetTag(TagTypes.Id3v2, true);
break;
}
} }
/// <summary> /// <summary>
@@ -97,17 +99,20 @@ namespace TagLib.UserDefined {
/// <exception cref="ArgumentNullException"> /// <exception cref="ArgumentNullException">
/// <paramref name="path" /> is <see langword="null" />. /// <paramref name="path" /> is <see langword="null" />.
/// </exception> /// </exception>
public File(string path, bool supportsAPEv2, bool supportsID3v2) public File(string path, CUETools.Processor.CUEToolsTagger _tagger)
: base(path) : base(path)
{ {
_supportsAPEv2 = supportsAPEv2; tagger = _tagger;
_supportsID3v2 = supportsID3v2; // Make sure we have a tag.
// Make sure we have an APE tag. switch (tagger)
if (_supportsAPEv2) {
case CUETools.Processor.CUEToolsTagger.APEv2:
GetTag(TagTypes.Ape, true); GetTag(TagTypes.Ape, true);
else break;
if (_supportsID3v2) case CUETools.Processor.CUEToolsTagger.ID3v2:
GetTag(TagTypes.Id3v2, true); GetTag(TagTypes.Id3v2, true);
break;
}
} }
/// <summary> /// <summary>
@@ -129,17 +134,20 @@ namespace TagLib.UserDefined {
/// />. /// />.
/// </exception> /// </exception>
public File (File.IFileAbstraction abstraction, public File (File.IFileAbstraction abstraction,
ReadStyle propertiesStyle, bool supportsAPEv2, bool supportsID3v2) ReadStyle propertiesStyle, CUETools.Processor.CUEToolsTagger _tagger)
: base (abstraction, propertiesStyle) : base (abstraction, propertiesStyle)
{ {
_supportsAPEv2 = supportsAPEv2; tagger = _tagger;
_supportsID3v2 = supportsID3v2; // Make sure we have a tag.
// Make sure we have an APE tag. switch (tagger)
if (_supportsAPEv2) {
case CUETools.Processor.CUEToolsTagger.APEv2:
GetTag(TagTypes.Ape, true); GetTag(TagTypes.Ape, true);
else break;
if (_supportsID3v2) case CUETools.Processor.CUEToolsTagger.ID3v2:
GetTag(TagTypes.Id3v2, true); GetTag(TagTypes.Id3v2, true);
break;
}
} }
/// <summary> /// <summary>
@@ -155,17 +163,20 @@ namespace TagLib.UserDefined {
/// <paramref name="abstraction" /> is <see langword="null" /// <paramref name="abstraction" /> is <see langword="null"
/// />. /// />.
/// </exception> /// </exception>
public File(File.IFileAbstraction abstraction, bool supportsAPEv2, bool supportsID3v2) public File(File.IFileAbstraction abstraction, CUETools.Processor.CUEToolsTagger _tagger)
: base (abstraction) : base (abstraction)
{ {
_supportsAPEv2 = supportsAPEv2; tagger = _tagger;
_supportsID3v2 = supportsID3v2; // Make sure we have a tag.
// Make sure we have an APE tag. switch (tagger)
if (_supportsAPEv2) {
case CUETools.Processor.CUEToolsTagger.APEv2:
GetTag(TagTypes.Ape, true); GetTag(TagTypes.Ape, true);
else break;
if (_supportsID3v2) case CUETools.Processor.CUEToolsTagger.ID3v2:
GetTag(TagTypes.Id3v2, true); GetTag(TagTypes.Id3v2, true);
break;
}
} }
#endregion #endregion
@@ -174,23 +185,14 @@ namespace TagLib.UserDefined {
#region Public Methods #region Public Methods
public bool SupportsAPEv2 public CUETools.Processor.CUEToolsTagger Tagger
{ {
get get
{ {
return _supportsAPEv2; return tagger;
} }
} }
public bool SupportsID3v2
{
get
{
return _supportsID3v2;
}
}
/// <summary> /// <summary>
/// Gets a tag of a specified type from the current instance, /// Gets a tag of a specified type from the current instance,
/// optionally creating a new tag if possible. /// optionally creating a new tag if possible.
@@ -329,12 +331,9 @@ namespace TagLib.UserDefined {
private static TagLib.File UserDefinedResolver(TagLib.File.IFileAbstraction abstraction, string mimetype, TagLib.ReadStyle style) 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") foreach (KeyValuePair<string,CUETools.Processor.CUEToolsFormat> fmt in _config.formats)
return null; if (fmt.Value.tagger != CUETools.Processor.CUEToolsTagger.TagLibSharp && mimetype == "taglib/" + fmt.Key)
if (mimetype == "taglib/tta") return new File(abstraction, style, fmt.Value.tagger);
return new File(abstraction, style, true, false);
if (mimetype == "taglib/" + _config.udc1Extension)
return new File(abstraction, style, _config.udc1APEv2, _config.udc1ID3v2);
return null; return null;
} }

View File

@@ -268,7 +268,7 @@ namespace CUETools.ConsoleRipper
logWriter.WriteLine(); logWriter.WriteLine();
logWriter.WriteLine("AccurateRip summary"); logWriter.WriteLine("AccurateRip summary");
logWriter.WriteLine(); logWriter.WriteLine();
arVerify.GenerateFullLog(logWriter, 0); arVerify.GenerateFullLog(logWriter, true);
logWriter.WriteLine(); logWriter.WriteLine();
logWriter.WriteLine("End of status report"); logWriter.WriteLine("End of status report");
logWriter.Close(); logWriter.Close();

View File

@@ -102,12 +102,6 @@
<Compile Include="frmChoice.Designer.cs"> <Compile Include="frmChoice.Designer.cs">
<DependentUpon>frmChoice.cs</DependentUpon> <DependentUpon>frmChoice.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="frmFilenameCorrector.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmFilenameCorrector.Designer.cs">
<DependentUpon>frmFilenameCorrector.cs</DependentUpon>
</Compile>
<Compile Include="frmPassword.cs"> <Compile Include="frmPassword.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
@@ -170,14 +164,6 @@
<SubType>Designer</SubType> <SubType>Designer</SubType>
<DependentUpon>frmCUETools.cs</DependentUpon> <DependentUpon>frmCUETools.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="frmFilenameCorrector.de-DE.resx">
<DependentUpon>frmFilenameCorrector.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="frmFilenameCorrector.resx">
<SubType>Designer</SubType>
<DependentUpon>frmFilenameCorrector.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmPassword.de-DE.resx"> <EmbeddedResource Include="frmPassword.de-DE.resx">
<DependentUpon>frmPassword.cs</DependentUpon> <DependentUpon>frmPassword.cs</DependentUpon>
<SubType>Designer</SubType> <SubType>Designer</SubType>
@@ -271,13 +257,30 @@
<ItemGroup> <ItemGroup>
<None Include="Resources\accuraterip.jpg" /> <None Include="Resources\accuraterip.jpg" />
<Content Include="Resources\accuraterip_16.bmp" /> <Content Include="Resources\accuraterip_16.bmp" />
<None Include="Resources\ape.ico" />
<Content Include="Resources\AR.ico" /> <Content Include="Resources\AR.ico" />
<Content Include="Resources\cd2.png" />
<None Include="Resources\cog.ico" />
<Content Include="Resources\cue.ico" /> <Content Include="Resources\cue.ico" />
<None Include="Resources\cue2.ico" />
<None Include="Resources\cue3.ico" />
<Content Include="Resources\cue_32.ico" /> <Content Include="Resources\cue_32.ico" />
<Content Include="Resources\eac.ico" /> <Content Include="Resources\eac.ico" />
<Content Include="Resources\flac.ico" /> <Content Include="Resources\flac.ico" />
<None Include="Resources\freedb.ico" />
<Content Include="Resources\icon-wv.png" /> <Content Include="Resources\icon-wv.png" />
<None Include="Resources\cuetools.icl" />
<None Include="Resources\settings.ico" />
<None Include="Resources\information.ico" />
<None Include="Resources\info2.bmp" />
<None Include="Resources\information.png" />
<None Include="Resources\ipod_sound.ico" />
<None Include="Resources\ogg.ico" />
<None Include="Resources\mp3.ico" />
<Content Include="Resources\wav.bmp" /> <Content Include="Resources\wav.bmp" />
<None Include="Resources\wv.ico" />
<None Include="Resources\wave.ico" />
<None Include="Resources\tta.ico" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.

View File

@@ -14,15 +14,13 @@ namespace JDP {
[STAThread] [STAThread]
static void Main(string[] args) static void Main(string[] args)
{ {
if (args.Length > 1 && (args[0] == "/verify" || args[0] == "/crc" || args[0] == "/convert" || args[0] == "/fix")) if (args.Length > 1 && (args[0] == "/verify" || args[0] == "/convert"))
{ {
Application.EnableVisualStyles(); Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false); Application.SetCompatibleTextRenderingDefault(false);
frmBatch batch = new frmBatch(); frmBatch batch = new frmBatch();
batch.AccurateRip = batch.AccurateRip =
args[0] == "/convert" ? CUEAction.VerifyAndConvert : args[0] == "/convert" ? CUEAction.VerifyAndConvert :
args[0] == "/fix" ? CUEAction.VerifyThenConvert :
args[0] == "/crc" ? CUEAction.VerifyPlusCRCs :
CUEAction.Verify; CUEAction.Verify;
if (args.Length == 2 && args[1][0] != '@') if (args.Length == 2 && args[1][0] != '@')
@@ -53,8 +51,9 @@ namespace JDP {
string myId = "BZ92759C-63Q7-444e-ADA6-E495634A493D"; string myId = "BZ92759C-63Q7-444e-ADA6-E495634A493D";
Application.EnableVisualStyles(); Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false); Application.SetCompatibleTextRenderingDefault(false);
CUEConfig config = new CUEConfig(); CUEConfig config = new CUEConfig();
config.Load(new SettingsReader("CUE Tools", "settings.txt")); config.Load(new SettingsReader("CUE Tools", "settings.txt", Application.ExecutablePath));
try { Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo(config.language); } try { Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo(config.language); }
catch { } catch { }
frmCUETools form = new frmCUETools(); frmCUETools form = new frmCUETools();
@@ -80,7 +79,7 @@ namespace JDP {
{ {
private static IpcChannel m_IPCChannel = null; private static IpcChannel m_IPCChannel = null;
public delegate void ReceiveDelegate(string[] args); public delegate bool ReceiveDelegate(string[] args);
static private ReceiveDelegate m_Receive = null; static private ReceiveDelegate m_Receive = null;
static public ReceiveDelegate Receiver static public ReceiveDelegate Receiver
@@ -138,24 +137,25 @@ namespace JDP {
SingletonController ctrl; SingletonController ctrl;
IpcChannel channel = new IpcChannel(); IpcChannel channel = new IpcChannel();
System.Runtime.Remoting.Channels.ChannelServices.RegisterChannel(channel, false); System.Runtime.Remoting.Channels.ChannelServices.RegisterChannel(channel, false);
bool result = false;
try try
{ {
ctrl = (SingletonController)Activator.GetObject(typeof(SingletonController), "ipc://" + id + "/SingletonController"); ctrl = (SingletonController)Activator.GetObject(typeof(SingletonController), "ipc://" + id + "/SingletonController");
ctrl.Receive(s); result = ctrl.Receive(s);
} }
catch catch
{ {
}
if (!result)
MessageBox.Show("Another instance of the application seems to be running, but not responding.", MessageBox.Show("Another instance of the application seems to be running, but not responding.",
"Error", MessageBoxButtons.OK, MessageBoxIcon.Error); "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
} }
}
public void Receive(string[] s) public bool Receive(string[] s)
{ {
if (m_Receive != null) if (m_Receive == null)
{ return false;
m_Receive(s); return m_Receive(s);
}
} }
} }
} }

View File

@@ -74,6 +74,27 @@ namespace JDP.Properties {
} }
} }
internal static System.Drawing.Icon ape {
get {
object obj = ResourceManager.GetObject("ape", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
internal static System.Drawing.Bitmap AR {
get {
object obj = ResourceManager.GetObject("AR", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap cog {
get {
object obj = ResourceManager.GetObject("cog", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Icon cue { internal static System.Drawing.Icon cue {
get { get {
object obj = ResourceManager.GetObject("cue", resourceCulture); object obj = ResourceManager.GetObject("cue", resourceCulture);
@@ -81,6 +102,20 @@ namespace JDP.Properties {
} }
} }
internal static System.Drawing.Icon cue2 {
get {
object obj = ResourceManager.GetObject("cue2", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
internal static System.Drawing.Icon cue3 {
get {
object obj = ResourceManager.GetObject("cue3", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
internal static System.Drawing.Bitmap flac { internal static System.Drawing.Bitmap flac {
get { get {
object obj = ResourceManager.GetObject("flac", resourceCulture); object obj = ResourceManager.GetObject("flac", resourceCulture);
@@ -88,6 +123,13 @@ namespace JDP.Properties {
} }
} }
internal static System.Drawing.Icon flac1 {
get {
object obj = ResourceManager.GetObject("flac1", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
internal static System.Drawing.Bitmap freedb { internal static System.Drawing.Bitmap freedb {
get { get {
object obj = ResourceManager.GetObject("freedb", resourceCulture); object obj = ResourceManager.GetObject("freedb", resourceCulture);
@@ -95,6 +137,13 @@ namespace JDP.Properties {
} }
} }
internal static System.Drawing.Icon freedb1 {
get {
object obj = ResourceManager.GetObject("freedb1", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to &amp;Go. /// Looks up a localized string similar to &amp;Go.
/// </summary> /// </summary>
@@ -104,6 +153,34 @@ namespace JDP.Properties {
} }
} }
internal static System.Drawing.Bitmap info2 {
get {
object obj = ResourceManager.GetObject("info2", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap information {
get {
object obj = ResourceManager.GetObject("information", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Icon ipod_sound {
get {
object obj = ResourceManager.GetObject("ipod_sound", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
internal static System.Drawing.Icon mp3 {
get {
object obj = ResourceManager.GetObject("mp3", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
internal static System.Drawing.Bitmap musicbrainz { internal static System.Drawing.Bitmap musicbrainz {
get { get {
object obj = ResourceManager.GetObject("musicbrainz", resourceCulture); object obj = ResourceManager.GetObject("musicbrainz", resourceCulture);
@@ -111,6 +188,27 @@ namespace JDP.Properties {
} }
} }
internal static System.Drawing.Icon musicbrainz1 {
get {
object obj = ResourceManager.GetObject("musicbrainz1", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
internal static System.Drawing.Icon ogg {
get {
object obj = ResourceManager.GetObject("ogg", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
internal static System.Drawing.Bitmap settings {
get {
object obj = ResourceManager.GetObject("settings", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Stop. /// Looks up a localized string similar to Stop.
/// </summary> /// </summary>
@@ -120,6 +218,13 @@ namespace JDP.Properties {
} }
} }
internal static System.Drawing.Icon tta {
get {
object obj = ResourceManager.GetObject("tta", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Verify. /// Looks up a localized string similar to Verify.
/// </summary> /// </summary>
@@ -136,11 +241,25 @@ namespace JDP.Properties {
} }
} }
internal static System.Drawing.Icon wave {
get {
object obj = ResourceManager.GetObject("wave", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
internal static System.Drawing.Bitmap wv { internal static System.Drawing.Bitmap wv {
get { get {
object obj = ResourceManager.GetObject("wv", resourceCulture); object obj = ResourceManager.GetObject("wv", resourceCulture);
return ((System.Drawing.Bitmap)(obj)); return ((System.Drawing.Bitmap)(obj));
} }
} }
internal static System.Drawing.Icon wv1 {
get {
object obj = ResourceManager.GetObject("wv1", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
} }
} }

View File

@@ -117,38 +117,89 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<data name="Verify" xml:space="preserve">
<value>Verify</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="accuraterip16" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="accuraterip16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\resources\accuraterip_16.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\resources\accuraterip_16.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="wv" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="ipod_sound" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icon-wv.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\ipod_sound.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="wv1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\wv.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="Stop" xml:space="preserve"> <data name="Stop" xml:space="preserve">
<value>Stop</value> <value>Stop</value>
</data> </data>
<data name="freedb" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\freedb.gif;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="flac" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\flac.ico;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="accuraterip" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\accuraterip.jpg;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="musicbrainz" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="musicbrainz" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\musicbrainz.ico;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\musicbrainz.ico;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="Go" xml:space="preserve"> <data name="Go" xml:space="preserve">
<value>&amp;Go</value> <value>&amp;Go</value>
</data> </data>
<data name="Verify" xml:space="preserve">
<value>Verify</value>
</data>
<data name="cog" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\cog.ico;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="wav" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="wav" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\wav.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\wav.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="settings" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\settings.ico;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="wave" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\wave.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="freedb1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\freedb.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="cue" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="cue" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\cue.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\cue.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="AR" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\AR.ico;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="wv" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icon-wv.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="accuraterip" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\accuraterip.jpg;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="info2" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\info2.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ape" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ape.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="musicbrainz1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\musicbrainz.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="tta" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\tta.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="flac" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\flac.ico;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="flac1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\flac.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="freedb" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\freedb.gif;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="information" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\information.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="cue2" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\cue2.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="cue3" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\cue3.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="mp3" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\mp3.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ogg" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ogg.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root> </root>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
CUETools/Resources/ape.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

BIN
CUETools/Resources/cd2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 639 B

BIN
CUETools/Resources/cog.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
CUETools/Resources/cue2.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

BIN
CUETools/Resources/cue3.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

BIN
CUETools/Resources/eac3.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 778 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
CUETools/Resources/mp3.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
CUETools/Resources/ogg.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
CUETools/Resources/tta.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

BIN
CUETools/Resources/wave.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 610 B

BIN
CUETools/Resources/wv.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@@ -18,7 +18,7 @@ namespace JDP
InitializeComponent(); InitializeComponent();
_config = new CUEConfig(); _config = new CUEConfig();
_cueStyle = CUEStyle.SingleFile; _cueStyle = CUEStyle.SingleFile;
_audioFormat = OutputAudioFormat.WAV; _audioFormat = "wav";
_accurateRip = CUEAction.Verify; _accurateRip = CUEAction.Verify;
_batchPaths = new List<string>(); _batchPaths = new List<string>();
} }
@@ -44,12 +44,11 @@ namespace JDP
CUESheet _workClass; CUESheet _workClass;
CUEConfig _config; CUEConfig _config;
CUEStyle _cueStyle; CUEStyle _cueStyle;
OutputAudioFormat _audioFormat; string _audioFormat;
string pathIn; string pathIn;
string pathOut; string pathOut;
CUEAction _accurateRip; CUEAction _accurateRip;
bool _reducePriority; bool _reducePriority;
bool _lossyWAV;
DateTime _startedAt; DateTime _startedAt;
List<string> _batchPaths; List<string> _batchPaths;
@@ -132,8 +131,9 @@ namespace JDP
else else
cueName = Path.GetFileNameWithoutExtension(pathIn) + ".cue"; cueName = Path.GetFileNameWithoutExtension(pathIn) + ".cue";
bool outputAudio = _accurateRip != CUEAction.Verify && _accurateRip != CUEAction.VerifyPlusCRCs; bool outputAudio = _accurateRip != CUEAction.Verify;
cueSheet.Action = _accurateRip; cueSheet.Action = _accurateRip;
cueSheet.OutputStyle = _cueStyle;
cueSheet.Open(pathIn); cueSheet.Open(pathIn);
cueSheet.Lookup(); cueSheet.Lookup();
if (outputAudio) if (outputAudio)
@@ -155,15 +155,15 @@ namespace JDP
} }
else else
pathOut = Path.Combine(Path.GetDirectoryName(pathIn) ?? pathIn, cueName); pathOut = Path.Combine(Path.GetDirectoryName(pathIn) ?? pathIn, cueName);
cueSheet.GenerateFilenames(_audioFormat, _lossyWAV, pathOut); cueSheet.GenerateFilenames(AudioEncoderType.Lossless, _audioFormat, pathOut);
if (outputAudio) if (outputAudio)
{ {
if (_cueStyle == CUEStyle.SingleFileWithCUE) if (_cueStyle == CUEStyle.SingleFileWithCUE)
cueSheet.SingleFilename = Path.ChangeExtension(Path.GetFileName(pathOut), General.FormatExtension(_audioFormat, _config)); cueSheet.SingleFilename = Path.ChangeExtension(Path.GetFileName(pathOut), "." + _audioFormat);
} }
cueSheet.UsePregapForFirstTrackInSingleFile = false; cueSheet.UsePregapForFirstTrackInSingleFile = false;
cueSheet.WriteAudioFiles(Path.GetDirectoryName(pathOut), _cueStyle); cueSheet.Go();
this.Invoke((MethodInvoker)delegate() this.Invoke((MethodInvoker)delegate()
{ {
if (_batchPaths.Count == 0) if (_batchPaths.Count == 0)
@@ -260,18 +260,18 @@ namespace JDP
private void frmBatch_Load(object sender, EventArgs e) private void frmBatch_Load(object sender, EventArgs e)
{ {
textBox1.Hide(); textBox1.Hide();
SettingsReader sr = new SettingsReader("CUE Tools", "settings.txt"); SettingsReader sr = new SettingsReader("CUE Tools", "settings.txt", Application.ExecutablePath);
_config.Load(sr); _config.Load(sr);
_reducePriority = sr.LoadBoolean("ReducePriority") ?? true; _reducePriority = sr.LoadBoolean("ReducePriority") ?? true;
_cueStyle = (CUEStyle?)sr.LoadInt32("CUEStyle", null, null) ?? CUEStyle.SingleFileWithCUE; _cueStyle = (CUEStyle?)sr.LoadInt32("CUEStyle", null, null) ?? CUEStyle.SingleFileWithCUE;
_audioFormat = (OutputAudioFormat?)sr.LoadInt32("OutputAudioFormat", null, null) ?? OutputAudioFormat.WAV; _audioFormat = sr.Load("OutputAudioFmt") ?? "flac";
_lossyWAV = sr.LoadBoolean("LossyWav") ?? false; //_lossyWAV = sr.LoadBoolean("LossyWav") ?? false;
if (_reducePriority) if (_reducePriority)
Process.GetCurrentProcess().PriorityClass = System.Diagnostics.ProcessPriorityClass.Idle; Process.GetCurrentProcess().PriorityClass = System.Diagnostics.ProcessPriorityClass.Idle;
if (_accurateRip != CUEAction.Verify && _accurateRip != CUEAction.VerifyPlusCRCs) if (_accurateRip != CUEAction.Verify)
txtOutputFile.Show(); txtOutputFile.Show();
StartConvert(); StartConvert();

View File

@@ -44,25 +44,17 @@ namespace JDP {
this.rbAppendFilename = new System.Windows.Forms.RadioButton(); this.rbAppendFilename = new System.Windows.Forms.RadioButton();
this.txtAppendFilename = new System.Windows.Forms.TextBox(); this.txtAppendFilename = new System.Windows.Forms.TextBox();
this.grpAudioOutput = new System.Windows.Forms.GroupBox(); this.grpAudioOutput = new System.Windows.Forms.GroupBox();
this.btnCodec = new System.Windows.Forms.Button(); this.labelFormat = new System.Windows.Forms.Label();
this.rbUDC1 = new System.Windows.Forms.RadioButton(); this.comboBoxAudioFormat = new System.Windows.Forms.ComboBox();
this.rbTTA = new System.Windows.Forms.RadioButton();
this.chkLossyWAV = new System.Windows.Forms.CheckBox();
this.rbAPE = new System.Windows.Forms.RadioButton();
this.rbNoAudio = new System.Windows.Forms.RadioButton();
this.rbWavPack = new System.Windows.Forms.RadioButton();
this.rbWAV = new System.Windows.Forms.RadioButton();
this.rbFLAC = new System.Windows.Forms.RadioButton();
this.btnSettings = new System.Windows.Forms.Button(); this.btnSettings = new System.Windows.Forms.Button();
this.grpAction = new System.Windows.Forms.GroupBox(); this.grpAction = new System.Windows.Forms.GroupBox();
this.comboBoxScript = new System.Windows.Forms.ComboBox();
this.rbActionCorrectFilenames = new System.Windows.Forms.RadioButton(); this.rbActionCorrectFilenames = new System.Windows.Forms.RadioButton();
this.rbActionCreateCUESheet = new System.Windows.Forms.RadioButton(); this.rbActionCreateCUESheet = new System.Windows.Forms.RadioButton();
this.chkMulti = new System.Windows.Forms.CheckBox();
this.rbActionVerifyAndCRCs = new System.Windows.Forms.RadioButton();
this.rbActionVerifyAndEncode = new System.Windows.Forms.RadioButton(); this.rbActionVerifyAndEncode = new System.Windows.Forms.RadioButton();
this.rbActionVerifyThenEncode = new System.Windows.Forms.RadioButton();
this.rbActionVerify = new System.Windows.Forms.RadioButton(); this.rbActionVerify = new System.Windows.Forms.RadioButton();
this.rbActionEncode = new System.Windows.Forms.RadioButton(); this.rbActionEncode = new System.Windows.Forms.RadioButton();
this.chkMulti = new System.Windows.Forms.CheckBox();
this.txtPreGapLength = new System.Windows.Forms.MaskedTextBox(); this.txtPreGapLength = new System.Windows.Forms.MaskedTextBox();
this.label2 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label();
@@ -84,14 +76,6 @@ namespace JDP {
this.rbFreedbAlways = new System.Windows.Forms.RadioButton(); this.rbFreedbAlways = new System.Windows.Forms.RadioButton();
this.rbFreedbIf = new System.Windows.Forms.RadioButton(); this.rbFreedbIf = new System.Windows.Forms.RadioButton();
this.rbFreedbNever = new System.Windows.Forms.RadioButton(); this.rbFreedbNever = new System.Windows.Forms.RadioButton();
this.contextMenuStripUDC = new System.Windows.Forms.ContextMenuStrip(this.components);
this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem();
this.tAKToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem();
this.mP3ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.oGGToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.txtInputPath = new System.Windows.Forms.TextBox(); this.txtInputPath = new System.Windows.Forms.TextBox();
this.grpInput = new System.Windows.Forms.GroupBox(); this.grpInput = new System.Windows.Forms.GroupBox();
this.textBatchReport = new System.Windows.Forms.TextBox(); this.textBatchReport = new System.Windows.Forms.TextBox();
@@ -105,18 +89,30 @@ namespace JDP {
this.setAsMyMusicFolderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.setAsMyMusicFolderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.resetToOriginalLocationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.resetToOriginalLocationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.panel1 = new System.Windows.Forms.Panel(); this.panel1 = new System.Windows.Forms.Panel();
this.groupBoxCorrector = new System.Windows.Forms.GroupBox();
this.rbCorrectorLocateFiles = new System.Windows.Forms.RadioButton();
this.rbCorrectorChangeExtension = new System.Windows.Forms.RadioButton();
this.checkBoxCorrectorOverwrite = new System.Windows.Forms.CheckBox();
this.labelCorrectorFormat = new System.Windows.Forms.Label();
this.comboBoxCorrectorFormat = new System.Windows.Forms.ComboBox();
this.radioButtonAudioLossless = new System.Windows.Forms.RadioButton();
this.radioButtonAudioHybrid = new System.Windows.Forms.RadioButton();
this.radioButtonAudioLossy = new System.Windows.Forms.RadioButton();
this.radioButtonAudioNone = new System.Windows.Forms.RadioButton();
this.comboBoxEncoder = new System.Windows.Forms.ComboBox();
this.checkBoxAdvancedMode = new System.Windows.Forms.CheckBox();
this.grpOutputStyle.SuspendLayout(); this.grpOutputStyle.SuspendLayout();
this.grpOutputPathGeneration.SuspendLayout(); this.grpOutputPathGeneration.SuspendLayout();
this.grpAudioOutput.SuspendLayout(); this.grpAudioOutput.SuspendLayout();
this.grpAction.SuspendLayout(); this.grpAction.SuspendLayout();
this.statusStrip1.SuspendLayout(); this.statusStrip1.SuspendLayout();
this.grpFreedb.SuspendLayout(); this.grpFreedb.SuspendLayout();
this.contextMenuStripUDC.SuspendLayout();
this.grpInput.SuspendLayout(); this.grpInput.SuspendLayout();
this.grpExtra.SuspendLayout(); this.grpExtra.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numericWriteOffset)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numericWriteOffset)).BeginInit();
this.contextMenuStripFileTree.SuspendLayout(); this.contextMenuStripFileTree.SuspendLayout();
this.panel1.SuspendLayout(); this.panel1.SuspendLayout();
this.groupBoxCorrector.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// btnConvert // btnConvert
@@ -193,6 +189,7 @@ namespace JDP {
// //
// btnAbout // btnAbout
// //
this.btnAbout.Image = global::JDP.Properties.Resources.information;
resources.ApplyResources(this.btnAbout, "btnAbout"); resources.ApplyResources(this.btnAbout, "btnAbout");
this.btnAbout.Name = "btnAbout"; this.btnAbout.Name = "btnAbout";
this.btnAbout.UseVisualStyleBackColor = true; this.btnAbout.UseVisualStyleBackColor = true;
@@ -263,91 +260,34 @@ namespace JDP {
// //
// grpAudioOutput // grpAudioOutput
// //
this.grpAudioOutput.Controls.Add(this.btnCodec); this.grpAudioOutput.Controls.Add(this.comboBoxEncoder);
this.grpAudioOutput.Controls.Add(this.rbUDC1); this.grpAudioOutput.Controls.Add(this.radioButtonAudioNone);
this.grpAudioOutput.Controls.Add(this.rbTTA); this.grpAudioOutput.Controls.Add(this.radioButtonAudioLossy);
this.grpAudioOutput.Controls.Add(this.chkLossyWAV); this.grpAudioOutput.Controls.Add(this.radioButtonAudioHybrid);
this.grpAudioOutput.Controls.Add(this.rbAPE); this.grpAudioOutput.Controls.Add(this.radioButtonAudioLossless);
this.grpAudioOutput.Controls.Add(this.rbNoAudio); this.grpAudioOutput.Controls.Add(this.labelFormat);
this.grpAudioOutput.Controls.Add(this.rbWavPack); this.grpAudioOutput.Controls.Add(this.comboBoxAudioFormat);
this.grpAudioOutput.Controls.Add(this.rbWAV);
this.grpAudioOutput.Controls.Add(this.rbFLAC);
resources.ApplyResources(this.grpAudioOutput, "grpAudioOutput"); resources.ApplyResources(this.grpAudioOutput, "grpAudioOutput");
this.grpAudioOutput.Name = "grpAudioOutput"; this.grpAudioOutput.Name = "grpAudioOutput";
this.grpAudioOutput.TabStop = false; this.grpAudioOutput.TabStop = false;
// //
// btnCodec // labelFormat
// //
resources.ApplyResources(this.btnCodec, "btnCodec"); resources.ApplyResources(this.labelFormat, "labelFormat");
this.btnCodec.Name = "btnCodec"; this.labelFormat.MinimumSize = new System.Drawing.Size(16, 16);
this.btnCodec.UseVisualStyleBackColor = true; this.labelFormat.Name = "labelFormat";
this.btnCodec.Click += new System.EventHandler(this.btnCodec_Click);
// //
// rbUDC1 // comboBoxAudioFormat
// //
resources.ApplyResources(this.rbUDC1, "rbUDC1"); this.comboBoxAudioFormat.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.rbUDC1.Name = "rbUDC1"; this.comboBoxAudioFormat.FormattingEnabled = true;
this.rbUDC1.TabStop = true; resources.ApplyResources(this.comboBoxAudioFormat, "comboBoxAudioFormat");
this.rbUDC1.UseVisualStyleBackColor = true; this.comboBoxAudioFormat.Name = "comboBoxAudioFormat";
this.rbUDC1.CheckedChanged += new System.EventHandler(this.rbUDC1_CheckedChanged); this.comboBoxAudioFormat.SelectedIndexChanged += new System.EventHandler(this.comboBoxAudioFormat_SelectedIndexChanged);
//
// rbTTA
//
resources.ApplyResources(this.rbTTA, "rbTTA");
this.rbTTA.Name = "rbTTA";
this.rbTTA.TabStop = true;
this.rbTTA.UseVisualStyleBackColor = true;
this.rbTTA.CheckedChanged += new System.EventHandler(this.rbTTA_CheckedChanged);
//
// chkLossyWAV
//
resources.ApplyResources(this.chkLossyWAV, "chkLossyWAV");
this.chkLossyWAV.Name = "chkLossyWAV";
this.toolTip1.SetToolTip(this.chkLossyWAV, resources.GetString("chkLossyWAV.ToolTip"));
this.chkLossyWAV.UseVisualStyleBackColor = true;
this.chkLossyWAV.CheckedChanged += new System.EventHandler(this.chkLossyWAV_CheckedChanged);
//
// rbAPE
//
resources.ApplyResources(this.rbAPE, "rbAPE");
this.rbAPE.Name = "rbAPE";
this.rbAPE.TabStop = true;
this.rbAPE.UseVisualStyleBackColor = true;
this.rbAPE.CheckedChanged += new System.EventHandler(this.rbAPE_CheckedChanged);
//
// rbNoAudio
//
resources.ApplyResources(this.rbNoAudio, "rbNoAudio");
this.rbNoAudio.Name = "rbNoAudio";
this.toolTip1.SetToolTip(this.rbNoAudio, resources.GetString("rbNoAudio.ToolTip"));
this.rbNoAudio.UseVisualStyleBackColor = true;
this.rbNoAudio.CheckedChanged += new System.EventHandler(this.rbNoAudio_CheckedChanged);
//
// rbWavPack
//
resources.ApplyResources(this.rbWavPack, "rbWavPack");
this.rbWavPack.Name = "rbWavPack";
this.rbWavPack.UseVisualStyleBackColor = true;
this.rbWavPack.CheckedChanged += new System.EventHandler(this.rbWavPack_CheckedChanged);
//
// rbWAV
//
resources.ApplyResources(this.rbWAV, "rbWAV");
this.rbWAV.Checked = true;
this.rbWAV.Name = "rbWAV";
this.rbWAV.TabStop = true;
this.rbWAV.UseVisualStyleBackColor = true;
this.rbWAV.CheckedChanged += new System.EventHandler(this.rbWAV_CheckedChanged);
//
// rbFLAC
//
resources.ApplyResources(this.rbFLAC, "rbFLAC");
this.rbFLAC.Name = "rbFLAC";
this.rbFLAC.UseVisualStyleBackColor = true;
this.rbFLAC.CheckedChanged += new System.EventHandler(this.rbFLAC_CheckedChanged);
// //
// btnSettings // btnSettings
// //
this.btnSettings.Image = global::JDP.Properties.Resources.cog;
resources.ApplyResources(this.btnSettings, "btnSettings"); resources.ApplyResources(this.btnSettings, "btnSettings");
this.btnSettings.Name = "btnSettings"; this.btnSettings.Name = "btnSettings";
this.btnSettings.UseVisualStyleBackColor = true; this.btnSettings.UseVisualStyleBackColor = true;
@@ -355,17 +295,24 @@ namespace JDP {
// //
// grpAction // grpAction
// //
this.grpAction.Controls.Add(this.checkBoxAdvancedMode);
this.grpAction.Controls.Add(this.comboBoxScript);
this.grpAction.Controls.Add(this.rbActionCorrectFilenames); this.grpAction.Controls.Add(this.rbActionCorrectFilenames);
this.grpAction.Controls.Add(this.rbActionCreateCUESheet); this.grpAction.Controls.Add(this.rbActionCreateCUESheet);
this.grpAction.Controls.Add(this.rbActionVerifyAndCRCs);
this.grpAction.Controls.Add(this.rbActionVerifyAndEncode); this.grpAction.Controls.Add(this.rbActionVerifyAndEncode);
this.grpAction.Controls.Add(this.rbActionVerifyThenEncode);
this.grpAction.Controls.Add(this.rbActionVerify); this.grpAction.Controls.Add(this.rbActionVerify);
this.grpAction.Controls.Add(this.rbActionEncode); this.grpAction.Controls.Add(this.rbActionEncode);
resources.ApplyResources(this.grpAction, "grpAction"); resources.ApplyResources(this.grpAction, "grpAction");
this.grpAction.Name = "grpAction"; this.grpAction.Name = "grpAction";
this.grpAction.TabStop = false; this.grpAction.TabStop = false;
// //
// comboBoxScript
//
this.comboBoxScript.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBoxScript.FormattingEnabled = true;
resources.ApplyResources(this.comboBoxScript, "comboBoxScript");
this.comboBoxScript.Name = "comboBoxScript";
//
// rbActionCorrectFilenames // rbActionCorrectFilenames
// //
resources.ApplyResources(this.rbActionCorrectFilenames, "rbActionCorrectFilenames"); resources.ApplyResources(this.rbActionCorrectFilenames, "rbActionCorrectFilenames");
@@ -382,21 +329,6 @@ namespace JDP {
this.rbActionCreateCUESheet.UseVisualStyleBackColor = true; this.rbActionCreateCUESheet.UseVisualStyleBackColor = true;
this.rbActionCreateCUESheet.CheckedChanged += new System.EventHandler(this.rbAction_CheckedChanged); this.rbActionCreateCUESheet.CheckedChanged += new System.EventHandler(this.rbAction_CheckedChanged);
// //
// chkMulti
//
resources.ApplyResources(this.chkMulti, "chkMulti");
this.chkMulti.Name = "chkMulti";
this.chkMulti.UseVisualStyleBackColor = true;
this.chkMulti.CheckedChanged += new System.EventHandler(this.chkMulti_CheckedChanged);
//
// rbActionVerifyAndCRCs
//
resources.ApplyResources(this.rbActionVerifyAndCRCs, "rbActionVerifyAndCRCs");
this.rbActionVerifyAndCRCs.Name = "rbActionVerifyAndCRCs";
this.toolTip1.SetToolTip(this.rbActionVerifyAndCRCs, resources.GetString("rbActionVerifyAndCRCs.ToolTip"));
this.rbActionVerifyAndCRCs.UseVisualStyleBackColor = true;
this.rbActionVerifyAndCRCs.CheckedChanged += new System.EventHandler(this.rbAction_CheckedChanged);
//
// rbActionVerifyAndEncode // rbActionVerifyAndEncode
// //
resources.ApplyResources(this.rbActionVerifyAndEncode, "rbActionVerifyAndEncode"); resources.ApplyResources(this.rbActionVerifyAndEncode, "rbActionVerifyAndEncode");
@@ -405,14 +337,6 @@ namespace JDP {
this.rbActionVerifyAndEncode.UseVisualStyleBackColor = true; this.rbActionVerifyAndEncode.UseVisualStyleBackColor = true;
this.rbActionVerifyAndEncode.CheckedChanged += new System.EventHandler(this.rbAction_CheckedChanged); this.rbActionVerifyAndEncode.CheckedChanged += new System.EventHandler(this.rbAction_CheckedChanged);
// //
// rbActionVerifyThenEncode
//
resources.ApplyResources(this.rbActionVerifyThenEncode, "rbActionVerifyThenEncode");
this.rbActionVerifyThenEncode.Name = "rbActionVerifyThenEncode";
this.toolTip1.SetToolTip(this.rbActionVerifyThenEncode, resources.GetString("rbActionVerifyThenEncode.ToolTip"));
this.rbActionVerifyThenEncode.UseVisualStyleBackColor = true;
this.rbActionVerifyThenEncode.CheckedChanged += new System.EventHandler(this.rbAction_CheckedChanged);
//
// rbActionVerify // rbActionVerify
// //
resources.ApplyResources(this.rbActionVerify, "rbActionVerify"); resources.ApplyResources(this.rbActionVerify, "rbActionVerify");
@@ -431,6 +355,14 @@ namespace JDP {
this.rbActionEncode.UseVisualStyleBackColor = true; this.rbActionEncode.UseVisualStyleBackColor = true;
this.rbActionEncode.CheckedChanged += new System.EventHandler(this.rbAction_CheckedChanged); this.rbActionEncode.CheckedChanged += new System.EventHandler(this.rbAction_CheckedChanged);
// //
// chkMulti
//
resources.ApplyResources(this.chkMulti, "chkMulti");
this.chkMulti.Name = "chkMulti";
this.chkMulti.ThreeState = true;
this.chkMulti.UseVisualStyleBackColor = true;
this.chkMulti.CheckStateChanged += new System.EventHandler(this.chkMulti_CheckStateChanged);
//
// txtPreGapLength // txtPreGapLength
// //
this.txtPreGapLength.Culture = new System.Globalization.CultureInfo(""); this.txtPreGapLength.Culture = new System.Globalization.CultureInfo("");
@@ -512,6 +444,7 @@ namespace JDP {
// toolStripStatusLabelAR // toolStripStatusLabelAR
// //
resources.ApplyResources(this.toolStripStatusLabelAR, "toolStripStatusLabelAR"); resources.ApplyResources(this.toolStripStatusLabelAR, "toolStripStatusLabelAR");
this.toolStripStatusLabelAR.Image = global::JDP.Properties.Resources.AR;
this.toolStripStatusLabelAR.Name = "toolStripStatusLabelAR"; this.toolStripStatusLabelAR.Name = "toolStripStatusLabelAR";
this.toolStripStatusLabelAR.Padding = new System.Windows.Forms.Padding(0, 0, 5, 0); this.toolStripStatusLabelAR.Padding = new System.Windows.Forms.Padding(0, 0, 5, 0);
// //
@@ -586,55 +519,6 @@ namespace JDP {
this.rbFreedbNever.TabStop = true; this.rbFreedbNever.TabStop = true;
this.rbFreedbNever.UseVisualStyleBackColor = true; this.rbFreedbNever.UseVisualStyleBackColor = true;
// //
// contextMenuStripUDC
//
this.contextMenuStripUDC.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripMenuItem2,
this.tAKToolStripMenuItem,
this.toolStripMenuItem1,
this.toolStripSeparator1,
this.toolStripMenuItem3,
this.mP3ToolStripMenuItem,
this.oGGToolStripMenuItem});
this.contextMenuStripUDC.Name = "contextMenuStripUDC";
resources.ApplyResources(this.contextMenuStripUDC, "contextMenuStripUDC");
this.contextMenuStripUDC.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.contextMenuStripUDC_ItemClicked);
//
// toolStripMenuItem2
//
resources.ApplyResources(this.toolStripMenuItem2, "toolStripMenuItem2");
this.toolStripMenuItem2.Name = "toolStripMenuItem2";
//
// tAKToolStripMenuItem
//
this.tAKToolStripMenuItem.Name = "tAKToolStripMenuItem";
resources.ApplyResources(this.tAKToolStripMenuItem, "tAKToolStripMenuItem");
//
// toolStripMenuItem1
//
this.toolStripMenuItem1.Name = "toolStripMenuItem1";
resources.ApplyResources(this.toolStripMenuItem1, "toolStripMenuItem1");
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
resources.ApplyResources(this.toolStripSeparator1, "toolStripSeparator1");
//
// toolStripMenuItem3
//
resources.ApplyResources(this.toolStripMenuItem3, "toolStripMenuItem3");
this.toolStripMenuItem3.Name = "toolStripMenuItem3";
//
// mP3ToolStripMenuItem
//
this.mP3ToolStripMenuItem.Name = "mP3ToolStripMenuItem";
resources.ApplyResources(this.mP3ToolStripMenuItem, "mP3ToolStripMenuItem");
//
// oGGToolStripMenuItem
//
this.oGGToolStripMenuItem.Name = "oGGToolStripMenuItem";
resources.ApplyResources(this.oGGToolStripMenuItem, "oGGToolStripMenuItem");
//
// txtInputPath // txtInputPath
// //
this.txtInputPath.AllowDrop = true; this.txtInputPath.AllowDrop = true;
@@ -686,6 +570,7 @@ namespace JDP {
this.fileSystemTreeView1.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.fileSystemTreeView1_AfterSelect); this.fileSystemTreeView1.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.fileSystemTreeView1_AfterSelect);
this.fileSystemTreeView1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.fileSystemTreeView1_MouseDown); this.fileSystemTreeView1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.fileSystemTreeView1_MouseDown);
this.fileSystemTreeView1.DragEnter += new System.Windows.Forms.DragEventHandler(this.fileSystemTreeView1_DragEnter); this.fileSystemTreeView1.DragEnter += new System.Windows.Forms.DragEventHandler(this.fileSystemTreeView1_DragEnter);
this.fileSystemTreeView1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.fileSystemTreeView1_KeyDown);
this.fileSystemTreeView1.AfterExpand += new System.Windows.Forms.TreeViewEventHandler(this.fileSystemTreeView1_AfterExpand); this.fileSystemTreeView1.AfterExpand += new System.Windows.Forms.TreeViewEventHandler(this.fileSystemTreeView1_AfterExpand);
// //
// grpExtra // grpExtra
@@ -755,26 +640,120 @@ namespace JDP {
// panel1 // panel1
// //
resources.ApplyResources(this.panel1, "panel1"); resources.ApplyResources(this.panel1, "panel1");
this.panel1.Controls.Add(this.groupBoxCorrector);
this.panel1.Controls.Add(this.grpOutputPathGeneration); this.panel1.Controls.Add(this.grpOutputPathGeneration);
this.panel1.Controls.Add(this.btnStop); this.panel1.Controls.Add(this.btnStop);
this.panel1.Controls.Add(this.btnConvert); this.panel1.Controls.Add(this.btnConvert);
this.panel1.Controls.Add(this.grpAction);
this.panel1.Controls.Add(this.btnSettings); this.panel1.Controls.Add(this.btnSettings);
this.panel1.Controls.Add(this.grpExtra); this.panel1.Controls.Add(this.grpExtra);
this.panel1.Controls.Add(this.btnAbout); this.panel1.Controls.Add(this.btnAbout);
this.panel1.Controls.Add(this.grpOutputStyle); this.panel1.Controls.Add(this.grpOutputStyle);
this.panel1.Controls.Add(this.grpFreedb); this.panel1.Controls.Add(this.grpFreedb);
this.panel1.Controls.Add(this.grpAudioOutput); this.panel1.Controls.Add(this.grpAudioOutput);
this.panel1.Controls.Add(this.grpAction);
this.panel1.Controls.Add(this.btnPause); this.panel1.Controls.Add(this.btnPause);
this.panel1.Controls.Add(this.btnResume); this.panel1.Controls.Add(this.btnResume);
this.panel1.Name = "panel1"; this.panel1.Name = "panel1";
// //
// groupBoxCorrector
//
this.groupBoxCorrector.Controls.Add(this.rbCorrectorLocateFiles);
this.groupBoxCorrector.Controls.Add(this.rbCorrectorChangeExtension);
this.groupBoxCorrector.Controls.Add(this.checkBoxCorrectorOverwrite);
this.groupBoxCorrector.Controls.Add(this.labelCorrectorFormat);
this.groupBoxCorrector.Controls.Add(this.comboBoxCorrectorFormat);
resources.ApplyResources(this.groupBoxCorrector, "groupBoxCorrector");
this.groupBoxCorrector.Name = "groupBoxCorrector";
this.groupBoxCorrector.TabStop = false;
//
// rbCorrectorLocateFiles
//
resources.ApplyResources(this.rbCorrectorLocateFiles, "rbCorrectorLocateFiles");
this.rbCorrectorLocateFiles.Name = "rbCorrectorLocateFiles";
this.rbCorrectorLocateFiles.TabStop = true;
this.rbCorrectorLocateFiles.UseVisualStyleBackColor = true;
//
// rbCorrectorChangeExtension
//
resources.ApplyResources(this.rbCorrectorChangeExtension, "rbCorrectorChangeExtension");
this.rbCorrectorChangeExtension.Name = "rbCorrectorChangeExtension";
this.rbCorrectorChangeExtension.TabStop = true;
this.rbCorrectorChangeExtension.UseVisualStyleBackColor = true;
this.rbCorrectorChangeExtension.CheckedChanged += new System.EventHandler(this.rbCorrectorChangeExtension_CheckedChanged);
//
// checkBoxCorrectorOverwrite
//
resources.ApplyResources(this.checkBoxCorrectorOverwrite, "checkBoxCorrectorOverwrite");
this.checkBoxCorrectorOverwrite.Name = "checkBoxCorrectorOverwrite";
this.checkBoxCorrectorOverwrite.UseVisualStyleBackColor = true;
//
// labelCorrectorFormat
//
resources.ApplyResources(this.labelCorrectorFormat, "labelCorrectorFormat");
this.labelCorrectorFormat.MinimumSize = new System.Drawing.Size(16, 16);
this.labelCorrectorFormat.Name = "labelCorrectorFormat";
//
// comboBoxCorrectorFormat
//
this.comboBoxCorrectorFormat.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBoxCorrectorFormat.FormattingEnabled = true;
resources.ApplyResources(this.comboBoxCorrectorFormat, "comboBoxCorrectorFormat");
this.comboBoxCorrectorFormat.Name = "comboBoxCorrectorFormat";
this.comboBoxCorrectorFormat.SelectedIndexChanged += new System.EventHandler(this.comboBoxCorrectorFormat_SelectedIndexChanged);
//
// 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);
//
// 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);
//
// 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);
//
// radioButtonAudioNone
//
resources.ApplyResources(this.radioButtonAudioNone, "radioButtonAudioNone");
this.radioButtonAudioNone.Name = "radioButtonAudioNone";
this.radioButtonAudioNone.TabStop = true;
this.radioButtonAudioNone.UseVisualStyleBackColor = true;
this.radioButtonAudioNone.CheckedChanged += new System.EventHandler(this.radioButtonAudioLossless_CheckedChanged);
//
// 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);
//
// checkBoxAdvancedMode
//
resources.ApplyResources(this.checkBoxAdvancedMode, "checkBoxAdvancedMode");
this.checkBoxAdvancedMode.Name = "checkBoxAdvancedMode";
this.checkBoxAdvancedMode.UseVisualStyleBackColor = true;
this.checkBoxAdvancedMode.CheckedChanged += new System.EventHandler(this.checkBoxAdvancedMode_CheckedChanged);
//
// frmCUETools // frmCUETools
// //
resources.ApplyResources(this, "$this"); resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.panel1);
this.Controls.Add(this.grpInput); this.Controls.Add(this.grpInput);
this.Controls.Add(this.panel1);
this.Controls.Add(this.statusStrip1); this.Controls.Add(this.statusStrip1);
this.MaximizeBox = false; this.MaximizeBox = false;
this.Name = "frmCUETools"; this.Name = "frmCUETools";
@@ -792,7 +771,6 @@ namespace JDP {
this.statusStrip1.PerformLayout(); this.statusStrip1.PerformLayout();
this.grpFreedb.ResumeLayout(false); this.grpFreedb.ResumeLayout(false);
this.grpFreedb.PerformLayout(); this.grpFreedb.PerformLayout();
this.contextMenuStripUDC.ResumeLayout(false);
this.grpInput.ResumeLayout(false); this.grpInput.ResumeLayout(false);
this.grpInput.PerformLayout(); this.grpInput.PerformLayout();
this.grpExtra.ResumeLayout(false); this.grpExtra.ResumeLayout(false);
@@ -800,6 +778,8 @@ namespace JDP {
((System.ComponentModel.ISupportInitialize)(this.numericWriteOffset)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.numericWriteOffset)).EndInit();
this.contextMenuStripFileTree.ResumeLayout(false); this.contextMenuStripFileTree.ResumeLayout(false);
this.panel1.ResumeLayout(false); this.panel1.ResumeLayout(false);
this.groupBoxCorrector.ResumeLayout(false);
this.groupBoxCorrector.PerformLayout();
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();
@@ -823,15 +803,10 @@ namespace JDP {
private System.Windows.Forms.TextBox txtAppendFilename; private System.Windows.Forms.TextBox txtAppendFilename;
private System.Windows.Forms.TextBox txtCreateSubdirectory; private System.Windows.Forms.TextBox txtCreateSubdirectory;
private System.Windows.Forms.GroupBox grpAudioOutput; private System.Windows.Forms.GroupBox grpAudioOutput;
private System.Windows.Forms.RadioButton rbFLAC;
private System.Windows.Forms.RadioButton rbWAV;
private System.Windows.Forms.RadioButton rbWavPack;
private System.Windows.Forms.RadioButton rbCustomFormat; private System.Windows.Forms.RadioButton rbCustomFormat;
private System.Windows.Forms.TextBox txtCustomFormat; private System.Windows.Forms.TextBox txtCustomFormat;
private System.Windows.Forms.Button btnSettings; private System.Windows.Forms.Button btnSettings;
private System.Windows.Forms.RadioButton rbNoAudio;
private System.Windows.Forms.GroupBox grpAction; private System.Windows.Forms.GroupBox grpAction;
private System.Windows.Forms.RadioButton rbActionVerifyThenEncode;
private System.Windows.Forms.RadioButton rbActionVerify; private System.Windows.Forms.RadioButton rbActionVerify;
private System.Windows.Forms.RadioButton rbActionEncode; private System.Windows.Forms.RadioButton rbActionEncode;
private System.Windows.Forms.StatusStrip statusStrip1; private System.Windows.Forms.StatusStrip statusStrip1;
@@ -842,28 +817,14 @@ namespace JDP {
private System.Windows.Forms.RadioButton rbEmbedCUE; private System.Windows.Forms.RadioButton rbEmbedCUE;
private System.Windows.Forms.MaskedTextBox txtDataTrackLength; private System.Windows.Forms.MaskedTextBox txtDataTrackLength;
private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label1;
private System.Windows.Forms.RadioButton rbAPE;
private System.Windows.Forms.Button btnStop; private System.Windows.Forms.Button btnStop;
private System.Windows.Forms.Button btnPause; private System.Windows.Forms.Button btnPause;
private System.Windows.Forms.Button btnResume; private System.Windows.Forms.Button btnResume;
private System.Windows.Forms.CheckBox chkLossyWAV;
private System.Windows.Forms.RadioButton rbActionVerifyAndEncode; private System.Windows.Forms.RadioButton rbActionVerifyAndEncode;
private System.Windows.Forms.RadioButton rbTTA;
private System.Windows.Forms.GroupBox grpFreedb; private System.Windows.Forms.GroupBox grpFreedb;
private System.Windows.Forms.RadioButton rbFreedbAlways; private System.Windows.Forms.RadioButton rbFreedbAlways;
private System.Windows.Forms.RadioButton rbFreedbIf; private System.Windows.Forms.RadioButton rbFreedbIf;
private System.Windows.Forms.RadioButton rbFreedbNever; private System.Windows.Forms.RadioButton rbFreedbNever;
private System.Windows.Forms.RadioButton rbUDC1;
private System.Windows.Forms.Button btnCodec;
private System.Windows.Forms.ContextMenuStrip contextMenuStripUDC;
private System.Windows.Forms.ToolStripMenuItem tAKToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem mP3ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem oGGToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem2;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem3;
private System.Windows.Forms.RadioButton rbActionVerifyAndCRCs;
private System.Windows.Forms.MaskedTextBox txtPreGapLength; private System.Windows.Forms.MaskedTextBox txtPreGapLength;
private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label2;
private CUEControls.FileSystemTreeView fileSystemTreeView1; private CUEControls.FileSystemTreeView fileSystemTreeView1;
@@ -887,6 +848,21 @@ namespace JDP {
private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabelProcessed; private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabelProcessed;
private System.Windows.Forms.TextBox textBatchReport; private System.Windows.Forms.TextBox textBatchReport;
private System.Windows.Forms.Panel panel1; private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.ComboBox comboBoxAudioFormat;
private System.Windows.Forms.Label labelFormat;
private System.Windows.Forms.GroupBox groupBoxCorrector;
private System.Windows.Forms.Label labelCorrectorFormat;
private System.Windows.Forms.ComboBox comboBoxCorrectorFormat;
private System.Windows.Forms.CheckBox checkBoxCorrectorOverwrite;
private System.Windows.Forms.RadioButton rbCorrectorLocateFiles;
private System.Windows.Forms.RadioButton rbCorrectorChangeExtension;
private System.Windows.Forms.ComboBox comboBoxScript;
private System.Windows.Forms.RadioButton radioButtonAudioNone;
private System.Windows.Forms.RadioButton radioButtonAudioLossy;
private System.Windows.Forms.RadioButton radioButtonAudioHybrid;
private System.Windows.Forms.RadioButton radioButtonAudioLossless;
private System.Windows.Forms.ComboBox comboBoxEncoder;
private System.Windows.Forms.CheckBox checkBoxAdvancedMode;
} }
} }

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -270,32 +270,4 @@
<data name="grpExtra.Text" xml:space="preserve"> <data name="grpExtra.Text" xml:space="preserve">
<value>Дополнительно</value> <value>Дополнительно</value>
</data> </data>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAEBAAAAAACABoBQAAFgAAACgAAAAQAAAAIAAAAAEACAAAAAAAAAEAAAAAAAAAAAAAAAEAAAAB
AAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAwMDAAMDcwADwyqYABAQEAAgICAAMDAwAERERABYW
FgAcHBwAIiIiACkpKQBVVVUATU1NAEJCQgA5OTkAgHz/AFBQ/wCTANYA/+zMAMbW7wDW5+cAkKmtAAAA
MwAAAGYAAACZAAAAzAAAMwAAADMzAAAzZgAAM5kAADPMAAAz/wAAZgAAAGYzAABmZgAAZpkAAGbMAABm
/wAAmQAAAJkzAACZZgAAmZkAAJnMAACZ/wAAzAAAAMwzAADMZgAAzJkAAMzMAADM/wAA/2YAAP+ZAAD/
zAAzAAAAMwAzADMAZgAzAJkAMwDMADMA/wAzMwAAMzMzADMzZgAzM5kAMzPMADMz/wAzZgAAM2YzADNm
ZgAzZpkAM2bMADNm/wAzmQAAM5kzADOZZgAzmZkAM5nMADOZ/wAzzAAAM8wzADPMZgAzzJkAM8zMADPM
/wAz/zMAM/9mADP/mQAz/8wAM///AGYAAABmADMAZgBmAGYAmQBmAMwAZgD/AGYzAABmMzMAZjNmAGYz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vv6woK8wrz8wrzCgoK
7+vv6/Pz8/Pz8/Pz8/Pz8+vvCu/r8/Pz8/Pz8/Pz8+vvCgoK6+vv8/Pz8/Pz7+vrCgoKCgrv6+/z8/Pz
7+vvCgoKCgoKCu/r6+vr6+vvCgoKCvgfAADgBwAAwAMAAIABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAIABAADAAwAA4AcAAPAPAAA=
</value>
</data>
</root> </root>

View File

@@ -75,10 +75,10 @@ namespace JDP
// //
this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream"))); this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
this.imageList1.TransparentColor = System.Drawing.Color.Transparent; this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
this.imageList1.Images.SetKeyName(0, "eac.ico"); this.imageList1.Images.SetKeyName(0, "eac3.ico");
this.imageList1.Images.SetKeyName(1, "freedb.gif"); this.imageList1.Images.SetKeyName(1, "freedb.ico");
this.imageList1.Images.SetKeyName(2, "musicbrainz.ico"); this.imageList1.Images.SetKeyName(2, "musicbrainz.ico");
this.imageList1.Images.SetKeyName(3, "cue.ico"); this.imageList1.Images.SetKeyName(3, "cue3.ico");
// //
// textBox1 // textBox1
// //

View File

@@ -159,55 +159,84 @@
<value> <value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2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8C4wH/AcYCsQH/AW0CagHQAyUBNgMCAQMIAAT/AZkCMi3/A/EB/wPqAf8DhgH/
AZkCZQH/AZkCZQH/AZkCZQH/AZkCZQH/AZkCZQH/AZkCZQH/AZkCZQH/AygB/wMAAf8DGwH/A3YB/wPM
Bf8DAAH/AZkCZQH/AZkCZQH/CAADGAEgA2kBwAPGAv8C9wL/AvIC/wLsAv8C5wL/AuMB/wHGArEB/wFt
AmoB0AMlATYDAgEDGAADNwFQA18BogGCAoAB0gGMAokB/wGCAn4B1ANfAaYDOwFaAwUBBxAACP8BzAKZ
Lf8D8QH/A8AB/wQAAZkCZQH/AZkCZQH/AZkCZQH/AZkCZQH/AZkCZQH/AZkCZQH/AZkCZQH/AZkCZQH/
AZkCZQH/AxsB/wMAAf8DTAH/AygB/wGZAmUB/xQAAzcBUANfAaIBggKAAdIBjAKJAf8BggJ+AdQDXwGm
AzsBWgMFAQcQAAFCAU0BPgcAAT4DAAEoAwABQAMAASADAAEBAQABAQYAAQEWAAP/gQAB4AEDAgABgAEB
AeABAwHAAQEEAAHAAQEBgAUAAYABAAGABQABgEEAAYAFAAGAAQABgAEBBAABgAEBAcABAwQAAcABAwHw
AQ8CAAGAAQEB8AEPCw==
</value> </value>
</data> </data>
<data name="listChoices.TabIndex" type="System.Int32, mscorlib"> <data name="listChoices.TabIndex" type="System.Int32, mscorlib">

View File

@@ -1,55 +0,0 @@
namespace JDP {
partial class frmFilenameCorrector {
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing) {
if (disposing && (components != null)) {
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent() {
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmFilenameCorrector));
this.lblDescription = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// lblDescription
//
resources.ApplyResources(this.lblDescription, "lblDescription");
this.lblDescription.Name = "lblDescription";
//
// frmFilenameCorrector
//
this.AllowDrop = true;
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.lblDescription);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.MaximizeBox = false;
this.Name = "frmFilenameCorrector";
this.TopMost = true;
this.DragDrop += new System.Windows.Forms.DragEventHandler(this.frmFilenameCorrector_DragDrop);
this.DragEnter += new System.Windows.Forms.DragEventHandler(this.frmFilenameCorrector_DragEnter);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Label lblDescription;
}
}

View File

@@ -1,67 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Threading;
using CUETools.Processor;
namespace JDP {
public partial class frmFilenameCorrector : Form {
private Thread _workThread;
public frmFilenameCorrector() {
InitializeComponent();
}
private void frmFilenameCorrector_DragEnter(object sender, DragEventArgs e) {
if (e.Data.GetDataPresent(DataFormats.FileDrop)) {
e.Effect = DragDropEffects.Copy;
}
}
private void frmFilenameCorrector_DragDrop(object sender, DragEventArgs e) {
if ((_workThread != null) && (_workThread.IsAlive)) {
return;
}
if (e.Data.GetDataPresent(DataFormats.FileDrop)) {
_workThread = new Thread(new ParameterizedThreadStart(CorrectCUEThread));
_workThread.Start(e.Data.GetData(DataFormats.FileDrop));
}
}
private void CorrectCUEThread(object p) {
string[] paths = (string[])p;
bool oneSuccess = false;
bool cancel = false;
foreach (string path in paths) {
if (Path.GetExtension(path).ToLower() == ".cue") {
try {
string fixedCue = CUESheet.CorrectAudioFilenames(path, true);
using (StreamWriter sw = new StreamWriter(path, false, CUESheet.Encoding))
sw.Write (fixedCue);
oneSuccess = true;
}
catch (Exception ex) {
Invoke((MethodInvoker)delegate() {
cancel = (MessageBox.Show(this, path + Environment.NewLine +
Environment.NewLine + ex.Message, "Error", MessageBoxButtons.OKCancel,
MessageBoxIcon.Error) == DialogResult.Cancel);
});
if (cancel) break;
}
}
}
if (oneSuccess) {
Invoke((MethodInvoker)delegate() {
MessageBox.Show(this, "Filename correction is complete!", "Done",
MessageBoxButtons.OK, MessageBoxIcon.Information);
});
}
}
}
}

View File

@@ -1,126 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="lblDescription.Text" xml:space="preserve">
<value>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.</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>Dateinamenkorrektor</value>
</data>
</root>

View File

@@ -1,174 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="lblDescription.Location" type="System.Drawing.Point, System.Drawing">
<value>8, 8</value>
</data>
<data name="lblDescription.Size" type="System.Drawing.Size, System.Drawing">
<value>272, 144</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="lblDescription.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="lblDescription.Text" xml:space="preserve">
<value>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.</value>
</data>
<data name="lblDescription.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleLeft</value>
</data>
<data name="&gt;&gt;lblDescription.Name" xml:space="preserve">
<value>lblDescription</value>
</data>
<data name="&gt;&gt;lblDescription.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lblDescription.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;lblDescription.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
<value>6, 13</value>
</data>
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>286, 159</value>
</data>
<data name="$this.Font" type="System.Drawing.Font, System.Drawing">
<value>Tahoma, 8.25pt</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
<value>Manual</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>Filename Corrector</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>frmFilenameCorrector</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>System.Windows.Forms.Form, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
</root>

File diff suppressed because it is too large Load Diff

View File

@@ -5,25 +5,40 @@ using System.Drawing;
using System.Text; using System.Text;
using System.Windows.Forms; using System.Windows.Forms;
using System.Globalization; using System.Globalization;
using System.IO;
using System.Threading; using System.Threading;
using CUETools.Processor; using CUETools.Processor;
using CUEControls;
namespace JDP { namespace JDP {
public partial class frmSettings : Form { public partial class frmSettings : Form {
bool _reducePriority; bool _reducePriority;
CUEConfig _config; CUEConfig _config;
private ShellIconMgr m_icon_mgr;
public frmSettings() { public frmSettings() {
InitializeComponent(); InitializeComponent();
} }
public ShellIconMgr IconMgr
{
get
{
return m_icon_mgr;
}
set
{
m_icon_mgr = value;
}
}
private void frmSettings_Load(object sender, EventArgs e) { private void frmSettings_Load(object sender, EventArgs e) {
chkReducePriority.Checked = _reducePriority; chkReducePriority.Checked = _reducePriority;
chkPreserveHTOA.Checked = _config.preserveHTOA; chkPreserveHTOA.Checked = _config.preserveHTOA;
chkAutoCorrectFilenames.Checked = _config.autoCorrectFilenames; chkAutoCorrectFilenames.Checked = _config.autoCorrectFilenames;
numericFLACCompressionLevel.Value = _config.flacCompressionLevel; numericFLACCompressionLevel.Value = _config.flacCompressionLevel;
numFixWhenConfidence.Value = _config.fixWhenConfidence; numFixWhenConfidence.Value = _config.fixOffsetMinimumConfidence;
numFixWhenPercent.Value = _config.fixWhenPercent; numFixWhenPercent.Value = _config.fixOffsetMinimumTracksPercent;
numEncodeWhenConfidence.Value = _config.encodeWhenConfidence; numEncodeWhenConfidence.Value = _config.encodeWhenConfidence;
numEncodeWhenPercent.Value = _config.encodeWhenPercent; numEncodeWhenPercent.Value = _config.encodeWhenPercent;
chkEncodeWhenZeroOffset.Checked = _config.encodeWhenZeroOffset; chkEncodeWhenZeroOffset.Checked = _config.encodeWhenZeroOffset;
@@ -53,8 +68,6 @@ namespace JDP {
chkReplaceSpaces.Checked = _config.replaceSpaces; chkReplaceSpaces.Checked = _config.replaceSpaces;
chkWriteArLogOnConvert.Checked = _config.writeArLogOnConvert; chkWriteArLogOnConvert.Checked = _config.writeArLogOnConvert;
chkWriteARLogOnVerify.Checked = _config.writeArLogOnVerify; chkWriteARLogOnVerify.Checked = _config.writeArLogOnVerify;
chkArNoUnverifiedAudio.Checked = _config.noUnverifiedOutput;
chkArFixOffset.Checked = _config.fixOffset;
chkEmbedLog.Checked = _config.embedLog; chkEmbedLog.Checked = _config.embedLog;
chkExtractLog.Checked = _config.extractLog; chkExtractLog.Checked = _config.extractLog;
chkFillUpCUE.Checked = _config.fillUpCUE; chkFillUpCUE.Checked = _config.fillUpCUE;
@@ -69,15 +82,17 @@ namespace JDP {
chkHDCDLW16.Checked = _config.decodeHDCDtoLW16; chkHDCDLW16.Checked = _config.decodeHDCDtoLW16;
chkHDCD24bit.Checked = _config.decodeHDCDto24bit; chkHDCD24bit.Checked = _config.decodeHDCDto24bit;
chkOverwriteTags.Checked = _config.overwriteCUEData; chkOverwriteTags.Checked = _config.overwriteCUEData;
chkSingleInstance.Checked = _config.oneInstance; chkAllowMultipleInstances.Checked = !_config.oneInstance;
checkBoxWriteCUETags.Checked = _config.writeBasicTagsFromCUEData;
textUDC1Extension.Text = _config.udc1Extension; checkBoxCopyBasicTags.Checked = _config.copyBasicTags;
textUDC1Decoder.Text = _config.udc1Decoder; checkBoxCopyUnknownTags.Checked = _config.copyUnknownTags;
textUDC1Params.Text = _config.udc1Params; checkBoxCopyAlbumArt.Checked = _config.copyAlbumArt;
textUDC1Encoder.Text = _config.udc1Encoder; checkBoxEmbedAlbumArt.Checked = _config.embedAlbumArt;
textUDC1EncParams.Text = _config.udc1EncParams; checkBoxARVerifyUseSourceFolder.Checked = _config.arLogToSourceFolder;
chkUDC1APEv2.Checked = _config.udc1APEv2; checkBoxARLogVerbose.Checked = _config.arLogVerbose;
chkUDC1ID3v2.Checked = _config.udc1ID3v2; checkBoxFixToNearest.Checked = _config.fixOffsetToNearest;
textBoxARLogExtension.Text = _config.arLogExtension;
numericUpDownMaxResolution.Value = _config.maxAlbumArtSize;
string[] cultures = { "en-US", "de-DE", "ru-RU" }; string[] cultures = { "en-US", "de-DE", "ru-RU" };
foreach (string culture in cultures) foreach (string culture in cultures)
@@ -96,9 +111,59 @@ namespace JDP {
if (comboLanguage.SelectedItem == null) if (comboLanguage.SelectedItem == null)
comboLanguage.SelectedItem = comboLanguage.Items[0]; comboLanguage.SelectedItem = comboLanguage.Items[0];
foreach (KeyValuePair<string, CUEToolsUDC> 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<string, CUEToolsUDC> 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<string, CUEToolsFormat> 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<string, CUEToolsScript> 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(); EnableDisable();
} }
//private void DictionaryToListView(IDictionary<> dict, ListView view)
//{
// foreach (KeyValuePair<string, object> 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) { private void frmSettings_FormClosing(object sender, FormClosingEventArgs e) {
} }
@@ -119,13 +184,22 @@ namespace JDP {
private void btnOK_Click(object sender, EventArgs e) 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; _reducePriority = chkReducePriority.Checked;
_config.preserveHTOA = chkPreserveHTOA.Checked; _config.preserveHTOA = chkPreserveHTOA.Checked;
_config.autoCorrectFilenames = chkAutoCorrectFilenames.Checked; _config.autoCorrectFilenames = chkAutoCorrectFilenames.Checked;
_config.flacCompressionLevel = (uint)numericFLACCompressionLevel.Value; _config.flacCompressionLevel = (uint)numericFLACCompressionLevel.Value;
_config.lossyWAVQuality = (int)numericLossyWAVQuality.Value; _config.lossyWAVQuality = (int)numericLossyWAVQuality.Value;
_config.fixWhenPercent = (uint)numFixWhenPercent.Value; _config.fixOffsetMinimumTracksPercent = (uint)numFixWhenPercent.Value;
_config.fixWhenConfidence = (uint)numFixWhenConfidence.Value; _config.fixOffsetMinimumConfidence = (uint)numFixWhenConfidence.Value;
_config.encodeWhenPercent = (uint)numEncodeWhenPercent.Value; _config.encodeWhenPercent = (uint)numEncodeWhenPercent.Value;
_config.encodeWhenConfidence = (uint)numEncodeWhenConfidence.Value; _config.encodeWhenConfidence = (uint)numEncodeWhenConfidence.Value;
_config.encodeWhenZeroOffset = chkEncodeWhenZeroOffset.Checked; _config.encodeWhenZeroOffset = chkEncodeWhenZeroOffset.Checked;
@@ -152,8 +226,6 @@ namespace JDP {
_config.replaceSpaces = chkReplaceSpaces.Checked; _config.replaceSpaces = chkReplaceSpaces.Checked;
_config.writeArLogOnConvert = chkWriteArLogOnConvert.Checked; _config.writeArLogOnConvert = chkWriteArLogOnConvert.Checked;
_config.writeArLogOnVerify = chkWriteARLogOnVerify.Checked; _config.writeArLogOnVerify = chkWriteARLogOnVerify.Checked;
_config.noUnverifiedOutput = chkArNoUnverifiedAudio.Checked;
_config.fixOffset = chkArFixOffset.Checked;
_config.embedLog = chkEmbedLog.Checked; _config.embedLog = chkEmbedLog.Checked;
_config.extractLog = chkExtractLog.Checked; _config.extractLog = chkExtractLog.Checked;
_config.fillUpCUE = chkFillUpCUE.Checked; _config.fillUpCUE = chkFillUpCUE.Checked;
@@ -167,30 +239,24 @@ namespace JDP {
_config.decodeHDCDtoLW16 = chkHDCDLW16.Checked; _config.decodeHDCDtoLW16 = chkHDCDLW16.Checked;
_config.decodeHDCDto24bit = chkHDCD24bit.Checked; _config.decodeHDCDto24bit = chkHDCD24bit.Checked;
_config.overwriteCUEData = chkOverwriteTags.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.arLogToSourceFolder = checkBoxARVerifyUseSourceFolder.Checked;
_config.udc1Decoder = textUDC1Decoder.Text; _config.arLogVerbose = checkBoxARLogVerbose.Checked;
_config.udc1Params = textUDC1Params.Text; _config.fixOffsetToNearest = checkBoxFixToNearest.Checked;
_config.udc1Encoder = textUDC1Encoder.Text; _config.arLogExtension = textBoxARLogExtension.Text;
_config.udc1EncParams = textUDC1EncParams.Text; _config.maxAlbumArtSize = (int) numericUpDownMaxResolution.Value;
_config.udc1APEv2 = chkUDC1APEv2.Checked;
_config.udc1ID3v2 = chkUDC1ID3v2.Checked;
_config.language = ((CultureInfo)comboLanguage.SelectedItem).Name; _config.language = ((CultureInfo)comboLanguage.SelectedItem).Name;
} }
private void EnableDisable() 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; grpHDCD.Enabled = chkHDCDDetect.Checked;
chkHDCDLW16.Enabled = chkHDCDDetect.Checked && chkHDCDDecode.Checked; chkHDCDLW16.Enabled = chkHDCDDetect.Checked && chkHDCDDecode.Checked;
chkHDCD24bit.Enabled = chkHDCDDetect.Checked && chkHDCDDecode.Checked; chkHDCD24bit.Enabled = chkHDCDDetect.Checked && chkHDCDDecode.Checked;
@@ -239,5 +305,605 @@ namespace JDP {
{ {
EnableDisable(); 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<string, CUEToolsUDC> encoder in _config.encoders)
if (encoder.Value.extension == format.extension)
encoder.Value.extension = e.Label;
foreach (KeyValuePair<string, CUEToolsUDC> 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<string> decodersToRemove = new List<string>();
foreach (KeyValuePair<string, CUEToolsUDC> 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<string> encodersToRemove = new List<string>();
foreach (KeyValuePair<string, CUEToolsUDC> 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<string, CUEToolsUDC> 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<string, CUEToolsUDC> 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<string, CUEToolsUDC> 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);
}
} }
} }

File diff suppressed because it is too large Load Diff