mirror of
https://github.com/claunia/cuetools.net.git
synced 2025-12-16 18:14:25 +00:00
Refactoring codecs infrastructure:
AudioWriterSettings passed to IAdioDest constructors now AudioWriterSettings now includes AudioPCMConfig
This commit is contained in:
@@ -7,7 +7,7 @@ namespace CUETools.Codecs.LAME
|
||||
//[AudioEncoderClass("lame CBR", "mp3", false, 2, typeof(LAMEEncoderCBRSettings))]
|
||||
public class LAMEEncoderCBR : LAMEEncoder
|
||||
{
|
||||
private LAMEEncoderCBRSettings m_settings = new LAMEEncoderCBRSettings();
|
||||
private LAMEEncoderCBRSettings m_settings;
|
||||
|
||||
public override AudioEncoderSettings Settings
|
||||
{
|
||||
@@ -15,25 +15,21 @@ namespace CUETools.Codecs.LAME
|
||||
{
|
||||
return m_settings;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_settings = value.Clone<LAMEEncoderCBRSettings>();
|
||||
}
|
||||
}
|
||||
|
||||
public LAMEEncoderCBR(string path, Stream IO, AudioPCMConfig pcm)
|
||||
: base(path, IO, pcm)
|
||||
public LAMEEncoderCBR(string path, Stream IO, AudioEncoderSettings settings)
|
||||
: base(path, IO, settings)
|
||||
{
|
||||
}
|
||||
|
||||
public LAMEEncoderCBR(string path, AudioPCMConfig pcm)
|
||||
: base(path, null, pcm)
|
||||
public LAMEEncoderCBR(string path, AudioEncoderSettings settings)
|
||||
: base(path, null, settings)
|
||||
{
|
||||
}
|
||||
|
||||
protected override BE_CONFIG MakeConfig()
|
||||
{
|
||||
BE_CONFIG Mp3Config = new BE_CONFIG(PCM, m_settings.CustomBitrate > 0 ? (uint)m_settings.CustomBitrate : LAMEEncoderCBRSettings.bps_table[m_settings.EncoderModeIndex], 5);
|
||||
BE_CONFIG Mp3Config = new BE_CONFIG(Settings.PCM, m_settings.CustomBitrate > 0 ? (uint)m_settings.CustomBitrate : LAMEEncoderCBRSettings.bps_table[m_settings.EncoderModeIndex], 5);
|
||||
Mp3Config.format.lhv1.bWriteVBRHeader = 1;
|
||||
Mp3Config.format.lhv1.nMode = m_settings.StereoMode;
|
||||
//Mp3Config.format.lhv1.nVbrMethod = VBRMETHOD.VBR_METHOD_NONE; // --cbr
|
||||
|
||||
Reference in New Issue
Block a user