From cef4ea93f65c2aa973b0d91e98afa688d9eedb22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20St=C3=B6ggl?= Date: Mon, 22 Feb 2021 19:21:52 +0100 Subject: [PATCH] [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 --- CUETools.Codecs.FLACCL/FLACCLWriter.cs | 7 +------ CUETools.FLACCL.cmd/Program.cs | 5 ++--- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/CUETools.Codecs.FLACCL/FLACCLWriter.cs b/CUETools.Codecs.FLACCL/FLACCLWriter.cs index 7ebeeca..8bc4d15 100644 --- a/CUETools.Codecs.FLACCL/FLACCLWriter.cs +++ b/CUETools.Codecs.FLACCL/FLACCLWriter.cs @@ -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 diff --git a/CUETools.FLACCL.cmd/Program.cs b/CUETools.FLACCL.cmd/Program.cs index 26315ae..8b0dbf1 100644 --- a/CUETools.FLACCL.cmd/Program.cs +++ b/CUETools.FLACCL.cmd/Program.cs @@ -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)