OSDN Git Service

Fixed Opus decoder forced 48000 Hz output.
authorLoRd_MuldeR <mulder2@gmx.de>
Sat, 17 Mar 2018 19:59:24 +0000 (20:59 +0100)
committerLoRd_MuldeR <mulder2@gmx.de>
Sat, 17 Mar 2018 19:59:24 +0000 (20:59 +0100)
src/Config.h
src/Decoder_Opus.cpp

index 87547be..be245ba 100644 (file)
@@ -35,7 +35,7 @@
 #define VER_LAMEXP_MINOR_LO                                    6
 #define VER_LAMEXP_TYPE                                                Beta
 #define VER_LAMEXP_PATCH                                       9
-#define VER_LAMEXP_BUILD                                       2103
+#define VER_LAMEXP_BUILD                                       2104
 #define VER_LAMEXP_CONFG                                       2002
 
 ///////////////////////////////////////////////////////////////////////////////
index fa45e7f..6a3aa47 100644 (file)
@@ -34,6 +34,8 @@
 #include <QRegExp>
 #include <QUuid>
 
+static const quint32 OPUS_DEFAULT_SAMPLING_RATE = 48000;
+
 bool OpusDecoder::m_disableResampling = false;
 
 OpusDecoder::OpusDecoder(void)
@@ -57,7 +59,7 @@ bool OpusDecoder::decode(const QString &sourceFile, const QString &outputFile, Q
 
        if(m_disableResampling)
        {
-               args << "--no-resample";
+               args << "--rate" << QString().number(OPUS_DEFAULT_SAMPLING_RATE); /*force 48.000 Hz*/
        }
 
        args << QDir::toNativeSeparators(sourceFile);