2018-03-25 17:24:27 -04:00
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
|
using System;
|
2018-03-24 12:15:49 -04:00
|
|
|
|
using System.Collections.Generic;
|
2018-03-25 17:24:27 -04:00
|
|
|
|
using System.ComponentModel;
|
2018-03-24 12:15:49 -04:00
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
|
|
|
|
namespace CUETools.Codecs.libmp3lame
|
|
|
|
|
|
{
|
2018-03-25 17:24:27 -04:00
|
|
|
|
public abstract class LameEncoderSettings : IAudioEncoderSettings
|
2018-03-24 12:15:49 -04:00
|
|
|
|
{
|
2018-03-25 17:24:27 -04:00
|
|
|
|
#region IAudioEncoderSettings implementation
|
|
|
|
|
|
[Browsable(false)]
|
|
|
|
|
|
public string Extension => "mp3";
|
2018-03-24 12:15:49 -04:00
|
|
|
|
|
2018-03-25 17:24:27 -04:00
|
|
|
|
[Browsable(false)]
|
|
|
|
|
|
public abstract string Name { get; }
|
|
|
|
|
|
|
|
|
|
|
|
[Browsable(false)]
|
|
|
|
|
|
public Type EncoderType => typeof(AudioEncoder);
|
|
|
|
|
|
|
|
|
|
|
|
[Browsable(false)]
|
|
|
|
|
|
public bool Lossless => false;
|
|
|
|
|
|
|
|
|
|
|
|
[Browsable(false)]
|
|
|
|
|
|
public abstract int Priority { get; }
|
|
|
|
|
|
|
|
|
|
|
|
[Browsable(false)]
|
|
|
|
|
|
public abstract string SupportedModes { get; }
|
|
|
|
|
|
|
|
|
|
|
|
[Browsable(false)]
|
|
|
|
|
|
public abstract string DefaultMode { get; }
|
|
|
|
|
|
|
|
|
|
|
|
[Browsable(false)]
|
|
|
|
|
|
[DefaultValue("")]
|
|
|
|
|
|
[JsonProperty]
|
|
|
|
|
|
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()
|
2018-03-24 12:15:49 -04:00
|
|
|
|
{
|
2018-03-25 17:24:27 -04:00
|
|
|
|
return MemberwiseClone() as IAudioEncoderSettings;
|
2018-03-24 12:15:49 -04:00
|
|
|
|
}
|
2018-03-25 17:24:27 -04:00
|
|
|
|
#endregion
|
2018-03-24 12:15:49 -04:00
|
|
|
|
|
2018-03-25 17:24:27 -04:00
|
|
|
|
public LameEncoderSettings()
|
2018-03-24 12:15:49 -04:00
|
|
|
|
{
|
2018-03-25 17:24:27 -04:00
|
|
|
|
this.Init();
|
2018-03-24 12:15:49 -04:00
|
|
|
|
}
|
2018-03-25 17:24:27 -04:00
|
|
|
|
|
|
|
|
|
|
public abstract void Apply(IntPtr lame);
|
2018-03-24 12:15:49 -04:00
|
|
|
|
}
|
|
|
|
|
|
}
|