diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-02-21 11:14:52 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-02-21 11:14:52 +0100 |
commit | 662d0b188dc2bd6ca50ea0c3b3b9accb8255acfc (patch) | |
tree | 8dda9f356b48af88f8f53f44b70174321ca60563 /platform/linuxbsd/tts_linux.h | |
parent | 17121da9147e54ff30c95b89ebae275140a1fe77 (diff) | |
parent | 6e76a7fbd85eba67c7c1b02142bdfcefbc5d8279 (diff) | |
download | redot-engine-662d0b188dc2bd6ca50ea0c3b3b9accb8255acfc.tar.gz |
Merge pull request #73671 from bruvzg/linux_tts_lock
[Linux] Process TTS callback on the main thread to avoid speech-dispatcher deadlock.
Diffstat (limited to 'platform/linuxbsd/tts_linux.h')
-rw-r--r-- | platform/linuxbsd/tts_linux.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/platform/linuxbsd/tts_linux.h b/platform/linuxbsd/tts_linux.h index 3fe7b659d0..3fcbe3207b 100644 --- a/platform/linuxbsd/tts_linux.h +++ b/platform/linuxbsd/tts_linux.h @@ -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(); |