Some workarounds for FLAC. It seems FLAC doesn't like 1.0, 3.0, 3.1, 4.0 channel files. It also doesn't like more than 6 channels. It still fails with files that have >2 channels and are NOT in the "Wave Extensible" format.
This commit is contained in:
parent
a2dc3bb295
commit
53af74148d
@ -30,7 +30,7 @@
|
||||
#define VER_LAMEXP_MINOR_LO 4
|
||||
#define VER_LAMEXP_TYPE Beta
|
||||
#define VER_LAMEXP_PATCH 5
|
||||
#define VER_LAMEXP_BUILD 903
|
||||
#define VER_LAMEXP_BUILD 904
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Tool versions (minimum expected versions!)
|
||||
|
@ -149,3 +149,15 @@ bool FLACEncoder::isFormatSupported(const QString &containerType, const QString
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
const unsigned int *FLACEncoder::supportedChannelCount(void)
|
||||
{
|
||||
static const unsigned int supportedChannels[] = {2, 5, 6, NULL};
|
||||
return supportedChannels;
|
||||
}
|
||||
|
||||
const unsigned int *FLACEncoder::supportedBitdepths(void)
|
||||
{
|
||||
static const unsigned int supportedBPS[] = {16, 24, NULL};
|
||||
return supportedBPS;
|
||||
}
|
||||
|
@ -36,6 +36,8 @@ public:
|
||||
virtual bool encode(const QString &sourceFile, const AudioFileModel &metaInfo, const QString &outputFile, volatile bool *abortFlag);
|
||||
virtual bool isFormatSupported(const QString &containerType, const QString &containerProfile, const QString &formatType, const QString &formatProfile, const QString &formatVersion);
|
||||
virtual QString extension(void);
|
||||
virtual const unsigned int *supportedChannelCount(void);
|
||||
virtual const unsigned int *supportedBitdepths(void);
|
||||
|
||||
private:
|
||||
const QString m_binary;
|
||||
|
@ -48,10 +48,10 @@ bool DownmixFilter::apply(const QString &sourceFile, const QString &outputFile,
|
||||
unsigned int channels = formatInfo->formatAudioChannels(); //detectChannels(sourceFile, abortFlag);
|
||||
emit messageLogged(QString().sprintf("--> Number of channels is: %d\n", channels));
|
||||
|
||||
if((channels == 1) || (channels == 2))
|
||||
if(channels == 2)
|
||||
{
|
||||
messageLogged("Skipping downmix!");
|
||||
qDebug("Dowmmix not required for Mono or Stereo input, skipping!");
|
||||
qDebug("Dowmmix not required for Stereo input, skipping!");
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -67,6 +67,8 @@ bool DownmixFilter::apply(const QString &sourceFile, const QString &outputFile,
|
||||
|
||||
switch(channels)
|
||||
{
|
||||
case 2: //Unknown
|
||||
qWarning("Downmixer: Nothing to do!");
|
||||
case 3: //3.0 (L/R/C)
|
||||
args << "remix" << "1v0.66,3v0.34" << "2v0.66,3v0.34";
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user