Code cleanup; Reader classes renamed to Decoders, Writers to Encoders, every Decoder must have a corresponding Settings class now just like Encoders. UserDefinedEncoders renamed to CommandLineEncoders, etc.

This commit is contained in:
Grigory Chudov
2018-03-24 12:15:49 -04:00
parent ca8bb2fff6
commit e1f8906170
65 changed files with 1713 additions and 1798 deletions

View File

@@ -25,12 +25,12 @@ namespace CUETools.Processor
throw new Exception("Unsupported audio type: " + path);
if (fmt.decoder == null)
throw new Exception("Unsupported audio type: " + path);
var settings = fmt.decoder.decoderSettings.Clone();
var settings = fmt.decoder.Settings.Clone();
try
{
object src = Activator.CreateInstance(fmt.decoder.decoderSettings.DecoderType, settings, path, IO);
object src = Activator.CreateInstance(fmt.decoder.Settings.DecoderType, settings, path, IO);
if (src == null || !(src is IAudioSource))
throw new Exception("Unsupported audio type: " + path + ": " + fmt.decoder.decoderSettings.DecoderType.FullName);
throw new Exception("Unsupported audio type: " + path + ": " + fmt.decoder.Settings.DecoderType.FullName);
return src as IAudioSource;
}
catch (System.Reflection.TargetInvocationException ex)
@@ -60,7 +60,7 @@ namespace CUETools.Processor
null;
if (encoder == null)
throw new Exception("Unsupported audio type: " + path);
var settings = encoder.settings.Clone();
var settings = encoder.Settings.Clone();
settings.PCM = pcm;
settings.Padding = padding;
object o;