MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / stop

Method stop

platform/linuxbsd/tts_linux.cpp:258–275  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

256}
257
258void TTS_Linux::stop() {
259 _THREAD_SAFE_METHOD_
260
261 ERR_FAIL_NULL(synth);
262 for (DisplayServer::TTSUtterance &message : queue) {
263 DisplayServer::get_singleton()->tts_post_utterance_event(DisplayServer::TTS_UTTERANCE_CANCELED, message.id);
264 }
265 if ((last_msg_id != -1) && ids.has(last_msg_id)) {
266 DisplayServer::get_singleton()->tts_post_utterance_event(DisplayServer::TTS_UTTERANCE_CANCELED, ids[last_msg_id]);
267 }
268 queue.clear();
269 ids.clear();
270 last_msg_id = -1;
271 spd_cancel(synth);
272 spd_resume(synth);
273 speaking = false;
274 paused = false;
275}
276
277TTS_Linux *TTS_Linux::get_singleton() {
278 return singleton;

Callers 2

tts_stopMethod · 0.45
tts_stopMethod · 0.45

Calls 3

hasMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected