summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/talkfile.cpp
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2007-08-29 09:27:35 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2007-08-29 09:27:35 +0000
commit177716c2f9d2347b67fe763642a6aa2db27860bd (patch)
tree38e35582229eadcb1f946321587d710294d6cae3 /rbutil/rbutilqt/talkfile.cpp
parent9226ffd351aa74925d017d29a4ff33eb0ed56fae (diff)
downloadrockbox-177716c2f9d2347b67fe763642a6aa2db27860bd.tar.gz
rockbox-177716c2f9d2347b67fe763642a6aa2db27860bd.tar.bz2
rockbox-177716c2f9d2347b67fe763642a6aa2db27860bd.zip
code police.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14504 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/rbutilqt/talkfile.cpp')
-rw-r--r--rbutil/rbutilqt/talkfile.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/rbutil/rbutilqt/talkfile.cpp b/rbutil/rbutilqt/talkfile.cpp
index 77f5c3fd3f..dfe9485018 100644
--- a/rbutil/rbutilqt/talkfile.cpp
+++ b/rbutil/rbutilqt/talkfile.cpp
@@ -21,7 +21,7 @@
TalkFileCreator::TalkFileCreator(QObject* parent): QObject(parent)
{
-
+
}
@@ -54,7 +54,7 @@ bool TalkFileCreator::initTTS()
bool TalkFileCreator::createTalkFiles(ProgressloggerInterface* logger)
{
- m_abort = false;
+ m_abort = false;
m_logger = logger;
m_logger->addItem("Starting Talkfile generation",LOGINFO);
if(!initTTS())
@@ -77,21 +77,21 @@ bool TalkFileCreator::createTalkFiles(ProgressloggerInterface* logger)
// iterate over all entrys
while (it.hasNext())
{
- if(m_abort)
- {
- m_logger->addItem("Talkfile creation aborted",LOGERROR);
- return false;
- }
-
- QApplication::processEvents();
+ if(m_abort)
+ {
+ m_logger->addItem("Talkfile creation aborted",LOGERROR);
+ return false;
+ }
+
+ QApplication::processEvents();
QFileInfo fileInf = it.fileInfo();
QString toSpeak;
QString filename;
QString wavfilename;
if(fileInf.fileName() == "." || fileInf.fileName() == ".." || fileInf.suffix() == "talk")
- {
- it.next();
+ {
+ it.next();
continue;
}
if(fileInf.isDir()) // if it is a dir
@@ -158,35 +158,35 @@ bool TalkFileCreator::createTalkFiles(ProgressloggerInterface* logger)
void TalkFileCreator::abort()
{
- m_abort = true;
+ m_abort = true;
}
bool TalkFileCreator::voice(QString text,QString wavfile)
{
-
- QString execstring = m_curTTSTemplate;
-
- execstring.replace("%exe",m_TTSexec);
- execstring.replace("%options",m_TTSOpts);
- execstring.replace("%wavfile",wavfile);
- execstring.replace("%text",text);
-
- QProcess::execute(execstring);
- return true;
-
+
+ QString execstring = m_curTTSTemplate;
+
+ execstring.replace("%exe",m_TTSexec);
+ execstring.replace("%options",m_TTSOpts);
+ execstring.replace("%wavfile",wavfile);
+ execstring.replace("%text",text);
+
+ QProcess::execute(execstring);
+ return true;
+
}
bool TalkFileCreator::encode(QString input,QString output)
{
- QString execstring = m_curEncTemplate;
-
+ QString execstring = m_curEncTemplate;
+
execstring.replace("%exe",m_EncExec);
execstring.replace("%options",m_EncOpts);
execstring.replace("%input",input);
execstring.replace("%output",output);
-
- QProcess::execute(execstring);
- return true;
+
+ QProcess::execute(execstring);
+ return true;
}