Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
9893117761
@ -84,9 +84,10 @@
|
||||
<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>
|
||||
<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>Enabled the "built-in" resampler for QAAC encoder</li>
|
||||
<li>The "Algorithm Quality" slider now also effects the QAAC encoder</li>
|
||||
<li>The "Algorithm Quality" slider now also affects the QAAC encoder</li>
|
||||
<li>Added "AVX" (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 LAME encoder to v3.100 Alpha-2 (2016-01-29), compiled with ICL 15.0 and MSVC 12.0</li>
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
## 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
|
||||
* Enabled the "built-in" resampler for QAAC encoder
|
||||
* The "Algorithm Quality" slider now also affects the QAAC encoder
|
||||
|
@ -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="#input-formats-decoders"><span class="toc-section-number">1.3</span> Input Formats (Decoders)</a></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="#license-terms"><span class="toc-section-number">2.2</span> License Terms</a></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>Windows Media Audio (WMA), using wma2wav [built-in]</li>
|
||||
</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">
|
||||
<!--
|
||||
h='GMX.de%3E';a='@';n='%3CMuldeR2';e=n+a+h;
|
||||
|
@ -3231,7 +3231,7 @@
|
||||
<message>
|
||||
<location filename="../../src/Dialog_Processing.cpp" line="534"/>
|
||||
<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>
|
||||
<location filename="../../src/Dialog_Processing.cpp" line="663"/>
|
||||
|
Binary file not shown.
@ -34,8 +34,8 @@
|
||||
#define VER_LAMEXP_MINOR_HI 1
|
||||
#define VER_LAMEXP_MINOR_LO 4
|
||||
#define VER_LAMEXP_TYPE Alpha
|
||||
#define VER_LAMEXP_PATCH 6
|
||||
#define VER_LAMEXP_BUILD 1872
|
||||
#define VER_LAMEXP_PATCH 8
|
||||
#define VER_LAMEXP_BUILD 1878
|
||||
#define VER_LAMEXP_CONFG 1818
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -57,7 +57,8 @@ void AbstractEncoder::setRCMode(const int &mode)
|
||||
|
||||
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!");
|
||||
}
|
||||
|
@ -22,18 +22,18 @@
|
||||
|
||||
#include "Encoder_Wave.h"
|
||||
|
||||
#include <MUtils/Global.h>
|
||||
#include <MUtils/OSSupport.h>
|
||||
|
||||
#include "Global.h"
|
||||
#include "Model_Settings.h"
|
||||
|
||||
#include <QDir>
|
||||
|
||||
//Windows includes
|
||||
#define NOMINMAX
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <Windows.h>
|
||||
#include <Shellapi.h>
|
||||
|
||||
#define FIX_SEPARATORS(STR) for(int i = 0; STR[i]; i++) { if(STR[i] == L'/') STR[i] = L'\\'; }
|
||||
typedef struct _callback_t
|
||||
{
|
||||
WaveEncoder *pInstance;
|
||||
volatile bool *abortFlag;
|
||||
}
|
||||
callback_t;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// 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)
|
||||
{
|
||||
SHFILEOPSTRUCTW fileOperation;
|
||||
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\"\n").arg(sourceFile, outputFile));
|
||||
|
||||
emit messageLogged(QString("Copy file \"%1\" to \"%2\"").arg(sourceFile, outputFile));
|
||||
fileOperation.wFunc = FO_COPY;
|
||||
callback_t callbackData;
|
||||
callbackData.abortFlag = abortFlag;
|
||||
callbackData.pInstance = this;
|
||||
|
||||
/*
|
||||
if(lamexp_temp_folder().compare(QFileInfo(sourceFile).canonicalPath(), Qt::CaseInsensitive) == 0)
|
||||
emit statusUpdated(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(QString("Moving file \"%1\" to \"%2\"").arg(sourceFile, outputFile));
|
||||
fileOperation.wFunc = FO_MOVE;
|
||||
emit messageLogged(QLatin1String("File copied successfully."));
|
||||
}
|
||||
else
|
||||
{
|
||||
//...otherwise we actually copy the file in order to keep the source
|
||||
emit messageLogged(QString("Copy file \"%1\" to \"%2\"").arg(sourceFile, outputFile));
|
||||
fileOperation.wFunc = FO_COPY;
|
||||
emit messageLogged((*abortFlag) ? QLatin1String("Operation cancelled by user!") : QLatin1String("Error: Failed to copy file!"));
|
||||
}
|
||||
*/
|
||||
|
||||
size_t srcLen = wcslen(reinterpret_cast<const wchar_t*>(sourceFile.utf16())) + 3;
|
||||
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;
|
||||
return success;
|
||||
}
|
||||
|
||||
size_t outLen = wcslen(reinterpret_cast<const wchar_t*>(outputFile.utf16())) + 3;
|
||||
wchar_t *outBuffer = new wchar_t[outLen];
|
||||
memset(outBuffer, 0, outLen * sizeof(wchar_t));
|
||||
wcsncpy_s(outBuffer, outLen, reinterpret_cast<const wchar_t*>(outputFile.utf16()), _TRUNCATE);
|
||||
FIX_SEPARATORS (outBuffer);
|
||||
fileOperation.pTo = outBuffer;
|
||||
bool WaveEncoder::progressCallback(const double &progress, void *const userData)
|
||||
{
|
||||
const callback_t *const ptr = reinterpret_cast<callback_t*>(userData);
|
||||
if (*(ptr->abortFlag))
|
||||
{
|
||||
return false; /*user aborted*/
|
||||
}
|
||||
ptr->pInstance->updateProgress(progress);
|
||||
return true;
|
||||
}
|
||||
|
||||
emit statusUpdated(0);
|
||||
int result = SHFileOperation(&fileOperation);
|
||||
emit statusUpdated(100);
|
||||
|
||||
emit messageLogged(QString().sprintf("\nExited with code: 0x%04X", result));
|
||||
|
||||
delete [] srcBuffer;
|
||||
delete [] outBuffer;
|
||||
|
||||
return (result == 0 && fileOperation.fAnyOperationsAborted == false);
|
||||
void WaveEncoder::updateProgress(const double &progress)
|
||||
{
|
||||
emit statusUpdated(qRound(progress * 100.0));
|
||||
}
|
||||
|
||||
bool WaveEncoder::isFormatSupported(const QString &containerType, const QString &containerProfile, const QString &formatType, const QString &formatProfile, const QString &formatVersion)
|
||||
|
@ -40,4 +40,8 @@ public:
|
||||
//Encoder info
|
||||
virtual const AbstractEncoderInfo *toEncoderInfo(void) const { return getEncoderInfo(); }
|
||||
static const AbstractEncoderInfo *getEncoderInfo(void);
|
||||
|
||||
private:
|
||||
static bool progressCallback(const double &progress, void *const userData);
|
||||
void updateProgress(const double &progress);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user