Apply "Force Stereo Downmix" only for sources with more than two channels.
This commit is contained in:
parent
fbee147f07
commit
ce872af94c
@ -2607,23 +2607,23 @@
|
|||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/Dialog_Processing.cpp" line="755"/>
|
<location filename="../../src/Dialog_Processing.cpp" line="760"/>
|
||||||
<source>Playlist creation failed</source>
|
<source>Playlist creation failed</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/Dialog_Processing.cpp" line="755"/>
|
<location filename="../../src/Dialog_Processing.cpp" line="760"/>
|
||||||
<source>The playlist file could not be created:</source>
|
<source>The playlist file could not be created:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/Dialog_Processing.cpp" line="795"/>
|
<location filename="../../src/Dialog_Processing.cpp" line="800"/>
|
||||||
<source>Warning: Computer will shutdown in %1 seconds...</source>
|
<source>Warning: Computer will shutdown in %1 seconds...</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/Dialog_Processing.cpp" line="799"/>
|
<location filename="../../src/Dialog_Processing.cpp" line="804"/>
|
||||||
<location filename="../../src/Dialog_Processing.cpp" line="800"/>
|
<location filename="../../src/Dialog_Processing.cpp" line="805"/>
|
||||||
<source>Cancel Shutdown</source>
|
<source>Cancel Shutdown</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
#define VER_LAMEXP_MINOR_LO 3
|
#define VER_LAMEXP_MINOR_LO 3
|
||||||
#define VER_LAMEXP_TYPE Alpha
|
#define VER_LAMEXP_TYPE Alpha
|
||||||
#define VER_LAMEXP_PATCH 8
|
#define VER_LAMEXP_PATCH 8
|
||||||
#define VER_LAMEXP_BUILD 622
|
#define VER_LAMEXP_BUILD 623
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
// Tools versions
|
// Tools versions
|
||||||
|
@ -552,6 +552,7 @@ void ProcessingDialog::startNextJob(void)
|
|||||||
AbstractEncoder *encoder = NULL;
|
AbstractEncoder *encoder = NULL;
|
||||||
bool nativeResampling = false;
|
bool nativeResampling = false;
|
||||||
|
|
||||||
|
//Create encoder instance
|
||||||
switch(m_settings->compressionEncoder())
|
switch(m_settings->compressionEncoder())
|
||||||
{
|
{
|
||||||
case SettingsModel::MP3Encoder:
|
case SettingsModel::MP3Encoder:
|
||||||
@ -637,6 +638,7 @@ void ProcessingDialog::startNextJob(void)
|
|||||||
throw "Unsupported encoder!";
|
throw "Unsupported encoder!";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Create processing thread
|
||||||
ProcessThread *thread = new ProcessThread
|
ProcessThread *thread = new ProcessThread
|
||||||
(
|
(
|
||||||
currentFile,
|
currentFile,
|
||||||
@ -646,7 +648,8 @@ void ProcessingDialog::startNextJob(void)
|
|||||||
m_settings->prependRelativeSourcePath()
|
m_settings->prependRelativeSourcePath()
|
||||||
);
|
);
|
||||||
|
|
||||||
if(m_settings->forceStereoDownmix() && !encoder->requiresDownmix())
|
//Add audio filters
|
||||||
|
if(m_settings->forceStereoDownmix() && (!encoder->requiresDownmix()) && ((currentFile.formatAudioChannels() > 2) || (currentFile.formatAudioChannels() == 0)))
|
||||||
{
|
{
|
||||||
thread->addFilter(new DownmixFilter());
|
thread->addFilter(new DownmixFilter());
|
||||||
}
|
}
|
||||||
@ -665,7 +668,7 @@ void ProcessingDialog::startNextJob(void)
|
|||||||
{
|
{
|
||||||
thread->addFilter(new NormalizeFilter(m_settings->normalizationFilterMaxVolume()));
|
thread->addFilter(new NormalizeFilter(m_settings->normalizationFilterMaxVolume()));
|
||||||
}
|
}
|
||||||
if(m_settings->renameOutputFilesEnabled())
|
if(m_settings->renameOutputFilesEnabled() && (!m_settings->renameOutputFilesPattern().simplified().isEmpty()))
|
||||||
{
|
{
|
||||||
thread->setRenamePattern(m_settings->renameOutputFilesPattern());
|
thread->setRenamePattern(m_settings->renameOutputFilesPattern());
|
||||||
}
|
}
|
||||||
@ -673,12 +676,14 @@ void ProcessingDialog::startNextJob(void)
|
|||||||
m_threadList.append(thread);
|
m_threadList.append(thread);
|
||||||
m_allJobs.append(thread->getId());
|
m_allJobs.append(thread->getId());
|
||||||
|
|
||||||
|
//Connect thread signals
|
||||||
connect(thread, SIGNAL(finished()), this, SLOT(doneEncoding()), Qt::QueuedConnection);
|
connect(thread, SIGNAL(finished()), this, SLOT(doneEncoding()), Qt::QueuedConnection);
|
||||||
connect(thread, SIGNAL(processStateInitialized(QUuid,QString,QString,int)), m_progressModel, SLOT(addJob(QUuid,QString,QString,int)), Qt::QueuedConnection);
|
connect(thread, SIGNAL(processStateInitialized(QUuid,QString,QString,int)), m_progressModel, SLOT(addJob(QUuid,QString,QString,int)), Qt::QueuedConnection);
|
||||||
connect(thread, SIGNAL(processStateChanged(QUuid,QString,int)), m_progressModel, SLOT(updateJob(QUuid,QString,int)), Qt::QueuedConnection);
|
connect(thread, SIGNAL(processStateChanged(QUuid,QString,int)), m_progressModel, SLOT(updateJob(QUuid,QString,int)), Qt::QueuedConnection);
|
||||||
connect(thread, SIGNAL(processStateFinished(QUuid,QString,bool)), this, SLOT(processFinished(QUuid,QString,bool)), Qt::QueuedConnection);
|
connect(thread, SIGNAL(processStateFinished(QUuid,QString,bool)), this, SLOT(processFinished(QUuid,QString,bool)), Qt::QueuedConnection);
|
||||||
connect(thread, SIGNAL(processMessageLogged(QUuid,QString)), m_progressModel, SLOT(appendToLog(QUuid,QString)), Qt::QueuedConnection);
|
connect(thread, SIGNAL(processMessageLogged(QUuid,QString)), m_progressModel, SLOT(appendToLog(QUuid,QString)), Qt::QueuedConnection);
|
||||||
|
|
||||||
|
//Give it a go!
|
||||||
m_runningThreads++;
|
m_runningThreads++;
|
||||||
thread->start();
|
thread->start();
|
||||||
}
|
}
|
||||||
|
@ -128,14 +128,14 @@ void ProcessThread::processFile()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Do we need to take of downsampling the input?
|
//Do we need to take care of downsampling the input?
|
||||||
if(m_encoder->requiresDownsample())
|
if(m_encoder->requiresDownsample())
|
||||||
{
|
{
|
||||||
insertDownsampleFilter();
|
insertDownsampleFilter();
|
||||||
}
|
}
|
||||||
|
|
||||||
//Do we need Stereo downmix?
|
//Do we need Stereo downmix?
|
||||||
if(m_audioFile.formatAudioChannels() > 2 && m_encoder->requiresDownmix())
|
if(((m_audioFile.formatAudioChannels() > 2) || (m_audioFile.formatAudioChannels() == 0)) && m_encoder->requiresDownmix())
|
||||||
{
|
{
|
||||||
m_filters.prepend(new DownmixFilter());
|
m_filters.prepend(new DownmixFilter());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user