mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 21:59:17 +00:00
GLK: Add method that takes c-string text in Speech class
This commit is contained in:
parent
cbf6b6b6e6
commit
01f3ce620a
@ -169,7 +169,7 @@ void Speech::gli_tts_purge(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Speech::gli_tts_speak(const uint32 *buf, size_t len) {
|
void Speech::gli_tts_speak(const uint32 *buf, size_t len) {
|
||||||
debugC(1, kDebugSpeech, "gli_tts_speak");
|
debugC(1, kDebugSpeech, "gli_tts_speak(const uint32 *, size_t)");
|
||||||
if (_speechManager) {
|
if (_speechManager) {
|
||||||
for (int i = 0 ; i < len ; ++i, ++buf) {
|
for (int i = 0 ; i < len ; ++i, ++buf) {
|
||||||
// Should we automatically flush on new lines without waiting for the call to gli_tts_flush?
|
// Should we automatically flush on new lines without waiting for the call to gli_tts_flush?
|
||||||
@ -185,6 +185,23 @@ void Speech::gli_tts_speak(const uint32 *buf, size_t len) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Speech::gli_tts_speak(const char *buf, size_t len) {
|
||||||
|
debugC(1, kDebugSpeech, "gli_tts_speak(const char *, size_t)");
|
||||||
|
if (_speechManager) {
|
||||||
|
for (int i = 0 ; i < len ; ++i, ++buf) {
|
||||||
|
// Should we automatically flush on new lines without waiting for the call to gli_tts_flush?
|
||||||
|
// Should we also flush on '.', '?', and '!'?
|
||||||
|
//if (*buf == '\n') {
|
||||||
|
// debugC(1, kDebugSpeech, "Flushing SpeechManager buffer on new line");
|
||||||
|
// gli_tts_flush();
|
||||||
|
//} else {
|
||||||
|
_speechBuffer += (uint32)*buf;
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
//debugC(1, kDebugSpeech, "SpeechManager buffer: %s", _speechBuffer.encode().c_str());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Speech::gli_free_tts(void) {
|
void Speech::gli_free_tts(void) {
|
||||||
debugC(kDebugSpeech, "gli_free_tts");
|
debugC(kDebugSpeech, "gli_free_tts");
|
||||||
if (_speechManager) {
|
if (_speechManager) {
|
||||||
|
@ -75,6 +75,7 @@ protected:
|
|||||||
void gli_tts_purge(void);
|
void gli_tts_purge(void);
|
||||||
|
|
||||||
void gli_tts_speak(const uint32 *buf, size_t len);
|
void gli_tts_speak(const uint32 *buf, size_t len);
|
||||||
|
void gli_tts_speak(const char *buf, size_t len);
|
||||||
|
|
||||||
void gli_free_tts(void);
|
void gli_free_tts(void);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user