More refactoring: UserDefinedWriter is now a more typical IAudioDest, that has it's own UserDefinedEncoderSettings

This commit is contained in:
Grigory Chudov
2013-04-09 20:51:13 -04:00
parent e3d0c595c0
commit 218dad5c45
9 changed files with 127 additions and 131 deletions

View File

@@ -5,15 +5,20 @@ namespace CUETools.Processor
{
public class CUEToolsUDCList : BindingList<CUEToolsUDC>
{
public CUEToolsUDCList()
bool m_encoder;
public CUEToolsUDCList(bool encoder)
: base()
{
AddingNew += OnAddingNew;
m_encoder = encoder;
}
private void OnAddingNew(object sender, AddingNewEventArgs e)
{
e.NewObject = new CUEToolsUDC("new", "wav", true, "", "", "", "");
e.NewObject = m_encoder ?
new CUEToolsUDC("new", "wav", true, "", "", "", "") :
new CUEToolsUDC("new", "wav", "", "");
}
public bool TryGetValue(string extension, bool lossless, string name, out CUEToolsUDC result)