summaryrefslogtreecommitdiff
path: root/rbutil/rbutilqt/base/talkgenerator.h
diff options
context:
space:
mode:
Diffstat (limited to 'rbutil/rbutilqt/base/talkgenerator.h')
-rw-r--r--rbutil/rbutilqt/base/talkgenerator.h27
1 files changed, 25 insertions, 2 deletions
diff --git a/rbutil/rbutilqt/base/talkgenerator.h b/rbutil/rbutilqt/base/talkgenerator.h
index b139c1879b..cca196bc2e 100644
--- a/rbutil/rbutilqt/base/talkgenerator.h
+++ b/rbutil/rbutilqt/base/talkgenerator.h
@@ -49,14 +49,29 @@ public:
49 QString target; 49 QString target;
50 bool voiced; 50 bool voiced;
51 bool encoded; 51 bool encoded;
52
53 /* We need the following members because
54 * 1) the QtConcurrent entry points are all static methods (and we
55 * need to communicate with the TalkGenerator)
56 * 2) we are not guaranteed to go through the list in any
57 * particular order, so we can't use the progress slot
58 * for error checking */
59 struct
60 {
61 EncBase* encoder;
62 TTSBase* tts;
63 TalkGenerator* generator;
64 int wavtrim;
65 } refs;
52 }; 66 };
53 67
54 TalkGenerator(QObject* parent); 68 TalkGenerator(QObject* parent);
55
56 Status process(QList<TalkEntry>* list,int wavtrimth = -1); 69 Status process(QList<TalkEntry>* list,int wavtrimth = -1);
57 70
58public slots: 71public slots:
59 void abort(); 72 void abort();
73 void encProgress(int value);
74 void ttsProgress(int value);
60 75
61signals: 76signals:
62 void done(bool); 77 void done(bool);
@@ -64,13 +79,21 @@ signals:
64 void logProgress(int, int); //! set progress bar. 79 void logProgress(int, int); //! set progress bar.
65 80
66private: 81private:
82 QFutureWatcher<void> encFutureWatcher;
83 QFutureWatcher<void> ttsFutureWatcher;
84 void encFailEntry(const TalkEntry& entry);
85 void ttsFailEntry(const TalkEntry& entry, TTSStatus status, QString error);
86
67 Status voiceList(QList<TalkEntry>* list,int wavetrimth); 87 Status voiceList(QList<TalkEntry>* list,int wavetrimth);
68 Status encodeList(QList<TalkEntry>* list); 88 Status encodeList(QList<TalkEntry>* list);
69 89
90 static void encEntryPoint(TalkEntry& entry);
91 static void ttsEntryPoint(TalkEntry& entry);
92
70 TTSBase* m_tts; 93 TTSBase* m_tts;
71 EncBase* m_enc; 94 EncBase* m_enc;
72 95
73 bool m_abort; 96 bool m_ttsWarnings;
74}; 97};
75 98
76 99