summaryrefslogtreecommitdiff
path: root/plugins/WinterSpeak/src/SpeechApi40a.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/WinterSpeak/src/SpeechApi40a.cpp')
-rw-r--r--plugins/WinterSpeak/src/SpeechApi40a.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/plugins/WinterSpeak/src/SpeechApi40a.cpp b/plugins/WinterSpeak/src/SpeechApi40a.cpp
index 5be847dbac..7689cd39e4 100644
--- a/plugins/WinterSpeak/src/SpeechApi40a.cpp
+++ b/plugins/WinterSpeak/src/SpeechApi40a.cpp
@@ -218,7 +218,7 @@ std::wstring SpeechApi40a::getDescription()
//------------------------------------------------------------------------------
// private:
//------------------------------------------------------------------------------
-bool SpeechApi40a::loadWithVoice(std::wstring &voice)
+bool SpeechApi40a::loadWithVoice(const std::wstring &voice)
{
CoInitialize(NULL);
@@ -228,18 +228,12 @@ bool SpeechApi40a::loadWithVoice(std::wstring &voice)
// create the enumerator
if (FAILED(CoCreateInstance(CLSID_TTSEnumerator, NULL, CLSCTX_ALL, IID_ITTSEnum, (void**)&pITTSEnum)))
- {
return false;
- }
// iterate through the voices until we find the right one
while (!pITTSEnum->Next(1, &inf, NULL))
- {
if (inf.szModeName == voice)
- {
break;
- }
- }
if (FAILED(CoCreateInstance(CLSID_MMAudioDest, NULL, CLSCTX_ALL, IID_IAudioMultiMediaDevice, (void**)&pAudioDest)))
{