From: Bernhard Kölbl besentv@gmail.com
Based on a patch by: Connor McAdams cmcadams@codeweavers.com
Signed-off-by: Bernhard Kölbl besentv@gmail.com --- dlls/windows.media.speech/synthesizer.c | 8 +++++++- dlls/windows.media.speech/tests/speech.c | 12 +++++------- 2 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/dlls/windows.media.speech/synthesizer.c b/dlls/windows.media.speech/synthesizer.c index 3a77fc62234..7e1d19cb4c1 100644 --- a/dlls/windows.media.speech/synthesizer.c +++ b/dlls/windows.media.speech/synthesizer.c @@ -254,11 +254,17 @@ static HRESULT WINAPI synthesizer_SynthesizeTextToStreamAsync( ISpeechSynthesize text_to_stream_operation, (IAsyncOperation_IInspectable **)operation); }
+static HRESULT CALLBACK ssml_to_stream_operation( IInspectable *invoker, IInspectable **result ) +{ + return S_OK; +} + static HRESULT WINAPI synthesizer_SynthesizeSsmlToStreamAsync( ISpeechSynthesizer *iface, HSTRING ssml, IAsyncOperation_SpeechSynthesisStream **operation ) { FIXME("iface %p, text %p, operation %p stub.\n", iface, ssml, operation); - return E_NOTIMPL; + return async_operation_inspectable_create(&IID_IAsyncOperation_SpeechSynthesisStream, NULL, + ssml_to_stream_operation, (IAsyncOperation_IInspectable **)operation); }
static HRESULT WINAPI synthesizer_put_Voice( ISpeechSynthesizer *iface, IVoiceInformation *value ) diff --git a/dlls/windows.media.speech/tests/speech.c b/dlls/windows.media.speech/tests/speech.c index 392a38c27e2..d74890d1617 100644 --- a/dlls/windows.media.speech/tests/speech.c +++ b/dlls/windows.media.speech/tests/speech.c @@ -971,8 +971,7 @@ static void test_SpeechSynthesizer(void) ok(hr == S_OK, "WindowsCreateString failed, hr %#lx\n", hr);
hr = ISpeechSynthesizer_SynthesizeSsmlToStreamAsync(synthesizer, str2, &operation_ss_stream); - todo_wine ok(hr == S_OK, "ISpeechSynthesizer_SynthesizeSsmlToStreamAsync failed, hr %#lx\n", hr); - if(FAILED(hr)) goto skip_ss_stream; + ok(hr == S_OK, "ISpeechSynthesizer_SynthesizeSsmlToStreamAsync failed, hr %#lx\n", hr);
await_async_inspectable((IAsyncOperation_IInspectable *)operation_ss_stream, &async_inspectable_handler, @@ -998,18 +997,17 @@ static void test_SpeechSynthesizer(void) operation_ss_stream = (void *)0xdeadbeef; hr = ISpeechSynthesizer_SynthesizeSsmlToStreamAsync(synthesizer, NULL, &operation_ss_stream); /* Broken on Win 8 + 8.1 */ - todo_wine ok(hr == S_OK || broken(hr == E_INVALIDARG), "ISpeechSynthesizer_SynthesizeSsmlToStreamAsync failed, hr %#lx\n", hr); - todo_wine ok(!!operation_ss_stream || broken(operation_ss_stream == NULL), "operation_ss_stream had value %p.\n", operation_ss_stream); + ok(hr == S_OK || broken(hr == E_INVALIDARG), "ISpeechSynthesizer_SynthesizeSsmlToStreamAsync failed, hr %#lx\n", hr); + ok(!!operation_ss_stream || broken(operation_ss_stream == NULL), "operation_ss_stream had value %p.\n", operation_ss_stream); if (hr == S_OK) IAsyncOperation_SpeechSynthesisStream_Release(operation_ss_stream);
operation_ss_stream = (void *)0xdeadbeef; hr = ISpeechSynthesizer_SynthesizeSsmlToStreamAsync(synthesizer, str, &operation_ss_stream); /* Broken on Win 8 + 8.1 */ - todo_wine ok(hr == S_OK || broken(hr == SPERR_WINRT_INCORRECT_FORMAT), "ISpeechSynthesizer_SynthesizeSsmlToStreamAsync failed, hr %#lx\n", hr); - todo_wine ok(!!operation_ss_stream || broken(operation_ss_stream == NULL), "operation_ss_stream had value %p.\n", operation_ss_stream); + ok(hr == S_OK || broken(hr == SPERR_WINRT_INCORRECT_FORMAT), "ISpeechSynthesizer_SynthesizeSsmlToStreamAsync failed, hr %#lx\n", hr); + ok(!!operation_ss_stream || broken(operation_ss_stream == NULL), "operation_ss_stream had value %p.\n", operation_ss_stream); if (hr == S_OK) IAsyncOperation_SpeechSynthesisStream_Release(operation_ss_stream);
-skip_ss_stream: WindowsDeleteString(str2); WindowsDeleteString(str);