mirror of
https://github.com/claunia/cuetools.net.git
synced 2025-12-16 18:14:25 +00:00
Simplify codec settings. Check for non-Subset FLAC modes.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user