mirror of
https://github.com/claunia/cuetools.net.git
synced 2025-12-16 18:14:25 +00:00
Simplify code for encoder settings
This commit is contained in:
@@ -67,6 +67,18 @@ namespace CUETools.Codecs
|
||||
return hasBrowsable;
|
||||
}
|
||||
|
||||
protected void SetDefaultValuesForMode()
|
||||
{
|
||||
foreach (PropertyDescriptor property in TypeDescriptor.GetProperties(this))
|
||||
if (!property.CanResetValue(this))
|
||||
foreach (var attribute in property.Attributes)
|
||||
if (attribute is DefaultValueForModeAttribute)
|
||||
{
|
||||
var defaultValueForMode = attribute as DefaultValueForModeAttribute;
|
||||
property.SetValue(this, defaultValueForMode.m_values[EncoderModeIndex]);
|
||||
}
|
||||
}
|
||||
|
||||
[Browsable(false)]
|
||||
[XmlIgnore]
|
||||
public AudioPCMConfig PCM
|
||||
|
||||
Reference in New Issue
Block a user