Adjustments for use of LameWriter in CUETools

This commit is contained in:
chudov
2011-10-25 04:47:05 +00:00
parent da7ee90588
commit a4d33544fe
9 changed files with 192 additions and 46 deletions

View File

@@ -3,7 +3,7 @@ using System.IO;
namespace CUETools.Codecs.LAME
{
[AudioEncoderClass("lame2 VBR", "mp3", false, "V9 V8 V7 V6 V5 V4 V3 V2 V1 V0", "V2", 2, typeof(LAMEEncoderVBRSettings))]
[AudioEncoderClass("lame2 VBR", "mp3", false, "V9 V8 V7 V6 V5 V4 V3 V2 V1 V0", "V2", 2, typeof(LameWriterVBRSettings))]
public class LameWriterVBR : LameWriter
{
private int quality = 0;
@@ -32,7 +32,7 @@ namespace CUETools.Codecs.LAME
}
}
LAMEEncoderVBRSettings _settings = new LAMEEncoderVBRSettings();
LameWriterVBRSettings _settings = new LameWriterVBRSettings();
public override object Settings
{
@@ -42,9 +42,17 @@ namespace CUETools.Codecs.LAME
}
set
{
if (value as LAMEEncoderVBRSettings == null)
if (value as LameWriterVBRSettings == null)
throw new Exception("Unsupported options " + value);
_settings = value as LAMEEncoderVBRSettings;
_settings = value as LameWriterVBRSettings;
}
}
protected override LameWriterConfig Config
{
get
{
return LameWriterConfig.CreateVbr(this.quality, this._settings.Quality);
}
}
}