Skip to content

Commit

Permalink
sapi: Implement ISpeechVoice::GetTypeInfoCount.
Browse files Browse the repository at this point in the history
  • Loading branch information
shaunren authored and julliard committed Feb 20, 2024
1 parent 62aec03 commit 5808735
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions dlls/sapi/tests/tts.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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:
Expand Down
8 changes: 4 additions & 4 deletions dlls/sapi/tts.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 5808735

Please sign in to comment.