summaryrefslogtreecommitdiff
path: root/plugins/WinterSpeak/src
diff options
context:
space:
mode:
authorPhilip Schell <github.com@blubbfish.net>2013-10-23 09:37:13 +0000
committerPhilip Schell <github.com@blubbfish.net>2013-10-23 09:37:13 +0000
commita468f96858c1b42a53fec2d83f3dccff626aa5f8 (patch)
treedefd4e5ccf0ea93bff3060819e1a60bf1c651db0 /plugins/WinterSpeak/src
parentde4b08bdcecc2de27bc4d39f6c24189bca3009a3 (diff)
Bugfix in WinterSpeak with SAPI4 Voice
git-svn-id: http://svn.miranda-ng.org/main/trunk@6598 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/WinterSpeak/src')
-rw-r--r--plugins/WinterSpeak/src/SpeechApi40a.cpp13
-rw-r--r--plugins/WinterSpeak/src/Version.h2
2 files changed, 7 insertions, 8 deletions
diff --git a/plugins/WinterSpeak/src/SpeechApi40a.cpp b/plugins/WinterSpeak/src/SpeechApi40a.cpp
index ab15e3e6bc..5e6bbebe2c 100644
--- a/plugins/WinterSpeak/src/SpeechApi40a.cpp
+++ b/plugins/WinterSpeak/src/SpeechApi40a.cpp
@@ -57,7 +57,6 @@ bool SpeechApi40a::load()
{
return true;
}
-
return loadWithVoice(std::wstring(m_voice));
}
@@ -77,7 +76,6 @@ bool SpeechApi40a::unload()
}
m_state = TextToSpeech::State_Unloaded;
-
return true;
}
@@ -90,7 +88,8 @@ bool SpeechApi40a::isLoaded() const
//------------------------------------------------------------------------------
bool SpeechApi40a::say(const std::wstring &sentence)
{
- std::string text = mir_t2a_cp(sentence.c_str(), CP_UTF8);
+ //std::string text = mir_t2a_cp(sentence.c_str(), CP_ACP);
+ //MessageBoxA(NULL, text.c_str(), "TTS4", MB_OK);
bool ret = true;
if (!isLoaded())
@@ -100,8 +99,8 @@ bool SpeechApi40a::say(const std::wstring &sentence)
else
{
SDATA data;
- data.dwSize = (DWORD)text.size();
- data.pData = (char *)text.c_str();
+ data.dwSize = (DWORD)(sentence.size() * sizeof(WCHAR));
+ data.pData = (WCHAR *)sentence.c_str();
m_tts_central->TextData(CHARSET_TEXT, 0, data, NULL, IID_ITTSBufNotifySinkA);
}
@@ -175,7 +174,7 @@ bool SpeechApi40a::setVoice(const std::wstring &voice)
std::vector<std::wstring> SpeechApi40a::getVoices() const
{
std::vector<std::wstring> ret;
-
+
PITTSENUM pITTSEnum = NULL;
TTSMODEINFO inf;
@@ -222,7 +221,7 @@ std::wstring SpeechApi40a::getDescription()
bool SpeechApi40a::loadWithVoice(std::wstring &voice)
{
CoInitialize(NULL);
-
+
PITTSENUM pITTSEnum;
TTSMODEINFO inf;
LPUNKNOWN pAudioDest;
diff --git a/plugins/WinterSpeak/src/Version.h b/plugins/WinterSpeak/src/Version.h
index 22152c74d0..413358c17d 100644
--- a/plugins/WinterSpeak/src/Version.h
+++ b/plugins/WinterSpeak/src/Version.h
@@ -1,7 +1,7 @@
#define __MAJOR_VERSION 0
#define __MINOR_VERSION 9
#define __RELEASE_NUM 8
-#define __BUILD_NUM 2
+#define __BUILD_NUM 3
#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM