[PATCH 5/6] windows.media.speech: Return IAsyncOperation from synthesizer_SynthesizeSsmlToStreamAsync.

Bernhard Kölbl wine at gitlab.winehq.org
Thu Jun 9 11:48:05 CDT 2022


From: Bernhard Kölbl <besentv at gmail.com>

Based on a patch by: Connor McAdams <cmcadams at codeweavers.com>

Signed-off-by: Bernhard Kölbl <besentv at gmail.com>
---
 dlls/windows.media.speech/synthesizer.c  | 8 +++++++-
 dlls/windows.media.speech/tests/speech.c | 6 +-----
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/dlls/windows.media.speech/synthesizer.c b/dlls/windows.media.speech/synthesizer.c
index 9275aa18c67..22f28433216 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
     return S_OK;
 }
 
+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;
+    async_operation_inspectable_create(&IID_ISpeechSynthesisStream, NULL, ssml_to_stream_operation, (IAsyncOperation_IInspectable **)operation);
+    return S_OK;
 }
 
 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 5a75098e107..726ff6b0f5b 100644
--- a/dlls/windows.media.speech/tests/speech.c
+++ b/dlls/windows.media.speech/tests/speech.c
@@ -954,9 +954,7 @@ static void test_SpeechSynthesizer(void)
     ok(hr == S_OK, "WindowsCreateString failed, hr %#lx\n", hr);
 
     hr = ISpeechSynthesizer_SynthesizeSsmlToStreamAsync(synthesizer, str, &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,
                              &IID_IAsyncOperationCompletedHandler_SpeechSynthesisStream);
@@ -973,8 +971,6 @@ static void test_SpeechSynthesizer(void)
     }
 
     IAsyncOperation_SpeechSynthesisStream_Release(operation_ss_stream);
-
-skip_ss_stream:
     WindowsDeleteString(str);
 
     hr = IInspectable_QueryInterface(inspectable, &IID_IClosable, (void **)&closable);
-- 
GitLab


https://gitlab.winehq.org/wine/wine/-/merge_requests/217



More information about the wine-devel mailing list