[PATCH v5 8/9] windows.media.speech: Return IAsyncOperation from synthesizer_SynthesizeSsmlToStreamAsync.
Bernhard Kölbl
wine at gitlab.winehq.org
Tue Jun 14 05:08:25 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 | 16 +++++++---------
2 files changed, 14 insertions(+), 10 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 df5341d3142..6d0b09f3ebf 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,28 +997,27 @@ 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);
+ ok(hr == S_OK || broken(hr == E_INVALIDARG), "ISpeechSynthesizer_SynthesizeSsmlToStreamAsync failed, hr %#lx\n", hr);
if (hr == S_OK)
{
- todo_wine ok(!!operation_ss_stream, "operation_ss_stream had value %p.\n", operation_ss_stream);
+ ok(!!operation_ss_stream, "operation_ss_stream had value %p.\n", operation_ss_stream);
IAsyncOperation_SpeechSynthesisStream_Release(operation_ss_stream);
}
- else todo_wine ok(operation_ss_stream == NULL, "operation_ss_stream had value %p.\n", operation_ss_stream);
+ else ok(operation_ss_stream == NULL, "operation_ss_stream had value %p.\n", 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);
+ ok(hr == S_OK || broken(hr == SPERR_WINRT_INCORRECT_FORMAT), "ISpeechSynthesizer_SynthesizeSsmlToStreamAsync failed, hr %#lx\n", hr);
if (hr == S_OK)
{
- todo_wine ok(!!operation_ss_stream, "operation_ss_stream had value %p.\n", operation_ss_stream);
+ ok(!!operation_ss_stream, "operation_ss_stream had value %p.\n", operation_ss_stream);
IAsyncOperation_SpeechSynthesisStream_Release(operation_ss_stream);
}
- else todo_wine ok(operation_ss_stream == NULL, "operation_ss_stream had value %p.\n", operation_ss_stream);
+ else ok(operation_ss_stream == NULL, "operation_ss_stream had value %p.\n", operation_ss_stream);
-skip_ss_stream:
WindowsDeleteString(str2);
WindowsDeleteString(str);
--
GitLab
https://gitlab.winehq.org/wine/wine/-/merge_requests/217
More information about the wine-devel
mailing list