mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +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
|
|
@ -301,7 +301,7 @@ TypedArray<Dictionary> DisplayServerWindows::tts_get_voices() const {
|
|||
return tts->get_voices();
|
||||
}
|
||||
|
||||
void DisplayServerWindows::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 DisplayServerWindows::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) {
|
||||
if (unlikely(!tts)) {
|
||||
initialize_tts();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -546,7 +546,7 @@ public:
|
|||
virtual bool tts_is_paused() const override;
|
||||
virtual TypedArray<Dictionary> tts_get_voices() const override;
|
||||
|
||||
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) override;
|
||||
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) override;
|
||||
virtual void tts_pause() override;
|
||||
virtual void tts_resume() override;
|
||||
virtual void tts_stop() override;
|
||||
|
|
|
|||
|
|
@ -186,7 +186,7 @@ Array TTS_Windows::get_voices() const {
|
|||
return list;
|
||||
}
|
||||
|
||||
void TTS_Windows::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 TTS_Windows::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) {
|
||||
ERR_FAIL_NULL(synth);
|
||||
if (p_interrupt) {
|
||||
stop();
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ class TTS_Windows {
|
|||
struct UTData {
|
||||
Char16String string;
|
||||
int offset;
|
||||
int id;
|
||||
int64_t id;
|
||||
};
|
||||
HashMap<uint32_t, UTData> ids;
|
||||
bool update_requested = false;
|
||||
|
|
@ -67,7 +67,7 @@ public:
|
|||
bool is_paused() const;
|
||||
Array get_voices() const;
|
||||
|
||||
void 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);
|
||||
void 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);
|
||||
void pause();
|
||||
void resume();
|
||||
void stop();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue