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

@@ -116,6 +116,10 @@
</Compile>
</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">
<Project>{5802C7E9-157E-4124-946D-70B5AE48A5A1}</Project>
<Name>CUETools.AccurateRip</Name>

View File

@@ -43,8 +43,7 @@ namespace CUERipper
this.Start = new System.Windows.Forms.ColumnHeader();
this.Length = new System.Windows.Forms.ColumnHeader();
this.buttonGo = new System.Windows.Forms.Button();
this.comboLossless = new System.Windows.Forms.ComboBox();
this.comboCodec = new System.Windows.Forms.ComboBox();
this.comboBoxAudioFormat = new System.Windows.Forms.ComboBox();
this.comboImage = new System.Windows.Forms.ComboBox();
this.buttonAbort = new System.Windows.Forms.Button();
this.buttonPause = new System.Windows.Forms.Button();
@@ -53,9 +52,19 @@ namespace CUERipper
this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.releaseBindingSource = new System.Windows.Forms.BindingSource(this.components);
this.numericWriteOffset = new System.Windows.Forms.NumericUpDown();
this.lblWriteOffset = new System.Windows.Forms.Label();
this.comboBoxEncoder = new System.Windows.Forms.ComboBox();
this.radioButtonAudioLossy = new System.Windows.Forms.RadioButton();
this.radioButtonAudioHybrid = new System.Windows.Forms.RadioButton();
this.radioButtonAudioLossless = new System.Windows.Forms.RadioButton();
this.checkBoxEACMode = new System.Windows.Forms.CheckBox();
this.groupBoxSettings = new System.Windows.Forms.GroupBox();
this.statusStrip1.SuspendLayout();
this.contextMenuStripRelease.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.releaseBindingSource)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericWriteOffset)).BeginInit();
this.groupBoxSettings.SuspendLayout();
this.SuspendLayout();
//
// comboDrives
@@ -157,29 +166,19 @@ namespace CUERipper
this.buttonGo.UseVisualStyleBackColor = true;
this.buttonGo.Click += new System.EventHandler(this.buttonGo_Click);
//
// comboLossless
// comboBoxAudioFormat
//
this.comboLossless.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboLossless.FormattingEnabled = true;
this.comboLossless.Items.AddRange(new object[] {
resources.GetString("comboLossless.Items"),
resources.GetString("comboLossless.Items1"),
resources.GetString("comboLossless.Items2")});
resources.ApplyResources(this.comboLossless, "comboLossless");
this.comboLossless.Name = "comboLossless";
//
// comboCodec
//
this.comboCodec.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboCodec.FormattingEnabled = true;
this.comboCodec.Items.AddRange(new object[] {
resources.GetString("comboCodec.Items"),
resources.GetString("comboCodec.Items1"),
resources.GetString("comboCodec.Items2"),
resources.GetString("comboCodec.Items3"),
resources.GetString("comboCodec.Items4")});
resources.ApplyResources(this.comboCodec, "comboCodec");
this.comboCodec.Name = "comboCodec";
this.comboBoxAudioFormat.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBoxAudioFormat.FormattingEnabled = true;
this.comboBoxAudioFormat.Items.AddRange(new object[] {
resources.GetString("comboBoxAudioFormat.Items"),
resources.GetString("comboBoxAudioFormat.Items1"),
resources.GetString("comboBoxAudioFormat.Items2"),
resources.GetString("comboBoxAudioFormat.Items3"),
resources.GetString("comboBoxAudioFormat.Items4")});
resources.ApplyResources(this.comboBoxAudioFormat, "comboBoxAudioFormat");
this.comboBoxAudioFormat.Name = "comboBoxAudioFormat";
this.comboBoxAudioFormat.SelectedIndexChanged += new System.EventHandler(this.comboBoxAudioFormat_SelectedIndexChanged);
//
// comboImage
//
@@ -241,18 +240,90 @@ namespace CUERipper
//
this.releaseBindingSource.DataSource = typeof(MusicBrainz.Release);
//
// numericWriteOffset
//
resources.ApplyResources(this.numericWriteOffset, "numericWriteOffset");
this.numericWriteOffset.Maximum = new decimal(new int[] {
99999,
0,
0,
0});
this.numericWriteOffset.Minimum = new decimal(new int[] {
99999,
0,
0,
-2147483648});
this.numericWriteOffset.Name = "numericWriteOffset";
//
// lblWriteOffset
//
resources.ApplyResources(this.lblWriteOffset, "lblWriteOffset");
this.lblWriteOffset.Name = "lblWriteOffset";
//
// comboBoxEncoder
//
this.comboBoxEncoder.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBoxEncoder.FormattingEnabled = true;
resources.ApplyResources(this.comboBoxEncoder, "comboBoxEncoder");
this.comboBoxEncoder.Name = "comboBoxEncoder";
this.comboBoxEncoder.SelectedIndexChanged += new System.EventHandler(this.comboBoxEncoder_SelectedIndexChanged);
//
// radioButtonAudioLossy
//
resources.ApplyResources(this.radioButtonAudioLossy, "radioButtonAudioLossy");
this.radioButtonAudioLossy.Name = "radioButtonAudioLossy";
this.radioButtonAudioLossy.TabStop = true;
this.radioButtonAudioLossy.UseVisualStyleBackColor = true;
this.radioButtonAudioLossy.CheckedChanged += new System.EventHandler(this.radioButtonAudioLossless_CheckedChanged);
//
// radioButtonAudioHybrid
//
resources.ApplyResources(this.radioButtonAudioHybrid, "radioButtonAudioHybrid");
this.radioButtonAudioHybrid.Name = "radioButtonAudioHybrid";
this.radioButtonAudioHybrid.TabStop = true;
this.radioButtonAudioHybrid.UseVisualStyleBackColor = true;
this.radioButtonAudioHybrid.CheckedChanged += new System.EventHandler(this.radioButtonAudioLossless_CheckedChanged);
//
// radioButtonAudioLossless
//
resources.ApplyResources(this.radioButtonAudioLossless, "radioButtonAudioLossless");
this.radioButtonAudioLossless.Name = "radioButtonAudioLossless";
this.radioButtonAudioLossless.TabStop = true;
this.radioButtonAudioLossless.UseVisualStyleBackColor = true;
this.radioButtonAudioLossless.CheckedChanged += new System.EventHandler(this.radioButtonAudioLossless_CheckedChanged);
//
// checkBoxEACMode
//
resources.ApplyResources(this.checkBoxEACMode, "checkBoxEACMode");
this.checkBoxEACMode.Name = "checkBoxEACMode";
this.checkBoxEACMode.UseVisualStyleBackColor = true;
this.checkBoxEACMode.CheckedChanged += new System.EventHandler(this.checkBoxEACMode_CheckedChanged);
//
// groupBoxSettings
//
this.groupBoxSettings.Controls.Add(this.radioButtonAudioLossless);
this.groupBoxSettings.Controls.Add(this.comboBoxAudioFormat);
this.groupBoxSettings.Controls.Add(this.checkBoxEACMode);
this.groupBoxSettings.Controls.Add(this.lblWriteOffset);
this.groupBoxSettings.Controls.Add(this.numericWriteOffset);
this.groupBoxSettings.Controls.Add(this.comboImage);
this.groupBoxSettings.Controls.Add(this.radioButtonAudioLossy);
this.groupBoxSettings.Controls.Add(this.comboBoxEncoder);
this.groupBoxSettings.Controls.Add(this.radioButtonAudioHybrid);
resources.ApplyResources(this.groupBoxSettings, "groupBoxSettings");
this.groupBoxSettings.Name = "groupBoxSettings";
this.groupBoxSettings.TabStop = false;
//
// frmCUERipper
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.groupBoxSettings);
this.Controls.Add(this.comboRelease);
this.Controls.Add(this.buttonPause);
this.Controls.Add(this.buttonAbort);
this.Controls.Add(this.comboImage);
this.Controls.Add(this.comboCodec);
this.Controls.Add(this.comboLossless);
this.Controls.Add(this.buttonGo);
this.Controls.Add(this.listTracks);
this.Controls.Add(this.buttonAbort);
this.Controls.Add(this.buttonGo);
this.Controls.Add(this.statusStrip1);
this.Controls.Add(this.comboDrives);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
@@ -265,6 +336,9 @@ namespace CUERipper
this.statusStrip1.PerformLayout();
this.contextMenuStripRelease.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.releaseBindingSource)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numericWriteOffset)).EndInit();
this.groupBoxSettings.ResumeLayout(false);
this.groupBoxSettings.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
@@ -283,8 +357,7 @@ namespace CUERipper
private System.Windows.Forms.ColumnHeader Start;
private System.Windows.Forms.ColumnHeader Length;
private System.Windows.Forms.Button buttonGo;
private System.Windows.Forms.ComboBox comboLossless;
private System.Windows.Forms.ComboBox comboCodec;
private System.Windows.Forms.ComboBox comboBoxAudioFormat;
private System.Windows.Forms.ComboBox comboImage;
private System.Windows.Forms.Button buttonAbort;
private System.Windows.Forms.Button buttonPause;
@@ -295,6 +368,14 @@ namespace CUERipper
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1;
private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel2;
private System.Windows.Forms.ToolStripStatusLabel toolStripStatusAr;
private System.Windows.Forms.NumericUpDown numericWriteOffset;
private System.Windows.Forms.Label lblWriteOffset;
private System.Windows.Forms.ComboBox comboBoxEncoder;
private System.Windows.Forms.RadioButton radioButtonAudioLossy;
private System.Windows.Forms.RadioButton radioButtonAudioHybrid;
private System.Windows.Forms.RadioButton radioButtonAudioLossless;
private System.Windows.Forms.CheckBox checkBoxEACMode;
private System.Windows.Forms.GroupBox groupBoxSettings;
}
}

View File

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

View File

@@ -126,7 +126,7 @@
<value>6, 6</value>
</data>
<data name="comboDrives.Size" type="System.Drawing.Size, System.Drawing">
<value>481, 21</value>
<value>487, 21</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="comboDrives.TabIndex" type="System.Int32, mscorlib">
@@ -142,13 +142,13 @@
<value>$this</value>
</data>
<data name="&gt;&gt;comboDrives.ZOrder" xml:space="preserve">
<value>10</value>
<value>8</value>
</data>
<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>
<data name="toolStripStatusLabel1.Size" type="System.Drawing.Size, System.Drawing">
<value>223, 17</value>
<value>260, 17</value>
</data>
<data name="toolStripStatusLabel1.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleLeft</value>
@@ -201,10 +201,10 @@
<value>toolStripStatusAr</value>
</data>
<data name="statusStrip1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 371</value>
<value>0, 443</value>
</data>
<data name="statusStrip1.Size" type="System.Drawing.Size, System.Drawing">
<value>499, 22</value>
<value>505, 22</value>
</data>
<data name="statusStrip1.TabIndex" type="System.Int32, mscorlib">
<value>12</value>
@@ -222,7 +222,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;statusStrip1.ZOrder" xml:space="preserve">
<value>9</value>
<value>7</value>
</data>
<data name="listTracks.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Left, Right</value>
@@ -234,7 +234,7 @@
<value>Title</value>
</data>
<data name="Title.Width" type="System.Int32, mscorlib">
<value>307</value>
<value>292</value>
</data>
<data name="TrackNo.DisplayIndex" type="System.Int32, mscorlib">
<value>0</value>
@@ -261,7 +261,7 @@
<value>6, 60</value>
</data>
<data name="listTracks.Size" type="System.Drawing.Size, System.Drawing">
<value>481, 269</value>
<value>487, 272</value>
</data>
<data name="listTracks.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
@@ -276,7 +276,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;listTracks.ZOrder" xml:space="preserve">
<value>8</value>
<value>4</value>
</data>
<data name="buttonGo.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Left, Right</value>
@@ -285,10 +285,10 @@
<value>NoControl</value>
</data>
<data name="buttonGo.Location" type="System.Drawing.Point, System.Drawing">
<value>396, 335</value>
<value>382, 406</value>
</data>
<data name="buttonGo.Size" type="System.Drawing.Size, System.Drawing">
<value>91, 33</value>
<value>111, 33</value>
</data>
<data name="buttonGo.TabIndex" type="System.Int32, mscorlib">
<value>13</value>
@@ -306,73 +306,43 @@
<value>$this</value>
</data>
<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>
</data>
<data name="comboCodec.Items" xml:space="preserve">
<data name="comboBoxAudioFormat.Items" xml:space="preserve">
<value>flac</value>
</data>
<data name="comboCodec.Items1" xml:space="preserve">
<data name="comboBoxAudioFormat.Items1" xml:space="preserve">
<value>wv</value>
</data>
<data name="comboCodec.Items2" xml:space="preserve">
<data name="comboBoxAudioFormat.Items2" xml:space="preserve">
<value>wav</value>
</data>
<data name="comboCodec.Items3" xml:space="preserve">
<data name="comboBoxAudioFormat.Items3" xml:space="preserve">
<value>ape</value>
</data>
<data name="comboCodec.Items4" xml:space="preserve">
<data name="comboBoxAudioFormat.Items4" xml:space="preserve">
<value>tta</value>
</data>
<data name="comboCodec.Location" type="System.Drawing.Point, System.Drawing">
<value>82, 335</value>
<data name="comboBoxAudioFormat.Location" type="System.Drawing.Point, System.Drawing">
<value>103, 20</value>
</data>
<data name="comboCodec.Size" type="System.Drawing.Size, System.Drawing">
<value>70, 21</value>
<data name="comboBoxAudioFormat.Size" type="System.Drawing.Size, System.Drawing">
<value>89, 21</value>
</data>
<data name="comboCodec.TabIndex" type="System.Int32, mscorlib">
<data name="comboBoxAudioFormat.TabIndex" type="System.Int32, mscorlib">
<value>17</value>
</data>
<data name="&gt;&gt;comboCodec.Name" xml:space="preserve">
<value>comboCodec</value>
<data name="&gt;&gt;comboBoxAudioFormat.Name" xml:space="preserve">
<value>comboBoxAudioFormat</value>
</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>
</data>
<data name="&gt;&gt;comboCodec.Parent" xml:space="preserve">
<value>$this</value>
<data name="&gt;&gt;comboBoxAudioFormat.Parent" xml:space="preserve">
<value>groupBoxSettings</value>
</data>
<data name="&gt;&gt;comboCodec.ZOrder" xml:space="preserve">
<value>5</value>
<data name="&gt;&gt;comboBoxAudioFormat.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="comboImage.Items" xml:space="preserve">
<value>image</value>
@@ -381,10 +351,10 @@
<value>tracks</value>
</data>
<data name="comboImage.Location" type="System.Drawing.Point, System.Drawing">
<value>158, 335</value>
<value>103, 49</value>
</data>
<data name="comboImage.Size" type="System.Drawing.Size, System.Drawing">
<value>70, 21</value>
<value>89, 21</value>
</data>
<data name="comboImage.TabIndex" type="System.Int32, mscorlib">
<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>
</data>
<data name="&gt;&gt;comboImage.Parent" xml:space="preserve">
<value>$this</value>
<value>groupBoxSettings</value>
</data>
<data name="&gt;&gt;comboImage.ZOrder" xml:space="preserve">
<value>4</value>
<value>5</value>
</data>
<data name="buttonAbort.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Left, Right</value>
@@ -408,10 +378,10 @@
<value>NoControl</value>
</data>
<data name="buttonAbort.Location" type="System.Drawing.Point, System.Drawing">
<value>396, 335</value>
<value>382, 406</value>
</data>
<data name="buttonAbort.Size" type="System.Drawing.Size, System.Drawing">
<value>91, 33</value>
<value>111, 33</value>
</data>
<data name="buttonAbort.TabIndex" type="System.Int32, mscorlib">
<value>19</value>
@@ -432,7 +402,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;buttonAbort.ZOrder" xml:space="preserve">
<value>3</value>
<value>5</value>
</data>
<data name="buttonPause.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Left, Right</value>
@@ -441,10 +411,10 @@
<value>NoControl</value>
</data>
<data name="buttonPause.Location" type="System.Drawing.Point, System.Drawing">
<value>299, 335</value>
<value>382, 367</value>
</data>
<data name="buttonPause.Size" type="System.Drawing.Size, System.Drawing">
<value>91, 33</value>
<value>111, 33</value>
</data>
<data name="buttonPause.TabIndex" type="System.Int32, mscorlib">
<value>20</value>
@@ -465,7 +435,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;buttonPause.ZOrder" xml:space="preserve">
<value>2</value>
<value>3</value>
</data>
<data name="comboRelease.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Left, Right</value>
@@ -492,7 +462,7 @@
<value>6, 33</value>
</data>
<data name="comboRelease.Size" type="System.Drawing.Size, System.Drawing">
<value>481, 21</value>
<value>487, 21</value>
</data>
<data name="comboRelease.TabIndex" type="System.Int32, mscorlib">
<value>21</value>
@@ -507,7 +477,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;comboRelease.ZOrder" xml:space="preserve">
<value>1</value>
<value>2</value>
</data>
<data name="toolStripMenuItem1.Size" type="System.Drawing.Size, System.Drawing">
<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">
<value>116, 371</value>
</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">
<value>True</value>
</metadata>
@@ -525,7 +708,7 @@
<value>6, 13</value>
</data>
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>499, 393</value>
<value>505, 465</value>
</data>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
@@ -559,7 +742,7 @@
<value>CenterScreen</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>CUERipper 1.9.5a</value>
<value>CUERipper 2.0.2</value>
</data>
<data name="&gt;&gt;toolStripStatusLabel1.Name" xml:space="preserve">
<value>toolStripStatusLabel1</value>