OSDN Git Service

Updated French translation. Thanks to to Dodich Informatique <dodich@live.fr>.
[lamexp/LameXP.git] / src / Decoder_Shorten.cpp
index a539a02..1e98f19 100644 (file)
@@ -1,6 +1,6 @@
 ///////////////////////////////////////////////////////////////////////////////
 // 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
@@ -34,7 +34,7 @@ ShortenDecoder::ShortenDecoder(void)
 {
        if(m_binary.isEmpty())
        {
-               throw "Error initializing WavPack decoder. Tool 'shorten.exe' is not registred!";
+               throw "Error initializing Shorten decoder. Tool 'shorten.exe' is not registred!";
        }
 }
 
@@ -71,11 +71,12 @@ bool ShortenDecoder::decode(const QString &sourceFile, const QString &outputFile
                        emit messageLogged("\nABORTED BY USER !!!");
                        break;
                }
-               process.waitForReadyRead(180000);
+               process.waitForReadyRead(m_processTimeoutInterval);
                if(!process.bytesAvailable() && process.state() == QProcess::Running)
                {
                        process.kill();
-                       qWarning("MpcDec process timed out <-- killing!");
+                       qWarning("Shorten process timed out <-- killing!");
+                       emit messageLogged("\nPROCESS TIMEOUT !!!");
                        bTimeout = true;
                        break;
                }
@@ -100,7 +101,7 @@ bool ShortenDecoder::decode(const QString &sourceFile, const QString &outputFile
        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;
        }