Skip to content

Commit cef4ea9

Browse files
committed
[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
1 parent b108b7f commit cef4ea9

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

CUETools.Codecs.FLACCL/FLACCLWriter.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ public class AudioEncoder : IAudioDest
372372

373373
public const int MAX_BLOCKSIZE = 65536;
374374

375-
public AudioEncoder(string path, Stream IO, EncoderSettings settings)
375+
public AudioEncoder(EncoderSettings settings, string path, Stream IO)
376376
{
377377
m_settings = settings.Clone() as EncoderSettings;
378378
m_settings.Validate();
@@ -396,11 +396,6 @@ public AudioEncoder(string path, Stream IO, EncoderSettings settings)
396396
crc8 = new Crc8();
397397
}
398398

399-
public AudioEncoder(string path, EncoderSettings settings)
400-
: this(path, null, settings)
401-
{
402-
}
403-
404399
public int TotalSize
405400
{
406401
get

CUETools.FLACCL.cmd/Program.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,10 +276,9 @@ static int Main(string[] args)
276276
{
277277
if (device_type != null)
278278
settings.DeviceType = (OpenCLDeviceType)(Enum.Parse(typeof(OpenCLDeviceType), device_type, true));
279-
encoder = new Codecs.FLACCL.AudioEncoder((output_file == "-" || output_file == "nul") ? "" : output_file,
279+
encoder = new Codecs.FLACCL.AudioEncoder(settings, (output_file == "-" || output_file == "nul") ? "" : output_file,
280280
output_file == "-" ? Console.OpenStandardOutput() :
281-
output_file == "nul" ? new NullStream() : null,
282-
settings);
281+
output_file == "nul" ? new NullStream() : null);
283282
settings = encoder.Settings as Codecs.FLACCL.EncoderSettings;
284283
encoder.FinalSampleCount = audioSource.Length;
285284
if (stereo_method != null)

0 commit comments

Comments
 (0)