From f05bc6acfa05a8bc4d47ef43e992c2fba62482fd Mon Sep 17 00:00:00 2001 From: LoRd_MuldeR Date: Sat, 12 Nov 2016 15:08:03 +0100 Subject: [PATCH] Fixed encoding of *non*-Stereo sources with NeroAAC, when "HE-AAC *v2* (SBR+PS)" is selected: NeroAAC fails when using "-hev2" option *and* passing a source that is *not* Stereo, we revert to "-he" in that case. --- doc/Changelog.html | 1 + doc/Changelog.md | 1 + src/Encoder_AAC.cpp | 10 +++++++++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/doc/Changelog.html b/doc/Changelog.html index f1f73543..dbc0316c 100644 --- a/doc/Changelog.html +++ b/doc/Changelog.html @@ -87,6 +87,7 @@
  • Upgraded build environment to Microsoft Visual Studio 2015 with Update-2
  • Fixed the location of temporary intermediate files for SoX-based audio effects
  • Fixed embedding of meta tags with OggEnc2 when reading directly from OGG/FLAC input file
  • +
  • Fixed encoding of non-Stereo sources with NeroAAC, when "HE-AAC v2 (SBR+PS)" is selected
  • Enabled the "built-in" resampler for QAAC encoder
  • The "Algorithm Quality" slider now also affects the QAAC encoder
  • Added "AVX" (Advanced Vector Extensions) to CPU feature detection code
  • diff --git a/doc/Changelog.md b/doc/Changelog.md index c80ba98e..f79c58df 100644 --- a/doc/Changelog.md +++ b/doc/Changelog.md @@ -7,6 +7,7 @@ * Upgraded build environment to Microsoft Visual Studio 2015 with Update-2 * Fixed the location of temporary intermediate files for SoX-based audio effects * Fixed embedding of meta tags with OggEnc2 when reading directly from OGG/FLAC input file +* Fixed encoding of *non*-Stereo sources with NeroAAC, when "HE-AAC *v2* (SBR+PS)" is selected * Enabled the "built-in" resampler for QAAC encoder * The "Algorithm Quality" slider now also affects the QAAC encoder * Added "AVX" (Advanced Vector Extensions) to CPU feature detection code diff --git a/src/Encoder_AAC.cpp b/src/Encoder_AAC.cpp index 47065d1e..5db4e192 100644 --- a/src/Encoder_AAC.cpp +++ b/src/Encoder_AAC.cpp @@ -180,7 +180,15 @@ bool AACEncoder::encode(const QString &sourceFile, const AudioFileModel_MetaInfo args << L1S("-he"); //Forces use of HE AAC profile break; case 3: - args << L1S("-hev2"); //Forces use of HEv2 AAC profile + if ((channels == 0) || (channels == 2)) + { + args << L1S("-hev2"); //Forces use of HEv2 AAC profile + } + else + { + emit messageLogged("WARNING: Cannot use HE-AAC v2 (SBR+PS) with Non-Stereo input --> reverting to HE-AAC (SBR)"); + args << L1S("-he"); //Forces use of HE AAC profile + } break; }