[Scummvm-git-logs] scummvm master -> 835cb919e53c2e65d21431c0ff6f3a0a4de6185a

lotharsm mail at serra.me
Sun Aug 2 12:53:32 UTC 2020


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
835cb919e5 WIN32: Support using additional OneCore voices for text to speech


Commit: 835cb919e53c2e65d21431c0ff6f3a0a4de6185a
    https://github.com/scummvm/scummvm/commit/835cb919e53c2e65d21431c0ff6f3a0a4de6185a
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2020-08-02T14:53:27+02:00

Commit Message:
WIN32: Support using additional OneCore voices for text to speech

Changed paths:
    backends/text-to-speech/windows/windows-text-to-speech.cpp


diff --git a/backends/text-to-speech/windows/windows-text-to-speech.cpp b/backends/text-to-speech/windows/windows-text-to-speech.cpp
index 97f7777a74..534759d0c3 100644
--- a/backends/text-to-speech/windows/windows-text-to-speech.cpp
+++ b/backends/text-to-speech/windows/windows-text-to-speech.cpp
@@ -462,7 +462,11 @@ void WindowsTextToSpeechManager::updateVoices() {
 	ISpObjectTokenCategory *cpCategory;
 	HRESULT hr = CoCreateInstance(CLSID_SpObjectTokenCategory, NULL, CLSCTX_ALL, IID_ISpObjectTokenCategory, (void**)&cpCategory);
 	if (SUCCEEDED(hr)) {
-		hr = cpCategory->SetId(SPCAT_VOICES, FALSE);
+		hr = cpCategory->SetId(L"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech_OneCore\\Voices", FALSE);
+		if (!SUCCEEDED(hr)) {
+			hr = cpCategory->SetId(SPCAT_VOICES, FALSE);
+		}
+
 		if (SUCCEEDED(hr)) {
 			hr = cpCategory->EnumTokens(NULL, NULL, &cpEnum);
 		}




More information about the Scummvm-git-logs mailing list