summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Yves Avenard <jyavenard@mythtv.org>2010-11-29 11:39:40 (GMT)
committer Jean-Yves Avenard <jyavenard@mythtv.org>2010-11-29 11:39:40 (GMT)
commit2d67f9f5a384fab8aced0e3ed9f82065864f758d (patch)
tree8dbcd0660c5036eded59bda9c4a00f2afaab7243
parent38e6b0300a80e6e6bf1e23b1a2fd81f16e55a9e7 (diff)
Add options to use myth's own downmixer instead of ffmpeg's downmixer. This fix the issue with low volume audio for 5.1 AC3 stream on a stereo system. Fixes #6569
git-svn-id: http://svn.mythtv.org/svn/trunk@27370 7dbf422c-18fa-0310-86e9-fd20926502f2
-rw-r--r--mythtv/libs/libmythtv/avformatdecoder.cpp4
-rw-r--r--mythtv/programs/mythfrontend/globalsettings.cpp14
-rw-r--r--mythtv/programs/mythfrontend/globalsettings.h1
3 files changed, 19 insertions, 0 deletions
diff --git a/mythtv/libs/libmythtv/avformatdecoder.cpp b/mythtv/libs/libmythtv/avformatdecoder.cpp
index 8cf477d..ecf9480 100644
--- a/mythtv/libs/libmythtv/avformatdecoder.cpp
+++ b/mythtv/libs/libmythtv/avformatdecoder.cpp
@@ -4501,6 +4501,10 @@ void AvFormatDecoder::SetDisablePassThrough(bool disable)
inline bool AvFormatDecoder::DecoderWillDownmix(const AVCodecContext *ctx)
{
+ if (gCoreContext->GetNumSetting("AdvancedAudioSettings", false) &&
+ gCoreContext->GetNumSetting("AudioDownmixOverride", false))
+ return false;
+
switch (ctx->codec_id)
{
case CODEC_ID_AC3:
diff --git a/mythtv/programs/mythfrontend/globalsettings.cpp b/mythtv/programs/mythfrontend/globalsettings.cpp
index 4de505c..3b7aead 100644
--- a/mythtv/programs/mythfrontend/globalsettings.cpp
+++ b/mythtv/programs/mythfrontend/globalsettings.cpp
@@ -195,6 +195,7 @@ AudioConfigSettings::AudioConfigSettings() :
ConfigurationGroup *settings5 =
new HorizontalConfigurationGroup(false, false);
settings5->addChild(Audio48kOverride());
+ settings5->addChild(DownmixOverride());
m_triggerMPCM = new TransCheckBoxSetting();
m_MPCM = MPCM();
@@ -475,6 +476,19 @@ HostCheckBox *AudioConfigSettings::Audio48kOverride()
return gc;
}
+HostCheckBox *AudioConfigSettings::DownmixOverride()
+{
+ HostCheckBox *gc = new HostCheckBox("AudioDownmixOverride");
+ gc->setLabel(QObject::tr("Always use internal downmixer"));
+ gc->setValue(false);
+ gc->setHelpText(QObject::tr("If uncheck, for AC3 and DTS audio content; "
+ "use ffmpeg's internal downmixer when required."
+ " If checked, Myth's own downmixer will be used"
+ " for all content. While not as fast, it "
+ "doesn't suffer from low volume issues."));
+ return gc;
+}
+
HostCheckBox *AudioConfigSettings::PassThroughOverride()
{
HostCheckBox *gc = new HostCheckBox("PassThruDeviceOverride");
diff --git a/mythtv/programs/mythfrontend/globalsettings.h b/mythtv/programs/mythfrontend/globalsettings.h
index 7c9b4d5..d4e7c9e 100644
--- a/mythtv/programs/mythfrontend/globalsettings.h
+++ b/mythtv/programs/mythfrontend/globalsettings.h
@@ -43,6 +43,7 @@ class AudioConfigSettings : public VerticalConfigurationGroup
HostCheckBox *SRCQualityOverride();
HostComboBox *SRCQuality();
HostCheckBox *Audio48kOverride();
+ HostCheckBox *DownmixOverride();
HostCheckBox *PassThroughOverride();
HostComboBox *PassThroughOutputDevice();