Fixed QAAC detection, hopefully.
This commit is contained in:
parent
7aea8ce063
commit
7a687f2d7b
@ -121,10 +121,11 @@ static const g_qaacEncoderInfo;
|
|||||||
|
|
||||||
QAACEncoder::QAACEncoder(void)
|
QAACEncoder::QAACEncoder(void)
|
||||||
:
|
:
|
||||||
m_binary_enc(lamexp_lookup_tool("qaac.exe")),
|
m_binary_qaac(lamexp_lookup_tool("qaac.exe")),
|
||||||
m_binary_dll(lamexp_lookup_tool("libsoxrate.dll"))
|
m_binary_soxr(lamexp_lookup_tool("libsoxr.dll")),
|
||||||
|
m_binary_soxc(lamexp_lookup_tool("libsoxconvolver.dll"))
|
||||||
{
|
{
|
||||||
if(m_binary_enc.isEmpty() || m_binary_dll.isEmpty())
|
if(m_binary_qaac.isEmpty() || m_binary_soxr.isEmpty() || m_binary_soxc.isEmpty())
|
||||||
{
|
{
|
||||||
THROW("Error initializing QAAC. Tool 'qaac.exe' is not registred!");
|
THROW("Error initializing QAAC. Tool 'qaac.exe' is not registred!");
|
||||||
}
|
}
|
||||||
@ -189,7 +190,7 @@ bool QAACEncoder::encode(const QString &sourceFile, const AudioFileModel_MetaInf
|
|||||||
args << "-o" << QDir::toNativeSeparators(outputFile);
|
args << "-o" << QDir::toNativeSeparators(outputFile);
|
||||||
args << QDir::toNativeSeparators(sourceFile);
|
args << QDir::toNativeSeparators(sourceFile);
|
||||||
|
|
||||||
if(!startProcess(process, m_binary_enc, args))
|
if(!startProcess(process, m_binary_qaac, args))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -45,7 +45,8 @@ public:
|
|||||||
static const AbstractEncoderInfo *getEncoderInfo(void);
|
static const AbstractEncoderInfo *getEncoderInfo(void);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const QString m_binary_enc;
|
const QString m_binary_qaac;
|
||||||
const QString m_binary_dll;
|
const QString m_binary_soxr;
|
||||||
|
const QString m_binary_soxc;
|
||||||
int m_configProfile;
|
int m_configProfile;
|
||||||
};
|
};
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#include "Model_Settings.h"
|
#include "Model_Settings.h"
|
||||||
|
|
||||||
#include "Global.h"
|
#include "Global.h"
|
||||||
|
#include "Registry_Encoder.h"
|
||||||
|
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include <QDesktopServices>
|
#include <QDesktopServices>
|
||||||
@ -379,18 +380,12 @@ void SettingsModel::validate(void)
|
|||||||
CHECK_RCMODE(Aften);
|
CHECK_RCMODE(Aften);
|
||||||
CHECK_RCMODE(OpusEnc);
|
CHECK_RCMODE(OpusEnc);
|
||||||
|
|
||||||
if(!(lamexp_check_tool("neroAacEnc.exe") && lamexp_check_tool("neroAacDec.exe") && lamexp_check_tool("neroAacTag.exe")))
|
if(EncoderRegistry::getAacEncoder() == AAC_ENCODER_NONE)
|
||||||
{
|
{
|
||||||
if(!(lamexp_check_tool("fhgaacenc.exe") && lamexp_check_tool("enc_fhgaac.dll")))
|
if(this->compressionEncoder() == SettingsModel::AACEncoder)
|
||||||
{
|
{
|
||||||
if(!(lamexp_check_tool("qaac.exe") && lamexp_check_tool("libsoxrate.dll")))
|
qWarning("AAC encoder selected, but not available any more. Reverting to MP3!");
|
||||||
{
|
this->compressionEncoder(SettingsModel::MP3Encoder);
|
||||||
if(this->compressionEncoder() == SettingsModel::AACEncoder)
|
|
||||||
{
|
|
||||||
qWarning("AAC encoder selected, but not available any more. Reverting to MP3!");
|
|
||||||
this->compressionEncoder(SettingsModel::MP3Encoder);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -476,7 +476,7 @@ void EncoderRegistry::resetAllEncoders(SettingsModel *settings)
|
|||||||
|
|
||||||
int EncoderRegistry::getAacEncoder(void)
|
int EncoderRegistry::getAacEncoder(void)
|
||||||
{
|
{
|
||||||
if(lamexp_check_tool("qaac.exe") && lamexp_check_tool("libsoxrate.dll"))
|
if(lamexp_check_tool("qaac.exe") && lamexp_check_tool("libsoxr.dll") && lamexp_check_tool("libsoxconvolver.dll"))
|
||||||
{
|
{
|
||||||
return SettingsModel::AAC_ENCODER_QAAC;
|
return SettingsModel::AAC_ENCODER_QAAC;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user