///////////////////////////////////////////////////////////////////////////////
// LameXP - Audio Encoder Front-End
-// Copyright (C) 2004-2018 LoRd_MuldeR <MuldeR2@GMX.de>
+// Copyright (C) 2004-2023 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
+// it under the terms of the GNU GENERAL PUBLIC LICENSE as published by
// the Free Software Foundation; either version 2 of the License, or
-// (at your option) any later version, but always including the *additional*
-// restrictions defined in the "License.txt" file.
+// (at your option) any later version; always including the non-optional
+// LAMEXP GNU GENERAL PUBLIC LICENSE ADDENDUM. See "License.txt" file!
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
}
int prevProgress = -1;
- QRegExp regExp("\\s+(\\d+)% decoded.");
+ QRegExp regExp("\\b(\\d+)\\.(\\d)%\\s+decoded.");
const result_t result = awaitProcess(process, abortFlag, [this, &prevProgress, ®Exp](const QString &text)
{
if (regExp.lastIndexIn(text) >= 0)
{
- qint32 newProgress;
- if (MUtils::regexp_parse_int32(regExp, newProgress))
+ qint32 values[2];
+ if (MUtils::regexp_parse_int32(regExp, values, 2))
{
+ const qint32 newProgress = (values[1] >= 5) ? (values[0] + 1) : values[0];
if (newProgress > prevProgress)
{
emit statusUpdated(newProgress);
return (result == RESULT_SUCCESS);
}
-bool VorbisDecoder::isFormatSupported(const QString &containerType, const QString &containerProfile, const QString &formatType, const QString &formatProfile, const QString &formatVersion)
+bool VorbisDecoder::isFormatSupported(const QString &containerType, const QString& /*containerProfile*/, const QString &formatType, const QString& /*formatProfile*/, const QString& /*formatVersion*/)
{
- if(containerType.compare("OGG", Qt::CaseInsensitive) == 0)
+ if(containerType.compare(QLatin1String("OGG"), Qt::CaseInsensitive) == 0)
{
- if(formatType.compare("Vorbis", Qt::CaseInsensitive) == 0)
+ if(formatType.compare(QLatin1String("Vorbis"), Qt::CaseInsensitive) == 0)
{
return true;
}