OSDN Git Service

The "Algorithm Quality" slider now also effects the QAAC encoder.
authorLoRd_MuldeR <mulder2@gmx.de>
Mon, 1 Feb 2016 19:20:14 +0000 (20:20 +0100)
committerLoRd_MuldeR <mulder2@gmx.de>
Mon, 1 Feb 2016 19:20:14 +0000 (20:20 +0100)
doc/Changelog.html
doc/Changelog.md
src/Config.h
src/Encoder_AAC_QAAC.cpp
src/Encoder_AAC_QAAC.h
src/Registry_Encoder.cpp

index 89a0792..7a3452f 100644 (file)
@@ -86,6 +86,7 @@
 <ul>
 <li>Fixed the location of temporary intermediate files for SoX-based audio effects</li>
 <li>Enabled the &quot;built-in&quot; resampler for QAAC encoder</li>
+<li>The &quot;Algorithm Quality&quot; slider now also effects the QAAC encoder</li>
 <li>Updated MediaInfo to v0.7.82 (2016-01-27), compiled with ICL 15.0 and MSVC 12.0</li>
 <li>Updated QAAC add-in to the to QAAC v2.58 (2016-01-05)</li>
 <li>Updated ALAC decoder to refalac v1.58 (2016-01-05)</li>
index 96737e9..29d1e5d 100644 (file)
@@ -6,6 +6,7 @@
 
 * Fixed the location of temporary intermediate files for SoX-based audio effects
 * Enabled the "built-in" resampler for QAAC encoder
+* The "Algorithm Quality" slider now also effects the QAAC encoder
 * Updated MediaInfo to v0.7.82 (2016-01-27), compiled with ICL 15.0 and MSVC 12.0
 * Updated QAAC add-in to the to QAAC v2.58 (2016-01-05)
 * Updated ALAC decoder to refalac v1.58 (2016-01-05)
index 265489d..13681ed 100644 (file)
@@ -35,7 +35,7 @@
 #define VER_LAMEXP_MINOR_LO                                    4
 #define VER_LAMEXP_TYPE                                                Alpha
 #define VER_LAMEXP_PATCH                                       2
-#define VER_LAMEXP_BUILD                                       1861
+#define VER_LAMEXP_BUILD                                       1862
 #define VER_LAMEXP_CONFG                                       1818
 
 ///////////////////////////////////////////////////////////////////////////////
index 98b0e74..55b8df3 100644 (file)
@@ -150,6 +150,7 @@ QAACEncoder::QAACEncoder(void)
        }
 
        m_configProfile = 0;
+       m_algorithmQuality = 2;
 }
 
 QAACEncoder::~QAACEncoder(void)
@@ -194,6 +195,7 @@ bool QAACEncoder::encode(const QString &sourceFile, const AudioFileModel_MetaInf
                break;
        }
 
+       args << "--quality" << QString::number(qBound(0, m_algorithmQuality, 2));
        if (m_configSamplingRate > 0)
        {
                args << QString("--native-resampler=bats,%0").arg(QString::number(RESAMPLING_QUALITY));
@@ -301,6 +303,11 @@ void QAACEncoder::setProfile(int profile)
        m_configProfile = profile;
 }
 
+void QAACEncoder::setAlgoQuality(int value)
+{
+       m_algorithmQuality = qBound(0, value, 2);
+}
+
 const AbstractEncoderInfo *QAACEncoder::getEncoderInfo(void)
 {
        return &g_qaacEncoderInfo;
index a104172..cddda35 100644 (file)
@@ -39,6 +39,7 @@ public:
        
        //Advanced options
        virtual void setProfile(int profile);
+       virtual void setAlgoQuality(int value);
 
        //Encoder info
        virtual const AbstractEncoderInfo *toEncoderInfo(void) const { return getEncoderInfo(); }
@@ -48,4 +49,5 @@ private:
        const QString m_binary_qaac32;
        const QString m_binary_qaac64;
        int m_configProfile;
+       int m_algorithmQuality;
 };
index a9cdc06..d694476 100644 (file)
@@ -86,6 +86,7 @@ AbstractEncoder *EncoderRegistry::createInstance(const int encoderId, const Sett
                                {
                                        QAACEncoder *const aacEncoder = new QAACEncoder();
                                        aacEncoder->setProfile(settings->aacEncProfile());
+                                       aacEncoder->setAlgoQuality(settings->lameAlgoQuality());
                                        encoder = aacEncoder;
                                }
                                break;