Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Vladimir Svyatski 2016-04-14 00:21:42 +03:00
commit 9893117761
9 changed files with 49 additions and 52 deletions

View File

@ -84,9 +84,10 @@
<h1 id="lamexp-v4.xx-history"><span class="header-section-number">1</span> LameXP v4.xx History</h1> <h1 id="lamexp-v4.xx-history"><span class="header-section-number">1</span> LameXP v4.xx History</h1>
<h2 id="lamexp-v4.14-2016--" class="unnumbered">LameXP v4.14 [2016-??-??]</h2> <h2 id="lamexp-v4.14-2016--" class="unnumbered">LameXP v4.14 [2016-??-??]</h2>
<ul> <ul>
<li>Upgraded build environment to Microsoft Visual Studio 2015 with Update-2</li>
<li>Fixed the location of temporary intermediate files for SoX-based audio effects</li> <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>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>The &quot;Algorithm Quality&quot; slider now also affects the QAAC encoder</li>
<li>Added &quot;AVX&quot; (Advanced Vector Extensions) to CPU feature detection code</li> <li>Added &quot;AVX&quot; (Advanced Vector Extensions) to CPU feature detection code</li>
<li>Updated Opus encoder/decoder libraries to v1.1.2 and Opus-Tools to v0.1.9 (2016-01-12)</li> <li>Updated Opus encoder/decoder libraries to v1.1.2 and Opus-Tools to v0.1.9 (2016-01-12)</li>
<li>Updated LAME encoder to v3.100 Alpha-2 (2016-01-29), compiled with ICL 15.0 and MSVC 12.0</li> <li>Updated LAME encoder to v3.100 Alpha-2 (2016-01-29), compiled with ICL 15.0 and MSVC 12.0</li>

View File

@ -4,6 +4,7 @@
## LameXP v4.14 [2016-??-??] ## {-} ## LameXP v4.14 [2016-??-??] ## {-}
* Upgraded build environment to Microsoft Visual Studio 2015 with Update-2
* Fixed the location of temporary intermediate files for SoX-based audio effects * Fixed the location of temporary intermediate files for SoX-based audio effects
* Enabled the "built-in" resampler for QAAC encoder * Enabled the "built-in" resampler for QAAC encoder
* The "Algorithm Quality" slider now also affects the QAAC encoder * The "Algorithm Quality" slider now also affects the QAAC encoder

View File

@ -45,7 +45,7 @@ document.write('<a h'+'ref'+'="ma'+'ilto'+':'+e+'" clas'+'s="em' + 'ail">'+e+'<\
<li><a href="#output-formats-encoders"><span class="toc-section-number">1.2</span> Output Formats (Encoders)</a></li> <li><a href="#output-formats-encoders"><span class="toc-section-number">1.2</span> Output Formats (Encoders)</a></li>
<li><a href="#input-formats-decoders"><span class="toc-section-number">1.3</span> Input Formats (Decoders)</a></li> <li><a href="#input-formats-decoders"><span class="toc-section-number">1.3</span> Input Formats (Decoders)</a></li>
</ul></li> </ul></li>
<li><a href="#leagl-information"><span class="toc-section-number">2</span> Leagl Information</a><ul> <li><a href="#legal-information"><span class="toc-section-number">2</span> Legal Information</a><ul>
<li><a href="#third-party-software"><span class="toc-section-number">2.1</span> Third-party Software</a></li> <li><a href="#third-party-software"><span class="toc-section-number">2.1</span> Third-party Software</a></li>
<li><a href="#license-terms"><span class="toc-section-number">2.2</span> License Terms</a></li> <li><a href="#license-terms"><span class="toc-section-number">2.2</span> License Terms</a></li>
</ul></li> </ul></li>
@ -175,7 +175,7 @@ document.write('<a h'+'ref'+'="ma'+'ilto'+':'+e+'" clas'+'s="em' + 'ail">'+e+'<\
<li>WavPack Hybrid Lossless Audio [built-in]</li> <li>WavPack Hybrid Lossless Audio [built-in]</li>
<li>Windows Media Audio (WMA), using wma2wav [built-in]</li> <li>Windows Media Audio (WMA), using wma2wav [built-in]</li>
</ul> </ul>
<h1 id="leagl-information"><span class="header-section-number">2</span> Leagl Information</h1> <h1 id="legal-information"><span class="header-section-number">2</span> Legal Information</h1>
<p>The LameXP software was developed, from the scratch, by LoRd_MuldeR <script type="text/javascript"> <p>The LameXP software was developed, from the scratch, by LoRd_MuldeR <script type="text/javascript">
<!-- <!--
h='&#x47;&#x4d;&#88;&#46;&#100;&#x65;&#x25;&#x33;&#x45;';a='&#64;';n='&#x25;&#x33;&#x43;&#x4d;&#x75;&#108;&#100;&#x65;&#82;&#50;';e=n+a+h; h='&#x47;&#x4d;&#88;&#46;&#100;&#x65;&#x25;&#x33;&#x45;';a='&#64;';n='&#x25;&#x33;&#x43;&#x4d;&#x75;&#108;&#100;&#x65;&#82;&#50;';e=n+a+h;

View File

@ -3231,7 +3231,7 @@
<message> <message>
<location filename="../../src/Dialog_Processing.cpp" line="534"/> <location filename="../../src/Dialog_Processing.cpp" line="534"/>
<source>Multi-threading enabled: Running %1 instances in parallel!</source> <source>Multi-threading enabled: Running %1 instances in parallel!</source>
<translation type="unfinished">Wielowątkowosć włączona: Równolegle wykonywanych jest %1 kodowań!</translation> <translation type="unfinished">Wielowątkowość włączona: Równolegle wykonywanych jest %1 kodowań!</translation>
</message> </message>
<message> <message>
<location filename="../../src/Dialog_Processing.cpp" line="663"/> <location filename="../../src/Dialog_Processing.cpp" line="663"/>

Binary file not shown.

View File

@ -34,8 +34,8 @@
#define VER_LAMEXP_MINOR_HI 1 #define VER_LAMEXP_MINOR_HI 1
#define VER_LAMEXP_MINOR_LO 4 #define VER_LAMEXP_MINOR_LO 4
#define VER_LAMEXP_TYPE Alpha #define VER_LAMEXP_TYPE Alpha
#define VER_LAMEXP_PATCH 6 #define VER_LAMEXP_PATCH 8
#define VER_LAMEXP_BUILD 1872 #define VER_LAMEXP_BUILD 1878
#define VER_LAMEXP_CONFG 1818 #define VER_LAMEXP_CONFG 1818
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -57,7 +57,8 @@ void AbstractEncoder::setRCMode(const int &mode)
void AbstractEncoder::setBitrate(const int &bitrate) void AbstractEncoder::setBitrate(const int &bitrate)
{ {
if (qMax(0, bitrate) >= toEncoderInfo()->valueCount(m_configRCMode)) const int valueCount = toEncoderInfo()->valueCount(m_configRCMode);
if ((valueCount > 0) && (qMax(0, bitrate) >= valueCount))
{ {
MUTILS_THROW("The specified bitrate/quality is out of range!"); MUTILS_THROW("The specified bitrate/quality is out of range!");
} }

View File

@ -22,18 +22,18 @@
#include "Encoder_Wave.h" #include "Encoder_Wave.h"
#include <MUtils/Global.h>
#include <MUtils/OSSupport.h>
#include "Global.h" #include "Global.h"
#include "Model_Settings.h" #include "Model_Settings.h"
#include <QDir> typedef struct _callback_t
{
//Windows includes WaveEncoder *pInstance;
#define NOMINMAX volatile bool *abortFlag;
#define WIN32_LEAN_AND_MEAN }
#include <Windows.h> callback_t;
#include <Shellapi.h>
#define FIX_SEPARATORS(STR) for(int i = 0; STR[i]; i++) { if(STR[i] == L'/') STR[i] = L'\\'; }
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Encoder Info // Encoder Info
@ -134,52 +134,42 @@ WaveEncoder::~WaveEncoder(void)
bool WaveEncoder::encode(const QString &sourceFile, const AudioFileModel_MetaInfo &metaInfo, const unsigned int duration, const QString &outputFile, volatile bool *abortFlag) bool WaveEncoder::encode(const QString &sourceFile, const AudioFileModel_MetaInfo &metaInfo, const unsigned int duration, const QString &outputFile, volatile bool *abortFlag)
{ {
SHFILEOPSTRUCTW fileOperation; emit messageLogged(QString("Copy file \"%1\" to \"%2\"\n").arg(sourceFile, outputFile));
memset(&fileOperation, 0, sizeof(SHFILEOPSTRUCTW));
fileOperation.fFlags = FOF_SILENT | FOF_NOCONFIRMATION | FOF_NOCONFIRMMKDIR | FOF_NOERRORUI | FOF_FILESONLY;
emit messageLogged(QString("Copy file \"%1\" to \"%2\"").arg(sourceFile, outputFile)); callback_t callbackData;
fileOperation.wFunc = FO_COPY; callbackData.abortFlag = abortFlag;
callbackData.pInstance = this;
/* emit statusUpdated(0);
if(lamexp_temp_folder().compare(QFileInfo(sourceFile).canonicalPath(), Qt::CaseInsensitive) == 0) const bool success = MUtils::OS::copy_file(sourceFile, outputFile, true, progressCallback, &callbackData);
emit statusUpdated(100);
if (success)
{ {
//If the source is in the TEMP folder take shortcut and move the file emit messageLogged(QLatin1String("File copied successfully."));
emit messageLogged(QString("Moving file \"%1\" to \"%2\"").arg(sourceFile, outputFile));
fileOperation.wFunc = FO_MOVE;
} }
else else
{ {
//...otherwise we actually copy the file in order to keep the source emit messageLogged((*abortFlag) ? QLatin1String("Operation cancelled by user!") : QLatin1String("Error: Failed to copy file!"));
emit messageLogged(QString("Copy file \"%1\" to \"%2\"").arg(sourceFile, outputFile));
fileOperation.wFunc = FO_COPY;
} }
*/
size_t srcLen = wcslen(reinterpret_cast<const wchar_t*>(sourceFile.utf16())) + 3; return success;
wchar_t *srcBuffer = new wchar_t[srcLen]; }
memset(srcBuffer, 0, srcLen * sizeof(wchar_t));
wcsncpy_s(srcBuffer, srcLen, reinterpret_cast<const wchar_t*>(sourceFile.utf16()), _TRUNCATE);
FIX_SEPARATORS (srcBuffer);
fileOperation.pFrom = srcBuffer;
size_t outLen = wcslen(reinterpret_cast<const wchar_t*>(outputFile.utf16())) + 3; bool WaveEncoder::progressCallback(const double &progress, void *const userData)
wchar_t *outBuffer = new wchar_t[outLen]; {
memset(outBuffer, 0, outLen * sizeof(wchar_t)); const callback_t *const ptr = reinterpret_cast<callback_t*>(userData);
wcsncpy_s(outBuffer, outLen, reinterpret_cast<const wchar_t*>(outputFile.utf16()), _TRUNCATE); if (*(ptr->abortFlag))
FIX_SEPARATORS (outBuffer); {
fileOperation.pTo = outBuffer; return false; /*user aborted*/
}
ptr->pInstance->updateProgress(progress);
return true;
}
emit statusUpdated(0); void WaveEncoder::updateProgress(const double &progress)
int result = SHFileOperation(&fileOperation); {
emit statusUpdated(100); emit statusUpdated(qRound(progress * 100.0));
emit messageLogged(QString().sprintf("\nExited with code: 0x%04X", result));
delete [] srcBuffer;
delete [] outBuffer;
return (result == 0 && fileOperation.fAnyOperationsAborted == false);
} }
bool WaveEncoder::isFormatSupported(const QString &containerType, const QString &containerProfile, const QString &formatType, const QString &formatProfile, const QString &formatVersion) bool WaveEncoder::isFormatSupported(const QString &containerType, const QString &containerProfile, const QString &formatType, const QString &formatProfile, const QString &formatVersion)

View File

@ -40,4 +40,8 @@ public:
//Encoder info //Encoder info
virtual const AbstractEncoderInfo *toEncoderInfo(void) const { return getEncoderInfo(); } virtual const AbstractEncoderInfo *toEncoderInfo(void) const { return getEncoderInfo(); }
static const AbstractEncoderInfo *getEncoderInfo(void); static const AbstractEncoderInfo *getEncoderInfo(void);
private:
static bool progressCallback(const double &progress, void *const userData);
void updateProgress(const double &progress);
}; };