mirror of
https://github.com/claunia/cuetools.net.git
synced 2025-12-16 18:14:25 +00:00
Remove lossyWav support
This commit is contained in:
@@ -961,7 +961,7 @@ namespace CUERipper
|
|||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
foreach (FormatInfo fmt in data.Formats)
|
foreach (CUEToolsFormat fmt in data.Formats)
|
||||||
if (fmt.ToString() == value)
|
if (fmt.ToString() == value)
|
||||||
bnComboBoxFormat.SelectedItem = fmt;
|
bnComboBoxFormat.SelectedItem = fmt;
|
||||||
}
|
}
|
||||||
@@ -971,9 +971,7 @@ namespace CUERipper
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (selectedFormat == null)
|
return selectedFormat;
|
||||||
return null;
|
|
||||||
return selectedFormat.fmt;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1002,9 +1000,7 @@ namespace CUERipper
|
|||||||
CUEToolsUDC encoder = bnComboBoxEncoder.SelectedItem as CUEToolsUDC;
|
CUEToolsUDC encoder = bnComboBoxEncoder.SelectedItem as CUEToolsUDC;
|
||||||
if (encoder == null)
|
if (encoder == null)
|
||||||
return;
|
return;
|
||||||
if (SelectedOutputAudioFormat.StartsWith("lossy."))
|
if (SelectedOutputAudioType == AudioEncoderType.Lossless)
|
||||||
SelectedOutputAudioFmt.encoderLossless = encoder;
|
|
||||||
else if (SelectedOutputAudioType == AudioEncoderType.Lossless)
|
|
||||||
SelectedOutputAudioFmt.encoderLossless = encoder;
|
SelectedOutputAudioFmt.encoderLossless = encoder;
|
||||||
else
|
else
|
||||||
SelectedOutputAudioFmt.encoderLossy = encoder;
|
SelectedOutputAudioFmt.encoderLossy = encoder;
|
||||||
@@ -1088,11 +1084,11 @@ namespace CUERipper
|
|||||||
UpdateDrive();
|
UpdateDrive();
|
||||||
}
|
}
|
||||||
|
|
||||||
private FormatInfo selectedFormat;
|
private CUEToolsFormat selectedFormat;
|
||||||
|
|
||||||
private void bnComboBoxFormat_SelectedValueChanged(object sender, EventArgs e)
|
private void bnComboBoxFormat_SelectedValueChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
selectedFormat = bnComboBoxFormat.SelectedItem as FormatInfo;
|
selectedFormat = bnComboBoxFormat.SelectedItem as CUEToolsFormat;
|
||||||
|
|
||||||
data.Encoders.Clear();
|
data.Encoders.Clear();
|
||||||
if (SelectedOutputAudioFmt == null)
|
if (SelectedOutputAudioFmt == null)
|
||||||
@@ -1118,13 +1114,12 @@ namespace CUERipper
|
|||||||
{
|
{
|
||||||
if (SelectedOutputAudioType == AudioEncoderType.Lossless && !encoder.lossless)
|
if (SelectedOutputAudioType == AudioEncoderType.Lossless && !encoder.lossless)
|
||||||
continue;
|
continue;
|
||||||
if (SelectedOutputAudioType == AudioEncoderType.Lossy && (encoder.lossless && !selectedFormat.lossyWAV))
|
if (SelectedOutputAudioType == AudioEncoderType.Lossy && encoder.lossless)
|
||||||
continue;
|
continue;
|
||||||
data.Encoders.Add(encoder);
|
data.Encoders.Add(encoder);
|
||||||
}
|
}
|
||||||
|
|
||||||
CUEToolsUDC select = SelectedOutputAudioFormat.StartsWith("lossy.") ? SelectedOutputAudioFmt.encoderLossless
|
CUEToolsUDC select = SelectedOutputAudioType == AudioEncoderType.Lossless ? SelectedOutputAudioFmt.encoderLossless
|
||||||
: SelectedOutputAudioType == AudioEncoderType.Lossless ? SelectedOutputAudioFmt.encoderLossless
|
|
||||||
: SelectedOutputAudioFmt.encoderLossy;
|
: SelectedOutputAudioFmt.encoderLossy;
|
||||||
data.Encoders.RaiseListChangedEvents = true;
|
data.Encoders.RaiseListChangedEvents = true;
|
||||||
data.Encoders.ResetBindings();
|
data.Encoders.ResetBindings();
|
||||||
@@ -1151,17 +1146,7 @@ namespace CUERipper
|
|||||||
continue;
|
continue;
|
||||||
if (SelectedOutputAudioType == AudioEncoderType.Lossy && !format.Value.allowLossy)
|
if (SelectedOutputAudioType == AudioEncoderType.Lossy && !format.Value.allowLossy)
|
||||||
continue;
|
continue;
|
||||||
data.Formats.Add(new FormatInfo(format.Value, false));
|
data.Formats.Add(format.Value);
|
||||||
}
|
|
||||||
foreach (KeyValuePair<string, CUEToolsFormat> format in _config.formats)
|
|
||||||
{
|
|
||||||
if (!format.Value.allowLossyWAV)
|
|
||||||
continue;
|
|
||||||
if (SelectedOutputAudioType == AudioEncoderType.Lossless)
|
|
||||||
continue;
|
|
||||||
if (SelectedOutputAudioType == AudioEncoderType.NoAudio)
|
|
||||||
continue;
|
|
||||||
data.Formats.Add(new FormatInfo(format.Value, true));
|
|
||||||
}
|
}
|
||||||
string select = null;
|
string select = null;
|
||||||
switch (SelectedOutputAudioType)
|
switch (SelectedOutputAudioType)
|
||||||
@@ -1653,31 +1638,6 @@ namespace CUERipper
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class FormatInfo
|
|
||||||
{
|
|
||||||
public CUEToolsFormat fmt;
|
|
||||||
public bool lossyWAV;
|
|
||||||
|
|
||||||
public FormatInfo(CUEToolsFormat fmt, bool lossyWAV)
|
|
||||||
{
|
|
||||||
this.fmt = fmt;
|
|
||||||
this.lossyWAV = lossyWAV;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override string ToString()
|
|
||||||
{
|
|
||||||
return lossyWAV ? "lossy." + fmt.extension : fmt.extension;
|
|
||||||
}
|
|
||||||
|
|
||||||
public string DotExtension
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return fmt.DotExtension;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class DriveInfo
|
public class DriveInfo
|
||||||
{
|
{
|
||||||
public ICDRipper drive;
|
public ICDRipper drive;
|
||||||
@@ -1726,7 +1686,7 @@ namespace CUERipper
|
|||||||
};
|
};
|
||||||
private BindingList<CUEMetadataEntry> releases = new BindingList<CUEMetadataEntry>();
|
private BindingList<CUEMetadataEntry> releases = new BindingList<CUEMetadataEntry>();
|
||||||
private BindingList<DriveInfo> drives = new BindingList<DriveInfo>();
|
private BindingList<DriveInfo> drives = new BindingList<DriveInfo>();
|
||||||
private BindingList<FormatInfo> formats = new BindingList<FormatInfo>();
|
private BindingList<CUEToolsFormat> formats = new BindingList<CUEToolsFormat>();
|
||||||
private BindingList<CUEToolsUDC> encoders = new BindingList<CUEToolsUDC>();
|
private BindingList<CUEToolsUDC> encoders = new BindingList<CUEToolsUDC>();
|
||||||
|
|
||||||
public CUEMetadataEntry selectedRelease { get; set; }
|
public CUEMetadataEntry selectedRelease { get; set; }
|
||||||
@@ -1765,7 +1725,7 @@ namespace CUERipper
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public BindingList<FormatInfo> Formats
|
public BindingList<CUEToolsFormat> Formats
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user