Simplify codec settings. Check for non-Subset FLAC modes.

This commit is contained in:
Grigory Chudov
2013-06-18 20:45:53 -04:00
parent 21a1628018
commit bcb42dd531
10 changed files with 413 additions and 546 deletions

View File

@@ -67,8 +67,15 @@ namespace CUETools.Processor
var settings = encoder.settings.Clone();
settings.PCM = pcm;
settings.Padding = padding;
settings.Validate();
object o = Activator.CreateInstance(encoder.type, path, settings);
object o;
try
{
o = Activator.CreateInstance(encoder.type, path, settings);
}
catch (System.Reflection.TargetInvocationException ex)
{
throw ex.InnerException;
}
if (o == null || !(o is IAudioDest))
throw new Exception("Unsupported audio type: " + path + ": " + encoder.type.FullName);
dest = o as IAudioDest;