From 820dcfdfed9f7df52bf0242b3409258dfe4d558f Mon Sep 17 00:00:00 2001 From: Dominik Riebeling Date: Sat, 14 Jan 2012 16:17:13 +0100 Subject: Remove multithreading support from voicefile creation. Running TTS and encoders with multiple threads is causing problems on Windows since introduction of the feature (FS#12106, FS#11994). The current implementation also makes wrong assumptions (having multiple threads talk to the SAPI script doesn't make it run faster since it's still one thread responsible for creation). Completely remove multithreading support for that for now -- a different implementation is necessary. Change-Id: Icafa223644efc370a09186ce28ac83c22902e0c0 --- rbutil/rbutilqt/base/talkgenerator.h | 31 +++++-------------------------- 1 file changed, 5 insertions(+), 26 deletions(-) (limited to 'rbutil/rbutilqt/base/talkgenerator.h') diff --git a/rbutil/rbutilqt/base/talkgenerator.h b/rbutil/rbutilqt/base/talkgenerator.h index 5fe036e2f1..3e2f9394fb 100644 --- a/rbutil/rbutilqt/base/talkgenerator.h +++ b/rbutil/rbutilqt/base/talkgenerator.h @@ -48,30 +48,15 @@ public: QString target; bool voiced; bool encoded; - - /* We need the following members because - * 1) the QtConcurrent entry points are all static methods (and we - * need to communicate with the TalkGenerator) - * 2) we are not guaranteed to go through the list in any - * particular order, so we can't use the progress slot - * for error checking */ - struct - { - EncoderBase* encoder; - TTSBase* tts; - TalkGenerator* generator; - int wavtrim; - } refs; }; TalkGenerator(QObject* parent); + Status process(QList* list,int wavtrimth = -1); QString correctString(QString s); public slots: void abort(); - void encProgress(int value); - void ttsProgress(int value); void setLang(QString name); signals: @@ -80,22 +65,12 @@ signals: void logProgress(int, int); //! set progress bar. private: - QFutureWatcher encFutureWatcher; - QFutureWatcher ttsFutureWatcher; - void encFailEntry(const TalkEntry& entry); - void ttsFailEntry(const TalkEntry& entry, TTSStatus status, QString error); - Status voiceList(QList* list,int wavetrimth); Status encodeList(QList* list); - static void encEntryPoint(TalkEntry& entry); - static void ttsEntryPoint(TalkEntry& entry); - TTSBase* m_tts; EncoderBase* m_enc; - bool m_ttsWarnings; - bool m_userAborted; QString m_lang; struct CorrectionItems @@ -105,6 +80,10 @@ private: QString modifier; }; QList m_corrections; + + bool m_abort; + + }; -- cgit v1.2.3