mirror of
https://github.com/claunia/cuetools.net.git
synced 2025-12-16 18:14:25 +00:00
Cleanup IAudioDest; CompressionLevel is now part of AudioEncoderSettings.
FLAC encoders no longer offer non-subset compression levels by default.
This commit is contained in:
@@ -4,27 +4,12 @@ using CUETools.Codecs.LAME.Interop;
|
||||
|
||||
namespace CUETools.Codecs.LAME
|
||||
{
|
||||
//[AudioEncoderClass("lame VBR", "mp3", false, "V9 V8 V7 V6 V5 V4 V3 V2 V1 V0", "V2", 2, typeof(LAMEEncoderVBRSettings))]
|
||||
//[AudioEncoderClass("lame VBR", "mp3", false, 2, typeof(LAMEEncoderVBRSettings))]
|
||||
public class LAMEEncoderVBR : LAMEEncoder
|
||||
{
|
||||
private int quality = 0;
|
||||
private LAMEEncoderVBRSettings _settings = new LAMEEncoderVBRSettings();
|
||||
|
||||
public override int CompressionLevel
|
||||
{
|
||||
get
|
||||
{
|
||||
return 9 - quality;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value < 0 || value > 9)
|
||||
throw new Exception("unsupported compression level");
|
||||
quality = 9 - value;
|
||||
}
|
||||
}
|
||||
|
||||
public override object Settings
|
||||
public override AudioEncoderSettings Settings
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -54,7 +39,7 @@ namespace CUETools.Codecs.LAME
|
||||
Mp3Config.format.lhv1.bWriteVBRHeader = 1;
|
||||
Mp3Config.format.lhv1.nMode = MpegMode.JOINT_STEREO;
|
||||
Mp3Config.format.lhv1.bEnableVBR = 1;
|
||||
Mp3Config.format.lhv1.nVBRQuality = quality;
|
||||
Mp3Config.format.lhv1.nVBRQuality = 9 - _settings.EncoderModeIndex;
|
||||
Mp3Config.format.lhv1.nVbrMethod = VBRMETHOD.VBR_METHOD_NEW; // --vbr-new
|
||||
return Mp3Config;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user