Refactored AAC encoder selection code.
This commit is contained in:
parent
ceec5fa5e2
commit
1f241a1045
File diff suppressed because it is too large
Load Diff
@ -31,7 +31,7 @@
|
||||
<context>
|
||||
<name>MainWindow</name>
|
||||
<message numerus="yes">
|
||||
<location filename="../../src/Dialog_MainWindow.cpp" line="726"/>
|
||||
<location filename="../../src/Dialog_MainWindow.cpp" line="724"/>
|
||||
<source>%n file(s) have been rejected, because read access was not granted!</source>
|
||||
<translation>
|
||||
<numerusform>%n file have been rejected, because read access was not granted!</numerusform>
|
||||
@ -39,7 +39,7 @@
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<location filename="../../src/Dialog_MainWindow.cpp" line="730"/>
|
||||
<location filename="../../src/Dialog_MainWindow.cpp" line="728"/>
|
||||
<source>%n file(s) have been rejected, because they are dummy CDDA files!</source>
|
||||
<translation>
|
||||
<numerusform>%n file have been rejected, because they are dummy CDDA files!</numerusform>
|
||||
@ -47,7 +47,7 @@
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<location filename="../../src/Dialog_MainWindow.cpp" line="734"/>
|
||||
<location filename="../../src/Dialog_MainWindow.cpp" line="732"/>
|
||||
<source>%n file(s) have been rejected, because they appear to be Cue Sheet images!</source>
|
||||
<translation>
|
||||
<numerusform>%n file have been rejected, because they appear to be Cue Sheet images!</numerusform>
|
||||
@ -55,7 +55,7 @@
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<location filename="../../src/Dialog_MainWindow.cpp" line="738"/>
|
||||
<location filename="../../src/Dialog_MainWindow.cpp" line="736"/>
|
||||
<source>%n file(s) have been rejected, because the file format could not be recognized!</source>
|
||||
<translation>
|
||||
<numerusform>%n file have been rejected, because the file format could not be recognized!</numerusform>
|
||||
@ -63,7 +63,7 @@
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<location filename="../../src/Dialog_MainWindow.cpp" line="4244"/>
|
||||
<location filename="../../src/Dialog_MainWindow.cpp" line="4254"/>
|
||||
<source>%n Instance(s)</source>
|
||||
<translation>
|
||||
<numerusform>%n Instance</numerusform>
|
||||
@ -74,7 +74,7 @@
|
||||
<context>
|
||||
<name>ProcessingDialog</name>
|
||||
<message numerus="yes">
|
||||
<location filename="../../src/Dialog_Processing.cpp" line="572"/>
|
||||
<location filename="../../src/Dialog_Processing.cpp" line="573"/>
|
||||
<source>Encoding: %n file(s) of %1 completed so far, please wait...</source>
|
||||
<translation>
|
||||
<numerusform>Encoding: %n file of %1 completed so far, please wait...</numerusform>
|
||||
@ -82,7 +82,7 @@
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<location filename="../../src/Dialog_Processing.cpp" line="610"/>
|
||||
<location filename="../../src/Dialog_Processing.cpp" line="611"/>
|
||||
<source>Process was aborted by the user after %n file(s)!</source>
|
||||
<translation>
|
||||
<numerusform>Process was aborted by the user after %n file!</numerusform>
|
||||
@ -90,7 +90,7 @@
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<location filename="../../src/Dialog_Processing.cpp" line="638"/>
|
||||
<location filename="../../src/Dialog_Processing.cpp" line="639"/>
|
||||
<source>Error: %1 of %n file(s) failed (%2). Double-click failed items for detailed information!</source>
|
||||
<translation>
|
||||
<numerusform>Error: %1 of %n file failed (%2). Double-click failed items for detailed information!</numerusform>
|
||||
@ -98,7 +98,7 @@
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<location filename="../../src/Dialog_Processing.cpp" line="638"/>
|
||||
<location filename="../../src/Dialog_Processing.cpp" line="639"/>
|
||||
<source>%n file(s) skipped</source>
|
||||
<translation>
|
||||
<numerusform>%n file skipped</numerusform>
|
||||
@ -106,7 +106,7 @@
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<location filename="../../src/Dialog_Processing.cpp" line="642"/>
|
||||
<location filename="../../src/Dialog_Processing.cpp" line="643"/>
|
||||
<source>Error: %1 of %n file(s) failed. Double-click failed items for detailed information!</source>
|
||||
<translation>
|
||||
<numerusform>Error: %1 of %n file failed. Double-click failed items for detailed information!</numerusform>
|
||||
@ -114,7 +114,7 @@
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<location filename="../../src/Dialog_Processing.cpp" line="656"/>
|
||||
<location filename="../../src/Dialog_Processing.cpp" line="657"/>
|
||||
<source>All files completed successfully. Skipped %n file(s).</source>
|
||||
<translation>
|
||||
<numerusform>All files completed successfully. Skipped %n file.</numerusform>
|
||||
@ -122,7 +122,7 @@
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<location filename="../../src/Dialog_Processing.cpp" line="1310"/>
|
||||
<location filename="../../src/Dialog_Processing.cpp" line="1320"/>
|
||||
<source>%n hour(s)</source>
|
||||
<translation>
|
||||
<numerusform>%n hour</numerusform>
|
||||
@ -130,8 +130,8 @@
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<location filename="../../src/Dialog_Processing.cpp" line="1311"/>
|
||||
<location filename="../../src/Dialog_Processing.cpp" line="1315"/>
|
||||
<location filename="../../src/Dialog_Processing.cpp" line="1321"/>
|
||||
<location filename="../../src/Dialog_Processing.cpp" line="1325"/>
|
||||
<source>%n minute(s)</source>
|
||||
<translation>
|
||||
<numerusform>%n minute</numerusform>
|
||||
@ -139,8 +139,8 @@
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<location filename="../../src/Dialog_Processing.cpp" line="1316"/>
|
||||
<location filename="../../src/Dialog_Processing.cpp" line="1320"/>
|
||||
<location filename="../../src/Dialog_Processing.cpp" line="1326"/>
|
||||
<location filename="../../src/Dialog_Processing.cpp" line="1330"/>
|
||||
<source>%n second(s)</source>
|
||||
<translation>
|
||||
<numerusform>%n second</numerusform>
|
||||
@ -148,7 +148,7 @@
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<location filename="../../src/Dialog_Processing.cpp" line="1321"/>
|
||||
<location filename="../../src/Dialog_Processing.cpp" line="1331"/>
|
||||
<source>%n millisecond(s)</source>
|
||||
<translation>
|
||||
<numerusform>%n millisecond</numerusform>
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -34,7 +34,7 @@
|
||||
#define VER_LAMEXP_MINOR_LO 8
|
||||
#define VER_LAMEXP_TYPE Beta
|
||||
#define VER_LAMEXP_PATCH 1
|
||||
#define VER_LAMEXP_BUILD 1320
|
||||
#define VER_LAMEXP_BUILD 1321
|
||||
#define VER_LAMEXP_CONFG 1288
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -178,9 +178,7 @@ MainWindow::MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, S
|
||||
m_metaData(metaInfo),
|
||||
m_settings(settingsModel),
|
||||
m_fileSystemModel(NULL),
|
||||
m_neroEncoderAvailable(lamexp_check_tool("neroAacEnc.exe") && lamexp_check_tool("neroAacDec.exe") && lamexp_check_tool("neroAacTag.exe")),
|
||||
m_fhgEncoderAvailable(lamexp_check_tool("fhgaacenc.exe") && lamexp_check_tool("enc_fhgaac.dll") && lamexp_check_tool("nsutil.dll") && lamexp_check_tool("libmp4v2.dll")),
|
||||
m_qaacEncoderAvailable(lamexp_check_tool("qaac.exe") && lamexp_check_tool("libsoxrate.dll")),
|
||||
m_aacEncoder(SettingsModel::getAacEncoder()),
|
||||
m_accepted(false),
|
||||
m_firstTimeShown(true),
|
||||
m_outputFolderViewCentering(false),
|
||||
@ -356,10 +354,10 @@ MainWindow::MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, S
|
||||
m_modeButtonGroup->addButton(ui->radioButtonModeAverageBitrate, SettingsModel::ABRMode);
|
||||
m_modeButtonGroup->addButton(ui->radioButtonConstBitrate, SettingsModel::CBRMode);
|
||||
|
||||
ui->radioButtonEncoderAAC->setEnabled(m_neroEncoderAvailable || m_fhgEncoderAvailable || m_qaacEncoderAvailable);
|
||||
ui->radioButtonEncoderAAC->setEnabled(m_aacEncoder > SettingsModel::AAC_ENCODER_NONE);
|
||||
ui->radioButtonEncoderMP3->setChecked(m_settings->compressionEncoder() == SettingsModel::MP3Encoder);
|
||||
ui->radioButtonEncoderVorbis->setChecked(m_settings->compressionEncoder() == SettingsModel::VorbisEncoder);
|
||||
ui->radioButtonEncoderAAC->setChecked((m_settings->compressionEncoder() == SettingsModel::AACEncoder) && (m_neroEncoderAvailable || m_fhgEncoderAvailable || m_qaacEncoderAvailable));
|
||||
ui->radioButtonEncoderAAC->setChecked((m_settings->compressionEncoder() == SettingsModel::AACEncoder) && (m_aacEncoder > SettingsModel::AAC_ENCODER_NONE));
|
||||
ui->radioButtonEncoderAC3->setChecked(m_settings->compressionEncoder() == SettingsModel::AC3Encoder);
|
||||
ui->radioButtonEncoderFLAC->setChecked(m_settings->compressionEncoder() == SettingsModel::FLACEncoder);
|
||||
ui->radioButtonEncoderOpus->setChecked(m_settings->compressionEncoder() == SettingsModel::OpusEncoder);
|
||||
@ -410,7 +408,7 @@ MainWindow::MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, S
|
||||
SET_CHECKBOX_STATE(ui->checkBoxRenameOutput, m_settings->renameOutputFilesEnabled());
|
||||
SET_CHECKBOX_STATE(ui->checkBoxForceStereoDownmix, m_settings->forceStereoDownmix());
|
||||
SET_CHECKBOX_STATE(ui->checkBoxOpusDisableResample, m_settings->opusDisableResample());
|
||||
ui->checkBoxNeroAAC2PassMode->setEnabled(!(m_fhgEncoderAvailable || m_qaacEncoderAvailable));
|
||||
ui->checkBoxNeroAAC2PassMode->setEnabled(m_aacEncoder == SettingsModel::AAC_ENCODER_NERO);
|
||||
|
||||
ui->lineEditCustomParamLAME->setText(m_settings->customParametersLAME());
|
||||
ui->lineEditCustomParamOggEnc->setText(m_settings->customParametersOggEnc());
|
||||
@ -1478,7 +1476,7 @@ void MainWindow::windowShown(void)
|
||||
}
|
||||
|
||||
//Check for AAC support
|
||||
if(m_neroEncoderAvailable)
|
||||
if(m_aacEncoder == SettingsModel::AAC_ENCODER_NERO)
|
||||
{
|
||||
if(m_settings->neroAacNotificationsEnabled())
|
||||
{
|
||||
@ -1496,7 +1494,7 @@ void MainWindow::windowShown(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
if(m_settings->neroAacNotificationsEnabled() && (!(m_fhgEncoderAvailable || m_qaacEncoderAvailable)))
|
||||
if(m_settings->neroAacNotificationsEnabled() && (m_aacEncoder <= SettingsModel::AAC_ENCODER_NONE))
|
||||
{
|
||||
QString appPath = QDir(QCoreApplication::applicationDirPath()).canonicalPath();
|
||||
if(appPath.isEmpty()) appPath = QCoreApplication::applicationDirPath();
|
||||
@ -3454,7 +3452,13 @@ void MainWindow::updateEncoder(int id)
|
||||
//Add AAC info
|
||||
if(m_settings->compressionEncoder() == SettingsModel::AACEncoder)
|
||||
{
|
||||
const QString encoderName = m_qaacEncoderAvailable ? tr("QAAC (Apple)") : (m_fhgEncoderAvailable ? tr("FHG AAC (Winamp)") : (m_neroEncoderAvailable ? tr("Nero AAC") : tr("Not available!")));
|
||||
QString encoderName = tr("Not available!");
|
||||
switch(m_aacEncoder)
|
||||
{
|
||||
case SettingsModel::AAC_ENCODER_NERO: encoderName = tr("Nero AAC"); break;
|
||||
case SettingsModel::AAC_ENCODER_FHG : encoderName = tr("FHG AAC (Winamp)"); break;
|
||||
case SettingsModel::AAC_ENCODER_QAAC: encoderName = tr("QAAC (Apple)"); break;
|
||||
}
|
||||
ui->labelEncoderInfo->setVisible(true);
|
||||
ui->labelEncoderInfo->setText(tr("Current AAC Encoder: %1").arg(encoderName));
|
||||
}
|
||||
@ -3539,20 +3543,23 @@ void MainWindow::updateRCMode(int id)
|
||||
switch(id)
|
||||
{
|
||||
case SettingsModel::VBRMode:
|
||||
if(m_qaacEncoderAvailable)
|
||||
switch(m_aacEncoder)
|
||||
{
|
||||
case SettingsModel::AAC_ENCODER_QAAC:
|
||||
sliderMin = 0;
|
||||
sliderMax = 32;
|
||||
}
|
||||
else if(m_fhgEncoderAvailable)
|
||||
{
|
||||
break;
|
||||
case SettingsModel::AAC_ENCODER_FHG:
|
||||
sliderMin = 1;
|
||||
sliderMax = 6;
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
case SettingsModel::AAC_ENCODER_NERO:
|
||||
sliderMin = 0;
|
||||
sliderMax = 20;
|
||||
break;
|
||||
default:
|
||||
throw "updateRCMode(): Unknown AAC encoder specified!";
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case SettingsModel::ABRMode:
|
||||
@ -3737,17 +3744,20 @@ void MainWindow::updateBitrate(int value)
|
||||
switch(currentRCMode)
|
||||
{
|
||||
case SettingsModel::VBRMode:
|
||||
if(m_qaacEncoderAvailable)
|
||||
switch(m_aacEncoder)
|
||||
{
|
||||
case SettingsModel::AAC_ENCODER_QAAC:
|
||||
sliderText = tr("Quality Level %1").arg(QString::number(qBound(0, value * 4 , 127)));
|
||||
}
|
||||
else if(m_fhgEncoderAvailable)
|
||||
{
|
||||
break;
|
||||
case SettingsModel::AAC_ENCODER_FHG:
|
||||
sliderText = tr("Quality Level %1").arg(QString::number(value));
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
case SettingsModel::AAC_ENCODER_NERO:
|
||||
sliderText = tr("Quality Level %1").arg(QString().sprintf("%.2f", static_cast<double>(value) / 20.0));
|
||||
break;
|
||||
default:
|
||||
throw "updateBitrate(): Unknown AAC encoder specified!";
|
||||
break;
|
||||
}
|
||||
m_settings->compressionVbrLevelAacEnc(value);
|
||||
break;
|
||||
@ -4329,10 +4339,13 @@ void MainWindow::customParamsHelpRequested(QWidget *obj, QEvent *event)
|
||||
else if(obj == ui->helpCustomParamOggEnc) showCustomParamsHelpScreen("oggenc2.exe", "--help");
|
||||
else if(obj == ui->helpCustomParamNeroAAC)
|
||||
{
|
||||
if(m_qaacEncoderAvailable) showCustomParamsHelpScreen("qaac.exe", "--help");
|
||||
else if(m_fhgEncoderAvailable) showCustomParamsHelpScreen("fhgaacenc.exe", "");
|
||||
else if(m_neroEncoderAvailable) showCustomParamsHelpScreen("neroAacEnc.exe", "-help");
|
||||
else MessageBeep(MB_ICONERROR);
|
||||
switch(m_aacEncoder)
|
||||
{
|
||||
case SettingsModel::AAC_ENCODER_QAAC: showCustomParamsHelpScreen("qaac.exe", "--help"); break;
|
||||
case SettingsModel::AAC_ENCODER_FHG : showCustomParamsHelpScreen("fhgaacenc.exe", ""); break;
|
||||
case SettingsModel::AAC_ENCODER_NERO: showCustomParamsHelpScreen("neroAacEnc.exe", "-help"); break;
|
||||
default: MessageBeep(MB_ICONERROR); break;
|
||||
}
|
||||
}
|
||||
else if(obj == ui->helpCustomParamFLAC) showCustomParamsHelpScreen("flac.exe", "--help");
|
||||
else if(obj == ui->helpCustomParamAften) showCustomParamsHelpScreen("aften.exe", "-h");
|
||||
|
@ -195,10 +195,6 @@ private:
|
||||
uint m_outputFolderViewInitCounter;
|
||||
bool m_outputFolderViewCentering;
|
||||
|
||||
const bool m_neroEncoderAvailable;
|
||||
const bool m_fhgEncoderAvailable;
|
||||
const bool m_qaacEncoderAvailable;
|
||||
|
||||
WorkingBanner *m_banner;
|
||||
QStringList *m_delayedFileList;
|
||||
QTimer *m_delayedFileTimer;
|
||||
@ -235,4 +231,6 @@ private:
|
||||
CustomEventFilter *m_evenFilterOutputFolderMouse;
|
||||
CustomEventFilter *m_evenFilterOutputFolderView;
|
||||
CustomEventFilter *m_evenFilterCompressionTab;
|
||||
|
||||
const int m_aacEncoder;
|
||||
};
|
||||
|
@ -144,6 +144,7 @@ ProcessingDialog::ProcessingDialog(FileListModel *fileListModel, AudioFileModel
|
||||
:
|
||||
QDialog(parent),
|
||||
ui(new Ui::ProcessingDialog),
|
||||
m_aacEncoder(SettingsModel::getAacEncoder()),
|
||||
m_systemTray(new QSystemTrayIcon(QIcon(":/icons/cd_go.png"), this)),
|
||||
m_settings(settings),
|
||||
m_metaInfo(metaInfo),
|
||||
@ -996,33 +997,42 @@ AbstractEncoder *ProcessingDialog::makeEncoder(bool *nativeResampling)
|
||||
/*-------- AACEncoder /*--------*/
|
||||
case SettingsModel::AACEncoder:
|
||||
{
|
||||
if(lamexp_check_tool("qaac.exe") && lamexp_check_tool("libsoxrate.dll"))
|
||||
switch(m_aacEncoder)
|
||||
{
|
||||
QAACEncoder *aacEncoder = new QAACEncoder();
|
||||
aacEncoder->setRCMode(rcMode = m_settings->compressionRCModeAacEnc());
|
||||
aacEncoder->setBitrate(IS_VBR(rcMode) ? m_settings->compressionVbrLevelAacEnc() : m_settings->compressionBitrateAacEnc());
|
||||
aacEncoder->setProfile(m_settings->aacEncProfile());
|
||||
aacEncoder->setCustomParams(m_settings->customParametersAacEnc());
|
||||
encoder = aacEncoder;
|
||||
}
|
||||
else if(lamexp_check_tool("fhgaacenc.exe") && lamexp_check_tool("enc_fhgaac.dll"))
|
||||
{
|
||||
FHGAACEncoder *aacEncoder = new FHGAACEncoder();
|
||||
aacEncoder->setRCMode(rcMode = m_settings->compressionRCModeAacEnc());
|
||||
aacEncoder->setBitrate(IS_VBR(rcMode) ? m_settings->compressionVbrLevelAacEnc() : m_settings->compressionBitrateAacEnc());
|
||||
aacEncoder->setProfile(m_settings->aacEncProfile());
|
||||
aacEncoder->setCustomParams(m_settings->customParametersAacEnc());
|
||||
encoder = aacEncoder;
|
||||
}
|
||||
else
|
||||
{
|
||||
AACEncoder *aacEncoder = new AACEncoder();
|
||||
aacEncoder->setRCMode(rcMode = m_settings->compressionRCModeAacEnc());
|
||||
aacEncoder->setBitrate(IS_VBR(rcMode) ? m_settings->compressionVbrLevelAacEnc() : m_settings->compressionBitrateAacEnc());
|
||||
aacEncoder->setEnable2Pass(m_settings->neroAACEnable2Pass());
|
||||
aacEncoder->setProfile(m_settings->aacEncProfile());
|
||||
aacEncoder->setCustomParams(m_settings->customParametersAacEnc());
|
||||
encoder = aacEncoder;
|
||||
case SettingsModel::AAC_ENCODER_QAAC:
|
||||
{
|
||||
QAACEncoder *aacEncoder = new QAACEncoder();
|
||||
aacEncoder->setRCMode(rcMode = m_settings->compressionRCModeAacEnc());
|
||||
aacEncoder->setBitrate(IS_VBR(rcMode) ? m_settings->compressionVbrLevelAacEnc() : m_settings->compressionBitrateAacEnc());
|
||||
aacEncoder->setProfile(m_settings->aacEncProfile());
|
||||
aacEncoder->setCustomParams(m_settings->customParametersAacEnc());
|
||||
encoder = aacEncoder;
|
||||
}
|
||||
break;
|
||||
case SettingsModel::AAC_ENCODER_FHG:
|
||||
{
|
||||
FHGAACEncoder *aacEncoder = new FHGAACEncoder();
|
||||
aacEncoder->setRCMode(rcMode = m_settings->compressionRCModeAacEnc());
|
||||
aacEncoder->setBitrate(IS_VBR(rcMode) ? m_settings->compressionVbrLevelAacEnc() : m_settings->compressionBitrateAacEnc());
|
||||
aacEncoder->setProfile(m_settings->aacEncProfile());
|
||||
aacEncoder->setCustomParams(m_settings->customParametersAacEnc());
|
||||
encoder = aacEncoder;
|
||||
}
|
||||
break;
|
||||
case SettingsModel::AAC_ENCODER_NERO:
|
||||
{
|
||||
AACEncoder *aacEncoder = new AACEncoder();
|
||||
aacEncoder->setRCMode(rcMode = m_settings->compressionRCModeAacEnc());
|
||||
aacEncoder->setBitrate(IS_VBR(rcMode) ? m_settings->compressionVbrLevelAacEnc() : m_settings->compressionBitrateAacEnc());
|
||||
aacEncoder->setEnable2Pass(m_settings->neroAACEnable2Pass());
|
||||
aacEncoder->setProfile(m_settings->aacEncProfile());
|
||||
aacEncoder->setCustomParams(m_settings->customParametersAacEnc());
|
||||
encoder = aacEncoder;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
throw "makeEncoder(): Unknown AAC encoder specified!";
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -128,4 +128,6 @@ private:
|
||||
DiskObserverThread *m_diskObserver;
|
||||
qint64 m_timerStart;
|
||||
int m_progressViewFilter;
|
||||
|
||||
const int m_aacEncoder;
|
||||
};
|
||||
|
@ -40,7 +40,7 @@
|
||||
#include <QSet>
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
//SettingsCache Class
|
||||
// SettingsCache Class
|
||||
////////////////////////////////////////////////////////////
|
||||
|
||||
class SettingsCache
|
||||
@ -126,7 +126,7 @@ private:
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
//Macros
|
||||
// Macros
|
||||
////////////////////////////////////////////////////////////
|
||||
|
||||
#define LAMEXP_MAKE_OPTION_I(OPT,DEF) \
|
||||
@ -162,7 +162,7 @@ while(0)
|
||||
#define DIR_EXISTS(PATH) (QFileInfo(PATH).exists() && QFileInfo(PATH).isDir())
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
//Constants
|
||||
// Constants
|
||||
////////////////////////////////////////////////////////////
|
||||
|
||||
//Setting ID's
|
||||
@ -418,6 +418,30 @@ void SettingsModel::syncNow(void)
|
||||
m_configCache->flushValues();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
// Static Functions
|
||||
////////////////////////////////////////////////////////////
|
||||
|
||||
int SettingsModel::getAacEncoder(void)
|
||||
{
|
||||
if(lamexp_check_tool("qaac.exe") && lamexp_check_tool("libsoxrate.dll"))
|
||||
{
|
||||
return AAC_ENCODER_QAAC;
|
||||
}
|
||||
else if(lamexp_check_tool("fhgaacenc.exe") && lamexp_check_tool("enc_fhgaac.dll") && lamexp_check_tool("nsutil.dll") && lamexp_check_tool("libmp4v2.dll"))
|
||||
{
|
||||
return AAC_ENCODER_FHG;
|
||||
}
|
||||
else if(lamexp_check_tool("neroAacEnc.exe") && lamexp_check_tool("neroAacDec.exe") && lamexp_check_tool("neroAacTag.exe"))
|
||||
{
|
||||
return AAC_ENCODER_NERO;
|
||||
}
|
||||
else
|
||||
{
|
||||
return AAC_ENCODER_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
// Private Functions
|
||||
////////////////////////////////////////////////////////////
|
||||
|
@ -83,6 +83,14 @@ public:
|
||||
Overwrite_Replaces = 2
|
||||
};
|
||||
|
||||
enum AACEncoderType
|
||||
{
|
||||
AAC_ENCODER_NONE = 0,
|
||||
AAC_ENCODER_NERO = 1,
|
||||
AAC_ENCODER_FHG = 2,
|
||||
AAC_ENCODER_QAAC = 3,
|
||||
};
|
||||
|
||||
//Consts
|
||||
static const int mp3Bitrates[15];
|
||||
static const int ac3Bitrates[20];
|
||||
@ -167,6 +175,9 @@ public:
|
||||
void validate(void);
|
||||
void syncNow(void);
|
||||
|
||||
//Static
|
||||
static int getAacEncoder(void);
|
||||
|
||||
private:
|
||||
SettingsCache *m_configCache;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user