mirror of
https://github.com/claunia/cuetools.net.git
synced 2025-12-16 18:14:25 +00:00
Removed AudioEncoderSettings/AudioDecoderSettings classes, all of their functionality is now in IAudioEncoderSettings/IAudioDecoderSettings interfaces.
This commit is contained in:
@@ -14,7 +14,7 @@ namespace CUETools.Codecs.WAV
|
||||
string _path;
|
||||
|
||||
private DecoderSettings m_settings;
|
||||
public AudioDecoderSettings Settings => m_settings;
|
||||
public IAudioDecoderSettings Settings => m_settings;
|
||||
|
||||
public long Position
|
||||
{
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace CUETools.Codecs.WAV
|
||||
}
|
||||
|
||||
private EncoderSettings m_settings;
|
||||
public AudioEncoderSettings Settings => m_settings;
|
||||
public IAudioEncoderSettings Settings => m_settings;
|
||||
|
||||
public string Path { get { return _path; } }
|
||||
|
||||
|
||||
@@ -1,19 +1,36 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace CUETools.Codecs.WAV
|
||||
{
|
||||
public class DecoderSettings : AudioDecoderSettings
|
||||
[JsonObject(MemberSerialization.OptIn)]
|
||||
public class DecoderSettings : IAudioDecoderSettings
|
||||
{
|
||||
public override string Name => "cuetools";
|
||||
#region IAudioDecoderSettings implementation
|
||||
[Browsable(false)]
|
||||
public string Extension => "wav";
|
||||
|
||||
public override string Extension => "wav";
|
||||
[Browsable(false)]
|
||||
public string Name => "cuetools";
|
||||
|
||||
public override Type DecoderType => typeof(AudioDecoder);
|
||||
[Browsable(false)]
|
||||
public Type DecoderType => typeof(AudioDecoder);
|
||||
|
||||
public override int Priority => 2;
|
||||
[Browsable(false)]
|
||||
public int Priority => 2;
|
||||
|
||||
public DecoderSettings() : base() { }
|
||||
public IAudioDecoderSettings Clone()
|
||||
{
|
||||
return MemberwiseClone() as IAudioDecoderSettings;
|
||||
}
|
||||
#endregion
|
||||
|
||||
public bool IgnoreChunkSizes;
|
||||
public DecoderSettings()
|
||||
{
|
||||
this.Init();
|
||||
}
|
||||
|
||||
public bool IgnoreChunkSizes { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,29 +1,64 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Text;
|
||||
|
||||
namespace CUETools.Codecs.WAV
|
||||
{
|
||||
public class EncoderSettings : AudioEncoderSettings
|
||||
[JsonObject(MemberSerialization.OptIn)]
|
||||
public class EncoderSettings : IAudioEncoderSettings
|
||||
{
|
||||
public override string Extension => "wav";
|
||||
#region IAudioEncoderSettings implementation
|
||||
[Browsable(false)]
|
||||
public string Extension => "wav";
|
||||
|
||||
public override string Name => "cuetools";
|
||||
[Browsable(false)]
|
||||
public string Name => "cuetools";
|
||||
|
||||
public override Type EncoderType => typeof(WAV.AudioEncoder);
|
||||
[Browsable(false)]
|
||||
public Type EncoderType => typeof(WAV.AudioEncoder);
|
||||
|
||||
public override int Priority => 10;
|
||||
[Browsable(false)]
|
||||
public bool Lossless => true;
|
||||
|
||||
public override bool Lossless => true;
|
||||
[Browsable(false)]
|
||||
public int Priority => 10;
|
||||
|
||||
[Browsable(false)]
|
||||
public string SupportedModes => "";
|
||||
|
||||
[Browsable(false)]
|
||||
public string DefaultMode => "";
|
||||
|
||||
[Browsable(false)]
|
||||
[DefaultValue("")]
|
||||
public string EncoderMode { get; set; }
|
||||
|
||||
[Browsable(false)]
|
||||
public AudioPCMConfig PCM { get; set; }
|
||||
|
||||
[Browsable(false)]
|
||||
public int BlockSize { get; set; }
|
||||
|
||||
[Browsable(false)]
|
||||
[DefaultValue(4096)]
|
||||
public int Padding { get; set; }
|
||||
|
||||
public IAudioEncoderSettings Clone()
|
||||
{
|
||||
return MemberwiseClone() as IAudioEncoderSettings;
|
||||
}
|
||||
#endregion
|
||||
|
||||
public EncoderSettings()
|
||||
: this(null)
|
||||
{
|
||||
this.Init();
|
||||
}
|
||||
|
||||
public EncoderSettings(AudioPCMConfig pcm)
|
||||
: base(pcm)
|
||||
{
|
||||
this.Init(pcm);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user