Reset encoding mode to default for codecs with dynamic modes list,

when settings become incompatible with the chosen mode.
E.g. for flac if -11 was selected and nonsubset modes are disabled,
-7 is chosen instead.
This commit is contained in:
Grigory Chudov
2013-04-08 23:11:03 -04:00
parent d1e70fc7f3
commit e3d0c595c0
12 changed files with 86 additions and 36 deletions

View File

@@ -43,7 +43,7 @@ namespace CUETools.Processor
type = null;
}
public CUEToolsUDC(AudioEncoderClass enc, Type enctype)
public CUEToolsUDC(AudioEncoderClassAttribute enc, Type enctype)
{
name = enc.EncoderName;
extension = enc.Extension;
@@ -118,7 +118,8 @@ namespace CUETools.Processor
{
get
{
return this.settings == null ? this.supported_modes : this.settings.GetSupportedModes();
string defaultMode;
return this.settings == null ? this.supported_modes : this.settings.GetSupportedModes(out defaultMode);
}
set
{
@@ -149,7 +150,7 @@ namespace CUETools.Processor
}
}
public int DefaultModeIndex
public int EncoderModeIndex
{
get
{