mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-06 02:10:28 +00:00
GUI: U32: Enable u32 for tts (Linux)
This commit is contained in:
parent
ef7ec444d3
commit
bcbe2fe2ea
@ -177,7 +177,7 @@ void SpeechDispatcherManager::updateState(SpeechDispatcherManager::SpeechEvent e
|
||||
}
|
||||
}
|
||||
|
||||
bool SpeechDispatcherManager::say(Common::String str, Action action, Common::String charset) {
|
||||
bool SpeechDispatcherManager::say(const Common::U32String &str, Action action, Common::String charset) {
|
||||
|
||||
pthread_mutex_lock(&_speechMutex);
|
||||
// reinitialize if needed
|
||||
@ -202,7 +202,9 @@ bool SpeechDispatcherManager::say(Common::String str, Action action, Common::Str
|
||||
#endif
|
||||
}
|
||||
|
||||
char *tmpStr = Common::Encoding::convert("UTF-8", charset, str.c_str(), str.size());
|
||||
Common::String strToSpeak = str.encode();
|
||||
|
||||
char *tmpStr = Common::Encoding::convert("UTF-8", charset, strToSpeak.c_str(), strToSpeak.size());
|
||||
if (tmpStr == nullptr) {
|
||||
warning("Cannot convert from %s encoding for text to speech", charset.c_str());
|
||||
pthread_mutex_unlock(&_speechMutex);
|
||||
|
@ -29,6 +29,7 @@
|
||||
|
||||
#include "common/text-to-speech.h"
|
||||
#include "common/str.h"
|
||||
#include "common/ustr.h"
|
||||
#include "common/list.h"
|
||||
#include "common/mutex.h"
|
||||
|
||||
@ -59,7 +60,7 @@ public:
|
||||
SpeechDispatcherManager();
|
||||
virtual ~SpeechDispatcherManager() override;
|
||||
|
||||
virtual bool say(Common::String str, Action action, Common::String charset = "") override;
|
||||
virtual bool say(const Common::U32String &str, Action action, Common::String charset = "") override;
|
||||
|
||||
virtual bool stop() override;
|
||||
virtual bool pause() override;
|
||||
|
Loading…
x
Reference in New Issue
Block a user