summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/base/ttssapi.cpp
diff options
context:
space:
mode:
authorDominik Wenger <domonoky@googlemail.com>2010-06-04 21:22:25 +0000
committerDominik Wenger <domonoky@googlemail.com>2010-06-04 21:22:25 +0000
commita8c1934c9d8d3618b78a2a15788f6d3cf5040ca4 (patch)
tree4d0b742e0cae5230529f9bdb933321f3b9336347 /rbutil/rbutilqt/base/ttssapi.cpp
parent081bda8ab258c763e654067740f365be68269340 (diff)
downloadrockbox-a8c1934c9d8d3618b78a2a15788f6d3cf5040ca4.tar.gz
rockbox-a8c1934c9d8d3618b78a2a15788f6d3cf5040ca4.tar.bz2
rockbox-a8c1934c9d8d3618b78a2a15788f6d3cf5040ca4.zip
rbutil: Make TTS and encoders run on all cores \n FS#11160 by Delyan Kratunov
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26558 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/rbutilqt/base/ttssapi.cpp')
-rw-r--r--rbutil/rbutilqt/base/ttssapi.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/rbutil/rbutilqt/base/ttssapi.cpp b/rbutil/rbutilqt/base/ttssapi.cpp
index 4f69de56ae..36ce16826f 100644
--- a/rbutil/rbutilqt/base/ttssapi.cpp
+++ b/rbutil/rbutilqt/base/ttssapi.cpp
@@ -30,6 +30,11 @@ TTSSapi::TTSSapi(QObject* parent) : TTSBase(parent)
m_sapi4 =false;
}
+TTSBase::Capabilities TTSSapi::capabilities()
+{
+ return None;
+}
+
void TTSSapi::generateSettings()
{
// language
@@ -195,13 +200,17 @@ TTSStatus TTSSapi::voice(QString text,QString wavfile, QString *errStr)
*voicestream << query;
*voicestream << "SYNC\tbla\r\n";
voicestream->flush();
- voicescript->waitForReadyRead();
+ char temp[20];
+
+ //we use this, because waitForReadyRead doesnt work from a different thread
+ while( voicescript->readLine(temp,20) == 0)
+ QCoreApplication::processEvents();
+
return NoError;
}
bool TTSSapi::stop()
{
-
*voicestream << "QUIT\r\n";
voicestream->flush();
voicescript->waitForFinished();