Files
cuetools.net/CUETools.Codecs.LAME/LameWriterVBR.cs

44 lines
1.2 KiB
C#
Raw Normal View History

2011-10-23 23:05:45 +00:00
using System;
using System.IO;
namespace CUETools.Codecs.LAME
{
[AudioEncoderClass("VBR (libmp3lame)", "mp3", false, 2, typeof(LameWriterVBRSettings))]
2011-10-23 23:05:45 +00:00
public class LameWriterVBR : LameWriter
{
public LameWriterVBR(string path, Stream IO, AudioPCMConfig pcm)
: base(IO, pcm)
{
}
public LameWriterVBR(string path, AudioPCMConfig pcm)
: base(path, pcm)
{
}
LameWriterVBRSettings _settings = new LameWriterVBRSettings();
2011-10-23 23:05:45 +00:00
public override AudioEncoderSettings Settings
2011-10-23 23:05:45 +00:00
{
get
{
return _settings;
}
set
{
if (value as LameWriterVBRSettings == null)
2011-10-23 23:05:45 +00:00
throw new Exception("Unsupported options " + value);
_settings = value as LameWriterVBRSettings;
}
}
protected override LameWriterConfig Config
{
get
{
return LameWriterConfig.CreateVbr(9 - this._settings.EncoderModeIndex, this._settings.Quality);
2011-10-23 23:05:45 +00:00
}
}
}
}