CUETools.Flake: better use of new window functions

This commit is contained in:
Grigory Chudov
2014-12-08 22:18:34 -05:00
parent c671f200df
commit 6201101ccf
14 changed files with 679 additions and 707 deletions

View File

@@ -81,11 +81,23 @@ namespace CUETools.Codecs
if (attribute is DefaultValueForModeAttribute)
{
var defaultValueForMode = attribute as DefaultValueForModeAttribute;
res &= (int)property.GetValue(this) == defaultValueForMode.m_values[index];
res &= property.GetValue(this).Equals(defaultValueForMode.m_values[index]);
}
return res;
}
public int GuessEncoderMode()
{
string defaultMode;
string[] modes = this.GetSupportedModes(out defaultMode).Split(' ');
if (modes == null || modes.Length < 1)
return -1;
for (int i = 0; i < modes.Length; i++)
if (HasDefaultValuesForMode(i))
return i;
return -1;
}
[Browsable(false)]
[XmlIgnore]
public AudioPCMConfig PCM