mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Merge pull request #112379 from bruvzg/tts64id
Make `utterance_id` 64-bit.
This commit is contained in:
commit
e46c2ea3fa
34 changed files with 69 additions and 63 deletions
|
|
@ -446,7 +446,7 @@ PackedStringArray DisplayServer::tts_get_voices_for_language(const String &p_lan
|
|||
return ret;
|
||||
}
|
||||
|
||||
void DisplayServer::tts_speak(const String &p_text, const String &p_voice, int p_volume, float p_pitch, float p_rate, int p_utterance_id, bool p_interrupt) {
|
||||
void DisplayServer::tts_speak(const String &p_text, const String &p_voice, int p_volume, float p_pitch, float p_rate, int64_t p_utterance_id, bool p_interrupt) {
|
||||
WARN_PRINT("TTS is not supported by this display server.");
|
||||
}
|
||||
|
||||
|
|
@ -459,7 +459,7 @@ void DisplayServer::tts_set_utterance_callback(TTSUtteranceEvent p_event, const
|
|||
utterance_callback[p_event] = p_callable;
|
||||
}
|
||||
|
||||
void DisplayServer::tts_post_utterance_event(TTSUtteranceEvent p_event, int p_id, int p_pos) {
|
||||
void DisplayServer::tts_post_utterance_event(TTSUtteranceEvent p_event, int64_t p_id, int p_pos) {
|
||||
ERR_FAIL_INDEX(p_event, DisplayServer::TTS_UTTERANCE_MAX);
|
||||
switch (p_event) {
|
||||
case DisplayServer::TTS_UTTERANCE_STARTED:
|
||||
|
|
|
|||
|
|
@ -240,7 +240,7 @@ public:
|
|||
int volume = 50;
|
||||
float pitch = 1.f;
|
||||
float rate = 1.f;
|
||||
int id = 0;
|
||||
int64_t id = 0;
|
||||
};
|
||||
|
||||
enum TTSUtteranceEvent {
|
||||
|
|
@ -260,13 +260,13 @@ public:
|
|||
virtual TypedArray<Dictionary> tts_get_voices() const;
|
||||
virtual PackedStringArray tts_get_voices_for_language(const String &p_language) const;
|
||||
|
||||
virtual void tts_speak(const String &p_text, const String &p_voice, int p_volume = 50, float p_pitch = 1.f, float p_rate = 1.f, int p_utterance_id = 0, bool p_interrupt = false);
|
||||
virtual void tts_speak(const String &p_text, const String &p_voice, int p_volume = 50, float p_pitch = 1.f, float p_rate = 1.f, int64_t p_utterance_id = 0, bool p_interrupt = false);
|
||||
virtual void tts_pause();
|
||||
virtual void tts_resume();
|
||||
virtual void tts_stop();
|
||||
|
||||
virtual void tts_set_utterance_callback(TTSUtteranceEvent p_event, const Callable &p_callable);
|
||||
virtual void tts_post_utterance_event(TTSUtteranceEvent p_event, int p_id, int p_pos = 0);
|
||||
virtual void tts_post_utterance_event(TTSUtteranceEvent p_event, int64_t p_id, int p_pos = 0);
|
||||
|
||||
virtual bool is_dark_mode_supported() const { return false; }
|
||||
virtual bool is_dark_mode() const { return false; }
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@ public:
|
|||
bool tts_is_speaking() const override { return false; }
|
||||
bool tts_is_paused() const override { return false; }
|
||||
TypedArray<Dictionary> tts_get_voices() const override { return TypedArray<Dictionary>(); }
|
||||
void tts_speak(const String &p_text, const String &p_voice, int p_volume = 50, float p_pitch = 1.0f, float p_rate = 1.0f, int p_utterance_id = 0, bool p_interrupt = false) override {}
|
||||
void tts_speak(const String &p_text, const String &p_voice, int p_volume = 50, float p_pitch = 1.0f, float p_rate = 1.0f, int64_t p_utterance_id = 0, bool p_interrupt = false) override {}
|
||||
void tts_pause() override {}
|
||||
void tts_resume() override {}
|
||||
void tts_stop() override {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue