2011-10-25 04:47:05 +00:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
|
|
|
|
namespace CUETools.Codecs.LAME
|
|
|
|
|
|
{
|
2013-04-02 19:56:58 -04:00
|
|
|
|
public class LameWriterCBRSettings : LameWriterSettings
|
2011-10-25 04:47:05 +00:00
|
|
|
|
{
|
2013-04-01 23:03:22 -04:00
|
|
|
|
public static readonly int[] bps_table = new int[] { 96, 128, 192, 256, 320 };
|
|
|
|
|
|
|
2011-10-25 04:47:05 +00:00
|
|
|
|
[DefaultValue(LameQuality.High)]
|
|
|
|
|
|
public LameQuality Quality { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public LameWriterCBRSettings()
|
2013-04-01 23:03:22 -04:00
|
|
|
|
: base("96 128 192 256 320", "256")
|
2011-10-25 04:47:05 +00:00
|
|
|
|
{
|
|
|
|
|
|
}
|
2013-04-02 19:56:58 -04:00
|
|
|
|
|
|
|
|
|
|
public override void Apply(IntPtr lame)
|
|
|
|
|
|
{
|
|
|
|
|
|
LameWriter.lame_set_VBR(lame, (int)LameVbrMode.Off);
|
|
|
|
|
|
LameWriter.lame_set_brate(lame, LameWriterCBRSettings.bps_table[this.EncoderModeIndex]);
|
|
|
|
|
|
LameWriter.lame_set_quality(lame, (int)this.Quality);
|
|
|
|
|
|
}
|
2011-10-25 04:47:05 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|