From b0937f9001a8906b5e0fcfe1affef957050d68fd Mon Sep 17 00:00:00 2001 From: lordmulder Date: Fri, 9 Mar 2012 01:11:29 +0100 Subject: [PATCH] More FLAC workarounds. Using "--channel-map=none" will fix most cases, although we will loose the channel map for Wave files that contain a valid channel map. On the other hand, FLAC fails most of the time when trying to use the channel map from the Wave file. --- src/Config.h | 2 +- src/Encoder_FLAC.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Config.h b/src/Config.h index f1bcf712..ad7e3d98 100644 --- a/src/Config.h +++ b/src/Config.h @@ -30,7 +30,7 @@ #define VER_LAMEXP_MINOR_LO 4 #define VER_LAMEXP_TYPE Beta #define VER_LAMEXP_PATCH 5 -#define VER_LAMEXP_BUILD 904 +#define VER_LAMEXP_BUILD 905 /////////////////////////////////////////////////////////////////////////////// // Tool versions (minimum expected versions!) diff --git a/src/Encoder_FLAC.cpp b/src/Encoder_FLAC.cpp index c177aabf..0add2361 100644 --- a/src/Encoder_FLAC.cpp +++ b/src/Encoder_FLAC.cpp @@ -47,6 +47,7 @@ bool FLACEncoder::encode(const QString &sourceFile, const AudioFileModel &metaIn QStringList args; args << QString("-%1").arg(QString::number(qMax(0, qMin(8, m_configBitrate)))); + args << "--channel-map=none"; if(!metaInfo.fileName().isEmpty()) args << "-T" << QString("title=%1").arg(metaInfo.fileName()); if(!metaInfo.fileArtist().isEmpty()) args << "-T" << QString("artist=%1").arg(metaInfo.fileArtist()); @@ -152,7 +153,7 @@ bool FLACEncoder::isFormatSupported(const QString &containerType, const QString const unsigned int *FLACEncoder::supportedChannelCount(void) { - static const unsigned int supportedChannels[] = {2, 5, 6, NULL}; + static const unsigned int supportedChannels[] = {2, 4, 5, 6, 7, 8, NULL}; return supportedChannels; }