From 3c87a01c59d129a4929c7ce2e73018a031602d4c Mon Sep 17 00:00:00 2001 From: lordmulder Date: Mon, 8 Aug 2011 03:53:42 +0200 Subject: [PATCH] Added two more channel configurations. --- src/Config.h | 2 +- src/Filter_Downmix.cpp | 18 ++++++++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/Config.h b/src/Config.h index 7f301e33..0e7b3907 100644 --- a/src/Config.h +++ b/src/Config.h @@ -30,7 +30,7 @@ #define VER_LAMEXP_MINOR_LO 3 #define VER_LAMEXP_TYPE Alpha #define VER_LAMEXP_PATCH 9 -#define VER_LAMEXP_BUILD 629 +#define VER_LAMEXP_BUILD 630 /////////////////////////////////////////////////////////////////////////////// // Tools versions diff --git a/src/Filter_Downmix.cpp b/src/Filter_Downmix.cpp index 213820ee..0784cee8 100644 --- a/src/Filter_Downmix.cpp +++ b/src/Filter_Downmix.cpp @@ -65,22 +65,28 @@ bool DownmixFilter::apply(const QString &sourceFile, const QString &outputFile, switch(channels) { - case 3: + case 3: //3.0 (L/R/C) args << "remix" << "1v0.66,3v0.34" << "2v0.66,3v0.34"; break; - case 4: + case 4: //3.1 (L/R/C/LFE) args << "remix" << "1v0.5,3v0.25,4v0.25" << "2v0.5,3v0.25,4v0.25"; break; - case 6: + case 5: //5.0 (L/R/C/BL/BR) + args << "remix" << "1v0.5,3v0.25,4v0.25" << "2v0.5,3v0.25,5v0.25"; + break; + case 6: //5.1 (L/R/C/LFE/BL/BR) args << "remix" << "1v0.4,3v0.2,4v0.2,5v0.2" << "2v0.4,3v0.2,4v0.2,6v0.2"; break; - case 8: + case 7: //7.0 (L/R/C/BL/BR/SL/SR) + args << "remix" << "1v0.4,3v0.2,4v0.2,6v0.2" << "2v0.4,3v0.2,5v0.2,7v0.2"; + break; + case 8: //7.1 (L/R/C/LFE/BL/BR/SL/SR) args << "remix" << "1v0.36,3v0.16,4v0.16,5v0.16,7v0.16" << "2v0.36,3v0.16,4v0.16,6v0.16,8v0.16"; break; - case 9: + case 9: //8.1 (L/R/C/LFE/BL/BR/SL/SR/BC) args << "remix" << "1v0.308,3v0.154,4v0.154,5v0.154,7v0.154,9v0.076" << "2v0.308,3v0.154,4v0.154,6v0.154,8v0.154,9v0.076"; break; - default: + default: //Unknown qWarning("Downmixer: Unknown channel configuration!"); args << "channels" << "2"; break; -- 2.11.0