summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/base/ttssapi.cpp
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2012-01-17 20:18:47 +0100
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2012-01-17 20:19:59 +0100
commit633749ea61585940f8a003aab9c9db9afb96a030 (patch)
tree6435614861d6969657125f729c94b7823a431e24 /rbutil/rbutilqt/base/ttssapi.cpp
parent6e11289cc2478c2d7414399cb8a3b9ed1ce7a6c9 (diff)
downloadrockbox-633749ea61585940f8a003aab9c9db9afb96a030.tar.gz
rockbox-633749ea61585940f8a003aab9c9db9afb96a030.tar.bz2
rockbox-633749ea61585940f8a003aab9c9db9afb96a030.zip
TTS: check if created wav file exists.
Instead of simply assuming the wav file that is supposed to be created by the TTS engine check if the file actually exists and return an error if not. Change-Id: I9e4a85a061b44b48931614602683b1dfe7dfce67
Diffstat (limited to 'rbutil/rbutilqt/base/ttssapi.cpp')
-rw-r--r--rbutil/rbutilqt/base/ttssapi.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/rbutil/rbutilqt/base/ttssapi.cpp b/rbutil/rbutilqt/base/ttssapi.cpp
index b5e6a69624..4ca82a798b 100644
--- a/rbutil/rbutilqt/base/ttssapi.cpp
+++ b/rbutil/rbutilqt/base/ttssapi.cpp
@@ -233,6 +233,10 @@ TTSStatus TTSSapi::voice(QString text,QString wavfile, QString *errStr)
while( voicescript->readLine(temp,20) == 0)
QCoreApplication::processEvents();
+ if(!QFileInfo(wavfile).isFile()) {
+ qDebug() << "[TTSExes] output file does not exist:" << wavfile;
+ return FatalError;
+ }
return NoError;
}