[CUETools.Codecs.FLACCL] Fix constructor

The constructor parameters of Activator.CreateInstance() were updated
in CUETools.Processor\AudioReadWrite.cs as of commits 16fccfe and
e1f8906. The parameter "settings" was added in front of path and IO,
which required an update to the order of constructor parameters in
several codecs.

- Fixes the following error message, when using FLACCL codec:
  Exception: Constructor on type
  'CUETools.Codecs.FLACCL.AudioEncoder' not found.
- This is a follow-up commit to 18c6c1a
- Resolves #82
This commit is contained in:
Wolfgang Stöggl
2021-02-22 19:21:52 +01:00
parent b108b7f90f
commit cef4ea93f6
2 changed files with 3 additions and 9 deletions

View File

@@ -372,7 +372,7 @@ namespace CUETools.Codecs.FLACCL
public const int MAX_BLOCKSIZE = 65536;
public AudioEncoder(string path, Stream IO, EncoderSettings settings)
public AudioEncoder(EncoderSettings settings, string path, Stream IO)
{
m_settings = settings.Clone() as EncoderSettings;
m_settings.Validate();
@@ -396,11 +396,6 @@ namespace CUETools.Codecs.FLACCL
crc8 = new Crc8();
}
public AudioEncoder(string path, EncoderSettings settings)
: this(path, null, settings)
{
}
public int TotalSize
{
get

View File

@@ -276,10 +276,9 @@ namespace CUETools.FLACCL.cmd
{
if (device_type != null)
settings.DeviceType = (OpenCLDeviceType)(Enum.Parse(typeof(OpenCLDeviceType), device_type, true));
encoder = new Codecs.FLACCL.AudioEncoder((output_file == "-" || output_file == "nul") ? "" : output_file,
encoder = new Codecs.FLACCL.AudioEncoder(settings, (output_file == "-" || output_file == "nul") ? "" : output_file,
output_file == "-" ? Console.OpenStandardOutput() :
output_file == "nul" ? new NullStream() : null,
settings);
output_file == "nul" ? new NullStream() : null);
settings = encoder.Settings as Codecs.FLACCL.EncoderSettings;
encoder.FinalSampleCount = audioSource.Length;
if (stereo_method != null)