///////////////////////////////////////////////////////////////////////////////
// LameXP - Audio Encoder Front-End
-// Copyright (C) 2004-2011 LoRd_MuldeR <MuldeR2@GMX.de>
+// Copyright (C) 2004-2012 LoRd_MuldeR <MuldeR2@GMX.de>
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
bool bTimeout = false;
bool bAborted = false;
+ int prevProgress = -1;
QRegExp regExp("progress:(\\s+)(\\d+)%(\\s+)\\|");
{
bool ok = false;
int progress = regExp.cap(2).toInt(&ok);
- if(ok) emit statusUpdated(progress);
+ if(ok && (progress > prevProgress))
+ {
+ emit statusUpdated(progress);
+ prevProgress = qMin(progress + 2, 99);
+ }
}
else if(!text.isEmpty())
{
emit statusUpdated(100);
emit messageLogged(QString().sprintf("\nExited with code: 0x%04X", process.exitCode()));
- if(bTimeout || bAborted || process.exitStatus() != QProcess::NormalExit)
+ if(bTimeout || bAborted || process.exitCode() != EXIT_SUCCESS)
{
return false;
}
return "ac3";
}
-const unsigned int *AC3Encoder::requiresDownsample(void)
+const unsigned int *AC3Encoder::supportedChannelCount(void)
+{
+ static const unsigned int supportedChannels[] = {1, 2, 3, 4, 5, 6, NULL};
+ return supportedChannels;
+}
+
+const unsigned int *AC3Encoder::supportedSamplerates(void)
{
static const unsigned int supportedRates[] = {48000, 44100, 32000, NULL};
return supportedRates;