From 58087358d1038365c168772eeea9628f72c56df2 Mon Sep 17 00:00:00 2001 From: Shaun Ren Date: Fri, 16 Feb 2024 20:04:07 -0500 Subject: [PATCH] sapi: Implement ISpeechVoice::GetTypeInfoCount. --- dlls/sapi/tests/tts.c | 6 ++++++ dlls/sapi/tts.c | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/dlls/sapi/tests/tts.c b/dlls/sapi/tests/tts.c index 8f88d74b9ef..8f18934fce3 100644 --- a/dlls/sapi/tests/tts.c +++ b/dlls/sapi/tests/tts.c @@ -435,6 +435,7 @@ static void test_spvoice(void) ISpeechObjectTokens *speech_tokens; LONG count; BSTR req = NULL, opt = NULL; + UINT info_count; HRESULT hr; if (waveOutGetNumDevs() == 0) { @@ -713,6 +714,11 @@ static void test_spvoice(void) hr = ISpeechVoice_Speak(speech_voice, NULL, SVSFPurgeBeforeSpeak, NULL); ok(hr == S_OK, "got %#lx.\n", hr); + info_count = 0xdeadbeef; + hr = ISpeechVoice_GetTypeInfoCount(speech_voice, &info_count); + ok(hr == S_OK, "got %#lx.\n", hr); + ok(info_count == 1, "got %u.\n", info_count); + ISpeechVoice_Release(speech_voice); done: diff --git a/dlls/sapi/tts.c b/dlls/sapi/tts.c index 6fe01373e56..2493a2804f2 100644 --- a/dlls/sapi/tts.c +++ b/dlls/sapi/tts.c @@ -179,11 +179,11 @@ static ULONG WINAPI speech_voice_Release(ISpeechVoice *iface) return ref; } -static HRESULT WINAPI speech_voice_GetTypeInfoCount(ISpeechVoice *iface, UINT *info) +static HRESULT WINAPI speech_voice_GetTypeInfoCount(ISpeechVoice *iface, UINT *count) { - FIXME("(%p, %p): stub.\n", iface, info); - - return E_NOTIMPL; + TRACE("(%p, %p).\n", iface, count); + *count = 1; + return S_OK; } static HRESULT WINAPI speech_voice_GetTypeInfo(ISpeechVoice *iface, UINT info, LCID lcid,