[Linux] Process TTS callback on the main thread to avoid speech-dispatcher deadlock.
This commit is contained in:
parent
6cde3fac32
commit
6e76a7fbd8
2 changed files with 81 additions and 62 deletions
|
|
@ -45,7 +45,8 @@
|
|||
#include <libspeechd.h>
|
||||
#endif
|
||||
|
||||
class TTS_Linux {
|
||||
class TTS_Linux : public Object {
|
||||
GDCLASS(TTS_Linux, Object);
|
||||
_THREAD_SAFE_CLASS_
|
||||
|
||||
List<DisplayServer::TTSUtterance> queue;
|
||||
|
|
@ -63,6 +64,11 @@ class TTS_Linux {
|
|||
|
||||
static TTS_Linux *singleton;
|
||||
|
||||
protected:
|
||||
static void _bind_methods();
|
||||
void _speech_event(size_t p_msg_id, size_t p_client_id, int p_type);
|
||||
void _speech_index_mark(size_t p_msg_id, size_t p_client_id, int p_type, const String &p_index_mark);
|
||||
|
||||
public:
|
||||
static TTS_Linux *get_singleton();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue