Make utterance_id 64-bit.

This commit is contained in:
Pāvels Nadtočajevs 2025-11-03 23:25:29 +02:00
parent cb3af5afff
commit 281c74550a
No known key found for this signature in database
GPG key ID: 8413210218EF35D2
34 changed files with 69 additions and 63 deletions

View file

@ -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();
}

View file

@ -543,7 +543,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;

View file

@ -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();

View file

@ -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();