<ClCompile Include="src\Thread_Process.cpp" />
<ClCompile Include="src\Thread_RAMObserver.cpp" />
<ClCompile Include="src\Tool_Abstract.cpp" />
+ <ClCompile Include="src\Tool_WaveProperties.cpp" />
<ClCompile Include="src\WinSevenTaskbar.cpp" />
<ClCompile Include="tmp\MOC_Decoder_Abstract.cpp" />
<ClCompile Include="tmp\MOC_Dialog_About.cpp" />
<ClCompile Include="tmp\MOC_Thread_Process.cpp" />
<ClCompile Include="tmp\MOC_Thread_RAMObserver.cpp" />
<ClCompile Include="tmp\MOC_Tool_Abstract.cpp" />
+ <ClCompile Include="tmp\MOC_Tool_WaveProperties.cpp" />
<ClCompile Include="tmp\QRC_Documents.cpp" />
<ClCompile Include="tmp\QRC_Flags.cpp" />
<ClCompile Include="tmp\QRC_Icons.cpp" />
<Command Condition="'$(Configuration)|$(Platform)'=='Release_Static|Win32'">"$(QTDIR)\bin\moc.exe" -o "$(SolutionDir)tmp\MOC_%(Filename).cpp" "%(FullPath)"</Command>
</CustomBuild>
<ClInclude Include="src\Tools.h" />
+ <CustomBuild Include="src\Tool_WaveProperties.h">
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\moc.exe" -o "$(SolutionDir)tmp\MOC_%(Filename).cpp" "%(FullPath)"</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release_Static|Win32'">"$(QTDIR)\bin\moc.exe" -o "$(SolutionDir)tmp\MOC_%(Filename).cpp" "%(FullPath)"</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\moc.exe" -o "$(SolutionDir)tmp\MOC_%(Filename).cpp" "%(FullPath)"</Command>
+ <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">MOC "$(SolutionDir)tmp\MOC_%(Filename).cpp"</Message>
+ <Message Condition="'$(Configuration)|$(Platform)'=='Release_Static|Win32'">MOC "$(SolutionDir)tmp\MOC_%(Filename).cpp"</Message>
+ <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MOC "$(SolutionDir)tmp\MOC_%(Filename).cpp"</Message>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)tmp\MOC_%(Filename).cpp;%(Outputs)</Outputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release_Static|Win32'">$(SolutionDir)tmp\MOC_%(Filename).cpp;%(Outputs)</Outputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)tmp\MOC_%(Filename).cpp;%(Outputs)</Outputs>
+ </CustomBuild>
<ClInclude Include="tmp\UIC_CueSheetImport.h" />
<ClInclude Include="tmp\UIC_DropBox.h" />
<ClInclude Include="tmp\UIC_LogViewDialog.h" />
<ClCompile Include="tmp\MOC_Encoder_AAC_QAAC.cpp">
<Filter>Generated Files\MOC</Filter>
</ClCompile>
+ <ClCompile Include="src\Tool_WaveProperties.cpp">
+ <Filter>Source Files\Misc</Filter>
+ </ClCompile>
+ <ClCompile Include="tmp\MOC_Tool_WaveProperties.cpp">
+ <Filter>Generated Files\MOC</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\Config.h">
<CustomBuild Include="src\Encoder_AAC_QAAC.h">
<Filter>Header Files\Encoders</Filter>
</CustomBuild>
+ <CustomBuild Include="src\Tool_WaveProperties.h">
+ <Filter>Header Files\Misc</Filter>
+ </CustomBuild>
</ItemGroup>
<ItemGroup>
<None Include="res\MainIcon.ico" />
<context>
<name>ProcessThread</name>
<message>
- <location filename="../../src/Thread_Process.cpp" line="118"/>
+ <location filename="../../src/Thread_Process.cpp" line="124"/>
<source>Starting...</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/Thread_Process.cpp" line="126"/>
+ <location filename="../../src/Thread_Process.cpp" line="132"/>
<source>Not found!</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/Thread_Process.cpp" line="169"/>
+ <location filename="../../src/Thread_Process.cpp" line="165"/>
<source>The format of this file is NOT supported:</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/Thread_Process.cpp" line="169"/>
+ <location filename="../../src/Thread_Process.cpp" line="165"/>
<source>Container Format:</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/Thread_Process.cpp" line="169"/>
+ <location filename="../../src/Thread_Process.cpp" line="165"/>
<source>Audio Format:</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/Thread_Process.cpp" line="170"/>
+ <location filename="../../src/Thread_Process.cpp" line="166"/>
<source>Unsupported!</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/Thread_Process.cpp" line="215"/>
+ <location filename="../../src/Thread_Process.cpp" line="248"/>
<source>Done.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/Thread_Process.cpp" line="215"/>
+ <location filename="../../src/Thread_Process.cpp" line="248"/>
<source>Aborted!</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/Thread_Process.cpp" line="215"/>
+ <location filename="../../src/Thread_Process.cpp" line="248"/>
<source>Failed!</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/Thread_Process.cpp" line="232"/>
+ <location filename="../../src/Thread_Process.cpp" line="265"/>
<source>Encoding</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/Thread_Process.cpp" line="235"/>
+ <location filename="../../src/Thread_Process.cpp" line="268"/>
+ <source>Analyzing</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../../src/Thread_Process.cpp" line="271"/>
<source>Filtering</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/Thread_Process.cpp" line="238"/>
+ <location filename="../../src/Thread_Process.cpp" line="274"/>
<source>Decoding</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/Thread_Process.cpp" line="261"/>
+ <location filename="../../src/Thread_Process.cpp" line="297"/>
<source>The source audio file could not be found:</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/Thread_Process.cpp" line="268"/>
+ <location filename="../../src/Thread_Process.cpp" line="304"/>
<source>The source audio file could not be opened for reading:</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/Thread_Process.cpp" line="294"/>
+ <location filename="../../src/Thread_Process.cpp" line="330"/>
<source>The target output directory doesn't exist and could NOT be created:</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/Thread_Process.cpp" line="302"/>
+ <location filename="../../src/Thread_Process.cpp" line="338"/>
<source>The target output directory is NOT writable:</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/Thread_Process.cpp" line="312"/>
+ <location filename="../../src/Thread_Process.cpp" line="348"/>
<source>Unknown File Name</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/Thread_Process.cpp" line="314"/>
+ <location filename="../../src/Thread_Process.cpp" line="350"/>
<source>Unknown Title</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/Thread_Process.cpp" line="315"/>
+ <location filename="../../src/Thread_Process.cpp" line="351"/>
<source>Unknown Artist</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/Thread_Process.cpp" line="316"/>
+ <location filename="../../src/Thread_Process.cpp" line="352"/>
<source>Unknown Album</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../src/Thread_Process.cpp" line="318"/>
+ <location filename="../../src/Thread_Process.cpp" line="354"/>
<source>Unknown Comment</source>
<translation type="unfinished"></translation>
</message>
<source>Unknown Comment</source>
<translation>Unbekannter Kommentar</translation>
</message>
+ <message>
+ <source>Analyzing</source>
+ <translation>Prüfe</translation>
+ </message>
</context>
<context>
<name>ProcessingDialog</name>
<source>Unknown Comment</source>
<translation>Comentario desconocido</translation>
</message>
+ <message>
+ <source>Analyzing</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>ProcessingDialog</name>
<source>Unknown Comment</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>Analyzing</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>ProcessingDialog</name>
<source>Unknown Comment</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>Analyzing</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>ProcessingDialog</name>
<source>Unknown Comment</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>Analyzing</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>ProcessingDialog</name>
<context>
<name>ProcessThread</name>
<message>
- <location filename="../../src/Thread_Process.cpp" line="118"/>
+ <location filename="../../src/Thread_Process.cpp" line="124"/>
<source>Starting...</source>
<translation type="unfinished">Rozpoczynanie...</translation>
</message>
<message>
- <location filename="../../src/Thread_Process.cpp" line="126"/>
+ <location filename="../../src/Thread_Process.cpp" line="132"/>
<source>Not found!</source>
<translation type="unfinished">Nie znaleziono!</translation>
</message>
<message>
- <location filename="../../src/Thread_Process.cpp" line="169"/>
+ <location filename="../../src/Thread_Process.cpp" line="165"/>
<source>The format of this file is NOT supported:</source>
<translation type="unfinished">Format tego pliku NIE jest obsługiwany:</translation>
</message>
<message>
- <location filename="../../src/Thread_Process.cpp" line="169"/>
+ <location filename="../../src/Thread_Process.cpp" line="165"/>
<source>Container Format:</source>
<translation type="unfinished">Format kontenera:</translation>
</message>
<message>
- <location filename="../../src/Thread_Process.cpp" line="169"/>
+ <location filename="../../src/Thread_Process.cpp" line="165"/>
<source>Audio Format:</source>
<translation type="unfinished">Format dźwięku:</translation>
</message>
<message>
- <location filename="../../src/Thread_Process.cpp" line="170"/>
+ <location filename="../../src/Thread_Process.cpp" line="166"/>
<source>Unsupported!</source>
<translation type="unfinished">Nieobsługiwany!</translation>
</message>
<message>
- <location filename="../../src/Thread_Process.cpp" line="215"/>
+ <location filename="../../src/Thread_Process.cpp" line="248"/>
<source>Done.</source>
<translation type="unfinished">Zrobione.</translation>
</message>
<message>
- <location filename="../../src/Thread_Process.cpp" line="215"/>
+ <location filename="../../src/Thread_Process.cpp" line="248"/>
<source>Aborted!</source>
<translation type="unfinished">Przerwane!</translation>
</message>
<message>
- <location filename="../../src/Thread_Process.cpp" line="215"/>
+ <location filename="../../src/Thread_Process.cpp" line="248"/>
<source>Failed!</source>
<translation type="unfinished">Niepowodzenie!</translation>
</message>
<message>
- <location filename="../../src/Thread_Process.cpp" line="232"/>
+ <location filename="../../src/Thread_Process.cpp" line="265"/>
<source>Encoding</source>
<translation type="unfinished">Kompresowanie</translation>
</message>
<message>
- <location filename="../../src/Thread_Process.cpp" line="235"/>
+ <location filename="../../src/Thread_Process.cpp" line="268"/>
+ <source>Analyzing</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../../src/Thread_Process.cpp" line="271"/>
<source>Filtering</source>
<translation type="unfinished">Filtrowanie</translation>
</message>
<message>
- <location filename="../../src/Thread_Process.cpp" line="238"/>
+ <location filename="../../src/Thread_Process.cpp" line="274"/>
<source>Decoding</source>
<translation type="unfinished">Dekodowanie</translation>
</message>
<message>
- <location filename="../../src/Thread_Process.cpp" line="261"/>
+ <location filename="../../src/Thread_Process.cpp" line="297"/>
<source>The source audio file could not be found:</source>
<translation type="unfinished">Źródłowy plik dźwiękowy nie został odnaleziony:</translation>
</message>
<message>
- <location filename="../../src/Thread_Process.cpp" line="268"/>
+ <location filename="../../src/Thread_Process.cpp" line="304"/>
<source>The source audio file could not be opened for reading:</source>
<translation type="unfinished">Źródłowy plik dźwiękowy nie mógł zostać otworzony:</translation>
</message>
<message>
- <location filename="../../src/Thread_Process.cpp" line="294"/>
+ <location filename="../../src/Thread_Process.cpp" line="330"/>
<source>The target output directory doesn't exist and could NOT be created:</source>
<translation type="unfinished">Lokalizacja docelowa nie istnieje lu NIE mogła zostać utworzona:</translation>
</message>
<message>
- <location filename="../../src/Thread_Process.cpp" line="302"/>
+ <location filename="../../src/Thread_Process.cpp" line="338"/>
<source>The target output directory is NOT writable:</source>
<translation type="unfinished">Nie można zapisać do lokalizacji docelowej:</translation>
</message>
<message>
- <location filename="../../src/Thread_Process.cpp" line="312"/>
+ <location filename="../../src/Thread_Process.cpp" line="348"/>
<source>Unknown File Name</source>
<translation type="unfinished">Nieznana nazwa pliku</translation>
</message>
<message>
- <location filename="../../src/Thread_Process.cpp" line="314"/>
+ <location filename="../../src/Thread_Process.cpp" line="350"/>
<source>Unknown Title</source>
<translation type="unfinished">Nieznany Tytuł</translation>
</message>
<message>
- <location filename="../../src/Thread_Process.cpp" line="315"/>
+ <location filename="../../src/Thread_Process.cpp" line="351"/>
<source>Unknown Artist</source>
<translation type="unfinished">Nieznany Artysta</translation>
</message>
<message>
- <location filename="../../src/Thread_Process.cpp" line="316"/>
+ <location filename="../../src/Thread_Process.cpp" line="352"/>
<source>Unknown Album</source>
<translation type="unfinished">Nieznany Album</translation>
</message>
<message>
- <location filename="../../src/Thread_Process.cpp" line="318"/>
+ <location filename="../../src/Thread_Process.cpp" line="354"/>
<source>Unknown Comment</source>
<translation type="unfinished">Nieznany Komentarz</translation>
</message>
<source>Unknown Comment</source>
<translation type="unfinished">Неизвестный Комментарий</translation>
</message>
+ <message>
+ <source>Analyzing</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>ProcessingDialog</name>
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0" language="zh_TW" sourcelanguage="tw">
<context>
<source>Unknown Comment</source>
<translation>未知評論</translation>
</message>
+ <message>
+ <source>Analyzing</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>ProcessingDialog</name>
</message>
<message>
<source>Skipping update check this time, please be patient...</source>
- <translation>Наразі йде переривання перевірки оновлень, будь ласка, зачекайте...</translation>
+ <translation type="unfinished"></translation>
</message>
</context>
<context>
<source>Unknown Comment</source>
<translation>Невідомий коментар</translation>
</message>
+ <message>
+ <source>Analyzing</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>ProcessingDialog</name>
</message>
<message>
<source>Executable '%1' was built for Qt '%2', but found Qt '%3'.</source>
- <translation>Додаток '%1' був створений для Qt '%2', але знайдено Qt '%3'.</translation>
+ <translation type="unfinished"></translation>
</message>
</context>
<context>
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0" language="zh_CN" sourcelanguage="cn">
<context>
<source>Unknown Comment</source>
<translation>未知评论</translation>
</message>
+ <message>
+ <source>Analyzing</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>ProcessingDialog</name>
#define VER_LAMEXP_MINOR_LO 4
#define VER_LAMEXP_TYPE Alpha
#define VER_LAMEXP_PATCH 11
-#define VER_LAMEXP_BUILD 823
+#define VER_LAMEXP_BUILD 825
///////////////////////////////////////////////////////////////////////////////
// Tool versions (minimum expected versions!)
emit statusUpdated(100);
emit messageLogged(QString().sprintf("\nExited with code: 0x%04X", process.exitCode()));
- if(bTimeout || bAborted || process.exitStatus() != QProcess::NormalExit || QFileInfo(outputFile).size() == 0)
+ if(bTimeout || bAborted || process.exitCode() != EXIT_SUCCESS || QFileInfo(outputFile).size() == 0)
{
return false;
}
emit statusUpdated(100);
emit messageLogged(QString().sprintf("\nExited with code: 0x%04X", process.exitCode()));
- if(bTimeout || bAborted || process.exitStatus() != QProcess::NormalExit || QFileInfo(outputFile).size() == 0)
+ if(bTimeout || bAborted || process.exitCode() != EXIT_SUCCESS || QFileInfo(outputFile).size() == 0)
{
return false;
}
emit statusUpdated(100);
emit messageLogged(QString().sprintf("\nExited with code: 0x%04X", process.exitCode()));
- if(bTimeout || bAborted || process.exitStatus() != QProcess::NormalExit || QFileInfo(outputFile).size() == 0)
+ if(bTimeout || bAborted || process.exitCode() != EXIT_SUCCESS || QFileInfo(outputFile).size() == 0)
{
return false;
}
emit statusUpdated(100);
emit messageLogged(QString().sprintf("\nExited with code: 0x%04X", process.exitCode()));
- if(bTimeout || bAborted || process.exitStatus() != QProcess::NormalExit || QFileInfo(outputFile).size() == 0)
+ if(bTimeout || bAborted || process.exitCode() != EXIT_SUCCESS || QFileInfo(outputFile).size() == 0)
{
return false;
}
emit statusUpdated(100);
emit messageLogged(QString().sprintf("\nExited with code: 0x%04X", process.exitCode()));
- if(bTimeout || bAborted || process.exitStatus() != QProcess::NormalExit || QFileInfo(outputFile).size() == 0)
+ if(bTimeout || bAborted || process.exitCode() != EXIT_SUCCESS || QFileInfo(outputFile).size() == 0)
{
return false;
}
emit statusUpdated(100);
emit messageLogged(QString().sprintf("\nExited with code: 0x%04X", process.exitCode()));
- if(bTimeout || bAborted || process.exitStatus() != QProcess::NormalExit || QFileInfo(outputFile).size() == 0)
+ if(bTimeout || bAborted || process.exitCode() != EXIT_SUCCESS || QFileInfo(outputFile).size() == 0)
{
return false;
}
emit statusUpdated(100);
emit messageLogged(QString().sprintf("\nExited with code: 0x%04X", process.exitCode()));
- if(bTimeout || bAborted || process.exitStatus() != QProcess::NormalExit || QFileInfo(outputFile).size() == 0)
+ if(bTimeout || bAborted || process.exitCode() != EXIT_SUCCESS || QFileInfo(outputFile).size() == 0)
{
return false;
}
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;
}
emit statusUpdated(100);
emit messageLogged(QString().sprintf("\nExited with code: 0x%04X", process.exitCode()));
- if(bTimeout || bAborted || process.exitStatus() != QProcess::NormalExit || QFileInfo(outputFile).size() == 0)
+ if(bTimeout || bAborted || process.exitCode() != EXIT_SUCCESS || QFileInfo(outputFile).size() == 0)
{
return false;
}
emit statusUpdated(100);
emit messageLogged(QString().sprintf("\nExited with code: 0x%04X", process.exitCode()));
- if(bTimeout || bAborted || process.exitStatus() != QProcess::NormalExit || QFileInfo(outputFile).size() == 0)
+ if(bTimeout || bAborted || process.exitCode() != EXIT_SUCCESS || QFileInfo(outputFile).size() == 0)
{
return false;
}
emit statusUpdated(100);
emit messageLogged(QString().sprintf("\nExited with code: 0x%04X", process.exitCode()));
- if(bTimeout || bAborted || process.exitStatus() != QProcess::NormalExit || QFileInfo(outputFile).size() == 0)
+ if(bTimeout || bAborted || process.exitCode() != EXIT_SUCCESS || QFileInfo(outputFile).size() == 0)
{
return false;
}
emit statusUpdated(100);
emit messageLogged(QString().sprintf("\nExited with code: 0x%04X", process.exitCode()));
- if(bTimeout || bAborted || process.exitStatus() != QProcess::NormalExit || QFileInfo(outputFile).size() == 0)
+ if(bTimeout || bAborted || process.exitCode() != EXIT_SUCCESS || QFileInfo(outputFile).size() == 0)
{
return false;
}
emit statusUpdated(100);
emit messageLogged(QString().sprintf("\nExited with code: 0x%04X", process.exitCode()));
- if(bTimeout || bAborted || process.exitStatus() != QProcess::NormalExit || QFileInfo(outputFile).size() == 0)
+ if(bTimeout || bAborted || process.exitCode() != EXIT_SUCCESS || QFileInfo(outputFile).size() == 0)
{
return false;
}
emit statusUpdated(100);
emit messageLogged(QString().sprintf("\nExited with code: 0x%04X", process.exitCode()));
- if(bTimeout || bAborted || process.exitStatus() != QProcess::NormalExit || QFileInfo(outputFile).size() == 0)
+ if(bTimeout || bAborted || process.exitCode() != EXIT_SUCCESS || QFileInfo(outputFile).size() == 0)
{
return false;
}
emit statusUpdated(100);
emit messageLogged(QString().sprintf("\nExited with code: 0x%04X", process.exitCode()));
- if(bTimeout || bAborted || process.exitStatus() != QProcess::NormalExit || QFileInfo(outputFile).size() == 0)
+ if(bTimeout || bAborted || process.exitCode() != EXIT_SUCCESS || QFileInfo(outputFile).size() == 0)
{
return false;
}
bool AACEncoder::encode(const QString &sourceFile, const AudioFileModel &metaInfo, const QString &outputFile, volatile bool *abortFlag)
{
- const unsigned int fileDuration = (metaInfo.fileDuration() > 0) ? metaInfo.fileDuration() : detectLength(sourceFile, abortFlag);
+ const unsigned int fileDuration = metaInfo.fileDuration();
QProcess process;
QStringList args;
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;
}
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 true;
}
-unsigned int AACEncoder::detectLength(const QString &sourceFile, volatile bool *abortFlag)
-{
- unsigned int duration = 0;
-
- QProcess process;
- QStringList args;
-
- args << "--i" << sourceFile;
-
- if(!startProcess(process, m_binary_sox, args))
- {
- return duration;
- }
-
- bool bTimeout = false;
- bool bAborted = false;
-
- QRegExp regExp("Duration\\s*:\\s*(\\d\\d):(\\d\\d):(\\d\\d)\\.(\\d\\d)", Qt::CaseInsensitive);
-
- while(process.state() != QProcess::NotRunning)
- {
- if(*abortFlag)
- {
- process.kill();
- bAborted = true;
- emit messageLogged("\nABORTED BY USER !!!");
- break;
- }
- process.waitForReadyRead(m_processTimeoutInterval);
- if(!process.bytesAvailable() && process.state() == QProcess::Running)
- {
- process.kill();
- qWarning("SoX process timed out <-- killing!");
- emit messageLogged("\nPROCESS TIMEOUT !!!");
- bTimeout = true;
- break;
- }
- while(process.bytesAvailable() > 0)
- {
- QByteArray line = process.readLine();
- QString text = QString::fromUtf8(line.constData()).simplified();
- if(regExp.lastIndexIn(text) >= 0)
- {
- bool ok[4] = {false, false, false, false};
- unsigned int tmp1 = regExp.cap(1).toUInt(&ok[0]);
- unsigned int tmp2 = regExp.cap(2).toUInt(&ok[1]);
- unsigned int tmp3 = regExp.cap(3).toUInt(&ok[2]);
- unsigned int tmp4 = regExp.cap(4).toUInt(&ok[3]);
- if(ok[0] && ok[1] && ok[2] && ok[3])
- {
- duration = (tmp1 * 3600) + (tmp2 * 60) + tmp3 + qRound(static_cast<double>(tmp4) / 100.0);
- }
- }
- if(!text.isEmpty())
- {
- emit messageLogged(text);
- }
- }
- }
-
- process.waitForFinished();
- if(process.state() != QProcess::NotRunning)
- {
- process.kill();
- process.waitForFinished(-1);
- }
-
- //qWarning("Duration detected is: %u", duration);
- return duration;
-}
-
QString AACEncoder::extension(void)
{
return "mp4";
const QString m_binary_sox;
int m_configProfile;
bool m_configEnable2Pass;
-
- unsigned int detectLength(const QString &sourceFile, volatile bool *abortFlag);
};
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
emit statusUpdated(100);
emit messageLogged(QString().sprintf("\nExited with code: 0x%04X", process.exitCode()));
- if(bTimeout || bAborted || process.exitStatus() != QProcess::NormalExit || QFileInfo(outputFile).size() == 0)
+ if(bTimeout || bAborted || process.exitCode() != EXIT_SUCCESS || QFileInfo(outputFile).size() == 0)
{
return false;
}
emit statusUpdated(100);
emit messageLogged(QString().sprintf("\nExited with code: 0x%04X", process.exitCode()));
- if(bTimeout || bAborted || process.exitStatus() != QProcess::NormalExit || QFileInfo(outputFile).size() == 0)
+ if(bTimeout || bAborted || process.exitCode() != EXIT_SUCCESS || QFileInfo(outputFile).size() == 0)
{
return false;
}
emit statusUpdated(100);
emit messageLogged(QString().sprintf("\nExited with code: 0x%04X", process.exitCode()));
- if(bTimeout || bAborted || process.exitStatus() != QProcess::NormalExit || QFileInfo(outputFile).size() == 0)
+ if(bTimeout || bAborted || process.exitCode() != EXIT_SUCCESS || QFileInfo(outputFile).size() == 0)
{
return false;
}
emit statusUpdated(100);
emit messageLogged(QString().sprintf("\nExited with code: 0x%04X", process.exitCode()));
- if(bTimeout || bAborted || process.exitStatus() != QProcess::NormalExit || QFileInfo(outputFile).size() == 0)
+ if(bTimeout || bAborted || process.exitCode() != EXIT_SUCCESS || QFileInfo(outputFile).size() == 0)
{
return false;
}
process.waitForFinished(-1);
}
- if(process.exitStatus() != QProcess::NormalExit || QFileInfo(output).size() == 0)
+ if(process.exitCode() != EXIT_SUCCESS || QFileInfo(output).size() == 0)
{
qWarning("Splitting has failed !!!");
m_nTracksSkipped++;
#include "Filter_Abstract.h"
#include "Filter_Downmix.h"
#include "Filter_Resample.h"
+#include "Tool_WaveProperties.h"
#include "Registry_Decoder.h"
#include "Model_Settings.h"
m_jobId(QUuid::createUuid()),
m_prependRelativeSourcePath(prependRelativeSourcePath),
m_renamePattern("<BaseName>"),
- m_aborted(false)
+ m_aborted(false),
+ m_propDetect(new WaveProperties())
{
if(m_mutex_genFileName)
{
connect(m_encoder, SIGNAL(statusUpdated(int)), this, SLOT(handleUpdate(int)), Qt::DirectConnection);
connect(m_encoder, SIGNAL(messageLogged(QString)), this, SLOT(handleMessage(QString)), Qt::DirectConnection);
+ connect(m_propDetect, SIGNAL(statusUpdated(int)), this, SLOT(handleUpdate(int)), Qt::DirectConnection);
+ connect(m_propDetect, SIGNAL(messageLogged(QString)), this, SLOT(handleMessage(QString)), Qt::DirectConnection);
+
m_currentStep = UnknownStep;
}
}
LAMEXP_DELETE(m_encoder);
+ LAMEXP_DELETE(m_propDetect);
}
////////////////////////////////////////////////////////////
QString sourceFile = m_audioFile.filePath();
+ //------------------
//Decode source file
+ //------------------
if(!m_filters.isEmpty() || !m_encoder->isFormatSupported(m_audioFile.formatContainerType(), m_audioFile.formatContainerProfile(), m_audioFile.formatAudioType(), m_audioFile.formatAudioProfile(), m_audioFile.formatAudioVersion()))
{
m_currentStep = DecodingStep;
emit processStateFinished(m_jobId, outFileName, false);
return;
}
- }
-
- //Check audio properties
- if(bSuccess)
- {
- //Do we need to take care of downsampling the input?
- if(m_encoder->supportedSamplerates())
- {
- insertDownsampleFilter();
- }
- //Do we need to change the bits per sample of the input?
- if(m_encoder->supportedBitdepths())
+ //Update audio properties after decode
+ if(bSuccess)
{
- insertBitdepthFilter();
- }
-
- //Do we need Stereo downmix?
- if(m_encoder->requiresDownmix())
- {
- insertDownmixFilter();
+ if(m_encoder->supportedSamplerates() || m_encoder->supportedBitdepths() || m_encoder->requiresDownmix())
+ {
+ m_currentStep = AnalyzeStep;
+ bSuccess = m_propDetect->detect(sourceFile, &m_audioFile, &m_aborted);
+
+ if(bSuccess)
+ {
+ handleMessage("\n-------------------------------\n");
+
+ //Do we need to take care of downsampling the input?
+ if(m_encoder->supportedSamplerates())
+ {
+ insertDownsampleFilter();
+ }
+
+ //Do we need to change the bits per sample of the input?
+ if(m_encoder->supportedBitdepths())
+ {
+ insertBitdepthFilter();
+ }
+
+ //Do we need Stereo downmix?
+ if(m_encoder->requiresDownmix())
+ {
+ insertDownmixFilter();
+ }
+ }
+ }
}
}
+ //-----------------------
//Apply all audio filters
+ //-----------------------
if(bSuccess)
{
while(!m_filters.isEmpty())
}
}
+ //-----------------
//Encode audio file
+ //-----------------
if(bSuccess)
{
m_currentStep = EncodingStep;
case EncodingStep:
emit processStateChanged(m_jobId, QString("%1 (%2%)").arg(tr("Encoding"), QString::number(progress)), ProgressModel::JobRunning);
break;
+ case AnalyzeStep:
+ emit processStateChanged(m_jobId, QString("%1 (%2%)").arg(tr("Analyzing"), QString::number(progress)), ProgressModel::JobRunning);
+ break;
case FilteringStep:
emit processStateChanged(m_jobId, QString("%1 (%2%)").arg(tr("Filtering"), QString::number(progress)), ProgressModel::JobRunning);
break;
class QMutex;
class AbstractFilter;
+class WaveProperties;
class ProcessThread: public QThread
{
enum ProcessStep
{
DecodingStep = 0,
- FilteringStep = 1,
- EncodingStep = 2,
- UnknownStep = 3
+ AnalyzeStep = 1,
+ FilteringStep = 2,
+ EncodingStep = 3,
+ UnknownStep = 4
};
void processFile();
const bool m_prependRelativeSourcePath;
QList<AbstractFilter*> m_filters;
QString m_renamePattern;
+ WaveProperties *m_propDetect;
static QMutex *m_mutex_genFileName;
};
--- /dev/null
+///////////////////////////////////////////////////////////////////////////////
+// LameXP - Audio Encoder Front-End
+// Copyright (C) 2004-2011 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
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this program; if not, write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+//
+// http://www.gnu.org/licenses/gpl-2.0.txt
+///////////////////////////////////////////////////////////////////////////////
+
+#include "Tool_WaveProperties.h"
+
+#include "Global.h"
+#include "Model_AudioFile.h"
+
+#include <QProcess>
+
+WaveProperties::WaveProperties(void)
+:
+ m_binary(lamexp_lookup_tool("sox.exe"))
+{
+ if(m_binary.isEmpty())
+ {
+ throw "Error initializing MP3 encoder. Tool 'lame.exe' is not registred!";
+ }
+}
+
+WaveProperties::~WaveProperties(void)
+{
+}
+
+bool WaveProperties::detect(const QString &sourceFile, AudioFileModel *info, volatile bool *abortFlag)
+{
+ QProcess process;
+ QStringList args;
+
+ args << "--i" << sourceFile;
+
+ if(!startProcess(process, m_binary, args))
+ {
+ return false;
+ }
+
+ bool bTimeout = false;
+ bool bAborted = false;
+
+ int progress = 0;
+
+ QRegExp regExp_precision("Precision\\s*:\\s*(\\d+)-bit", Qt::CaseInsensitive);
+ QRegExp regExp_samplerate("Sample Rate\\s*:\\s*(\\d+)", Qt::CaseInsensitive);
+ QRegExp regExp_duration("Duration\\s*:\\s*(\\d\\d):(\\d\\d):(\\d\\d)\\.(\\d\\d)", Qt::CaseInsensitive);
+ QRegExp regExp_channels("Channels\\s*:\\s*(\\d+)", Qt::CaseInsensitive);
+
+ while(process.state() != QProcess::NotRunning)
+ {
+ if(*abortFlag)
+ {
+ process.kill();
+ bAborted = true;
+ emit messageLogged("\nABORTED BY USER !!!");
+ break;
+ }
+ process.waitForReadyRead(m_processTimeoutInterval);
+ if(!process.bytesAvailable() && process.state() == QProcess::Running)
+ {
+ process.kill();
+ qWarning("SoX process timed out <-- killing!");
+ emit messageLogged("\nPROCESS TIMEOUT !!!");
+ bTimeout = true;
+ break;
+ }
+ while(process.bytesAvailable() > 0)
+ {
+ QByteArray line = process.readLine();
+ QString text = QString::fromUtf8(line.constData()).simplified();
+ if(regExp_precision.lastIndexIn(text) >= 0)
+ {
+ bool ok = false;
+ unsigned int tmp = regExp_precision.cap(1).toUInt(&ok);
+ if(ok) info->setFormatAudioBitdepth(tmp);
+ emit statusUpdated(qMin(progress += 25, 100));
+ }
+ if(regExp_samplerate.lastIndexIn(text) >= 0)
+ {
+ bool ok = false;
+ unsigned int tmp = regExp_samplerate.cap(1).toUInt(&ok);
+ if(ok) info->setFormatAudioSamplerate(tmp);
+ emit statusUpdated(qMin(progress += 25, 100));
+ }
+ if(regExp_duration.lastIndexIn(text) >= 0)
+ {
+ bool ok[4] = {false, false, false, false};
+ unsigned int tmp1 = regExp_duration.cap(1).toUInt(&ok[0]);
+ unsigned int tmp2 = regExp_duration.cap(2).toUInt(&ok[1]);
+ unsigned int tmp3 = regExp_duration.cap(3).toUInt(&ok[2]);
+ unsigned int tmp4 = regExp_duration.cap(4).toUInt(&ok[3]);
+ if(ok[0] && ok[1] && ok[2] && ok[3])
+ {
+ info->setFileDuration((tmp1 * 3600) + (tmp2 * 60) + tmp3 + qRound(static_cast<double>(tmp4) / 100.0));
+ }
+ emit statusUpdated(qMin(progress += 25, 100));
+ }
+ if(regExp_channels.lastIndexIn(text) >= 0)
+ {
+ bool ok = false;
+ unsigned int tmp = regExp_channels.cap(1).toUInt(&ok);
+ if(ok) info->setFormatAudioChannels(tmp);
+ emit statusUpdated(qMin(progress += 25, 100));
+ }
+ if(!text.isEmpty())
+ {
+ emit messageLogged(text);
+ }
+ }
+ }
+
+ process.waitForFinished();
+ if(process.state() != QProcess::NotRunning)
+ {
+ process.kill();
+ process.waitForFinished(-1);
+ }
+
+ emit statusUpdated(100);
+ emit messageLogged(QString().sprintf("\nExited with code: 0x%04X", process.exitCode()));
+
+ if(bTimeout || bAborted || process.exitCode() != EXIT_SUCCESS)
+ {
+ return false;
+ }
+
+ return true;
+}
--- /dev/null
+///////////////////////////////////////////////////////////////////////////////
+// LameXP - Audio Encoder Front-End
+// Copyright (C) 2004-2011 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
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this program; if not, write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+//
+// http://www.gnu.org/licenses/gpl-2.0.txt
+///////////////////////////////////////////////////////////////////////////////
+#pragma once
+
+#include "Tool_Abstract.h"
+
+class AudioFileModel;
+
+class WaveProperties : public AbstractTool
+{
+ Q_OBJECT
+
+public:
+ WaveProperties(void);
+ ~WaveProperties(void);
+
+ bool detect(const QString &sourceFile, AudioFileModel *info, volatile bool *abortFlag);
+
+private:
+ const QString m_binary;
+};