Wine-Devel
By thread
wine-devel@list.winehq.org
By month
Messages by month
- ----- 2026 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
June 2022
- 68 participants
- 3274 messages
Re: [PATCH 2/2] win32u: Return FALSE from ReplyMessage if it was replied already.
by Marvin
Hi,
While running your changed tests, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=116584
Your paranoid android.
=== w10pro64_ar (64 bit report) ===
user32:
msg.c:12861: Test failed: message time not advanced: 1655c 1655c
msg.c:12862: Test failed: coords not changed: (101 101) (101 101)
msg.c:12879: Test failed: message time not advanced: 1655c 1655c
msg.c:12880: Test failed: coords not changed: (101 101) (101 101)
June 9, 2022
Re: [PATCH v2 0/7] MR205: Add support for HRESULT and ID3DX10ThreadPump parameters in D3DX10GetImageInfo functions
by Matteo Bruni (@Mystral)
Matteo Bruni (@Mystral) commented about dlls/d3dx10_43/tests/d3dx10.c:
> + }while(0)
> +
> +#define CHECK_EXPECT(func) \
> + do { \
> + CHECK_EXPECT2(func); \
> + expect_ ## func = FALSE; \
> + }while(0)
> +
> +#define CHECK_CALLED(func) \
> + do { \
> + ok(called_ ## func, "expected " #func "\n"); \
> + expect_ ## func = called_ ## func = FALSE; \
> + }while(0)
> +
> +DEFINE_EXPECT(D3DX10ThreadPump_AddWorkItem);
> +
I'm not super thrilled by this kind of heavy macro usage, but I guess there's many more tests to come and I see that similar macros are used in many more places, so I'll shut up :sweat_smile:
Can you fix up the formatting please? I think we want to consistently have no spaces around the '##' operator and a space between the '}' and the while keyword.
Unfortunately I can't update your merge request myself at the moment (going to request access in a second) otherwise I'd have fixed it up myself, or at least dropped the final patch and approved the rest.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/205#note_1770
June 9, 2022
[PATCH v3 6/6] windows.media.speech: Add stub ISpeechSynthesisStream iface.
by Bernhard Kölbl
From: Bernhard Kölbl <besentv(a)gmail.com>
Based on a patch by: Connor McAdams <cmcadams(a)codeweavers.com>
Silences a warning about narrator being broken in Forza Horizon 5.
Signed-off-by: Bernhard Kölbl <besentv(a)gmail.com>
---
dlls/windows.media.speech/synthesizer.c | 126 ++++++++++++++++++++++-
dlls/windows.media.speech/tests/speech.c | 18 ++--
2 files changed, 128 insertions(+), 16 deletions(-)
diff --git a/dlls/windows.media.speech/synthesizer.c b/dlls/windows.media.speech/synthesizer.c
index 22f28433216..bf30dbf0847 100644
--- a/dlls/windows.media.speech/synthesizer.c
+++ b/dlls/windows.media.speech/synthesizer.c
@@ -146,6 +146,124 @@ static struct voice_information_vector all_voices =
0
};
+/*
+ *
+ * ISpeechSynthesisStream
+ *
+ */
+
+struct synthesis_stream
+{
+ ISpeechSynthesisStream ISpeechSynthesisStream_iface;
+ LONG ref;
+};
+
+static inline struct synthesis_stream *impl_from_ISpeechSynthesisStream( ISpeechSynthesisStream *iface )
+{
+ return CONTAINING_RECORD(iface, struct synthesis_stream, ISpeechSynthesisStream_iface);
+}
+
+HRESULT WINAPI synthesis_stream_QueryInterface( ISpeechSynthesisStream *iface, REFIID iid, void **out )
+{
+ struct synthesis_stream *impl = impl_from_ISpeechSynthesisStream(iface);
+
+ TRACE("iface %p, iid %s, out %p stub!\n", iface, debugstr_guid(iid), out);
+
+ if (IsEqualGUID(iid, &IID_IUnknown) ||
+ IsEqualGUID(iid, &IID_IInspectable) ||
+ IsEqualGUID(iid, &IID_IAgileObject) ||
+ IsEqualGUID(iid, &IID_ISpeechSynthesisStream))
+ {
+ IInspectable_AddRef((*out = &impl->ISpeechSynthesisStream_iface));
+ return S_OK;
+ }
+
+ FIXME("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid));
+ *out = NULL;
+ return E_NOINTERFACE;
+}
+
+ULONG WINAPI synthesis_stream_AddRef( ISpeechSynthesisStream *iface )
+{
+ struct synthesis_stream *impl = impl_from_ISpeechSynthesisStream(iface);
+ ULONG ref = InterlockedIncrement(&impl->ref);
+ TRACE("iface %p, ref %lu.\n", iface, ref);
+ return ref;
+}
+
+ULONG WINAPI synthesis_stream_Release( ISpeechSynthesisStream *iface )
+{
+ struct synthesis_stream *impl = impl_from_ISpeechSynthesisStream(iface);
+ ULONG ref = InterlockedDecrement(&impl->ref);
+
+ TRACE("iface %p, ref %lu.\n", iface, ref);
+
+ if (!ref)
+ free(impl);
+
+ return ref;
+}
+
+HRESULT WINAPI synthesis_stream_GetIids( ISpeechSynthesisStream *iface, ULONG *iid_count, IID **iids )
+{
+ FIXME("iface %p, iid_count %p, iids %p stub.\n", iface, iid_count, iids);
+ return E_NOTIMPL;
+}
+
+HRESULT WINAPI synthesis_stream_GetRuntimeClassName( ISpeechSynthesisStream *iface, HSTRING *class_name )
+{
+ FIXME("iface %p, class_name %p stub.\n", iface, class_name);
+ return E_NOTIMPL;
+}
+
+HRESULT WINAPI synthesis_stream_GetTrustLevel( ISpeechSynthesisStream *iface, TrustLevel *trust_level )
+{
+ FIXME("iface %p, trust_level %p stub.\n", iface, trust_level);
+ return E_NOTIMPL;
+}
+
+HRESULT WINAPI synthesis_stream_get_Markers( ISpeechSynthesisStream *iface, IVectorView_IMediaMarker **value )
+{
+ FIXME("iface %p, value %p stub!\n", iface, value);
+ *value = NULL;
+ return S_OK;
+}
+
+static const struct ISpeechSynthesisStreamVtbl synthesis_stream_vtbl =
+{
+ /* IUnknown methods */
+ synthesis_stream_QueryInterface,
+ synthesis_stream_AddRef,
+ synthesis_stream_Release,
+ /* IInspectable methods */
+ synthesis_stream_GetIids,
+ synthesis_stream_GetRuntimeClassName,
+ synthesis_stream_GetTrustLevel,
+ /* ISpeechSynthesisStream methods */
+ synthesis_stream_get_Markers
+};
+
+
+static HRESULT synthesis_stream_create( ISpeechSynthesisStream **out )
+{
+ struct synthesis_stream *impl;
+
+ TRACE("out %p.\n", out);
+
+ if (!(impl = calloc(1, sizeof(*impl))))
+ {
+ *out = NULL;
+ return E_OUTOFMEMORY;
+ }
+
+ impl->ISpeechSynthesisStream_iface.lpVtbl = &synthesis_stream_vtbl;
+ impl->ref = 1;
+
+ TRACE("created ISpeechSynthesisStream %p.\n", impl);
+ *out = &impl->ISpeechSynthesisStream_iface;
+ return S_OK;
+}
+
/*
*
* SpeechSynthesizer runtimeclass
@@ -243,26 +361,26 @@ static HRESULT WINAPI synthesizer_GetTrustLevel( ISpeechSynthesizer *iface, Trus
static HRESULT CALLBACK text_to_stream_operation( IInspectable *invoker, IInspectable **result )
{
- return S_OK;
+ return synthesis_stream_create((ISpeechSynthesisStream **)result);
}
static HRESULT WINAPI synthesizer_SynthesizeTextToStreamAsync( ISpeechSynthesizer *iface, HSTRING text,
IAsyncOperation_SpeechSynthesisStream **operation )
{
- FIXME("iface %p, text %p, operation %p stub.\n", iface, text, operation);
+ TRACE("iface %p, text %p, operation %p.\n", iface, text, operation);
async_operation_inspectable_create(&IID_ISpeechSynthesisStream, NULL, text_to_stream_operation, (IAsyncOperation_IInspectable **)operation);
return S_OK;
}
static HRESULT CALLBACK ssml_to_stream_operation( IInspectable *invoker, IInspectable **result )
{
- return S_OK;
+ return synthesis_stream_create((ISpeechSynthesisStream **)result);
}
static HRESULT WINAPI synthesizer_SynthesizeSsmlToStreamAsync( ISpeechSynthesizer *iface, HSTRING ssml,
IAsyncOperation_SpeechSynthesisStream **operation )
{
- FIXME("iface %p, text %p, operation %p stub.\n", iface, ssml, operation);
+ TRACE("iface %p, text %p, operation %p.\n", iface, ssml, operation);
async_operation_inspectable_create(&IID_ISpeechSynthesisStream, NULL, ssml_to_stream_operation, (IAsyncOperation_IInspectable **)operation);
return S_OK;
}
diff --git a/dlls/windows.media.speech/tests/speech.c b/dlls/windows.media.speech/tests/speech.c
index 4dd1fd7d14c..2db216e07e2 100644
--- a/dlls/windows.media.speech/tests/speech.c
+++ b/dlls/windows.media.speech/tests/speech.c
@@ -939,13 +939,10 @@ static void test_SpeechSynthesizer(void)
check_interface(operation_ss_stream, &IID_IAgileObject, TRUE);
hr = IAsyncOperation_SpeechSynthesisStream_GetResults(operation_ss_stream, &ss_stream);
- todo_wine ok(hr == S_OK, "IAsyncOperation_SpeechSynthesisStream_GetResults failed, hr %#lx\n", hr);
+ ok(hr == S_OK, "IAsyncOperation_SpeechSynthesisStream_GetResults failed, hr %#lx\n", hr);
- if (hr == S_OK && ss_stream)
- {
- ref = ISpeechSynthesisStream_Release(ss_stream);
- todo_wine ok(ref == 0, "Got unexpected ref %lu.\n", ref);
- }
+ ref = ISpeechSynthesisStream_Release(ss_stream);
+ ok(ref == 0, "Got unexpected ref %lu.\n", ref);
IAsyncOperation_SpeechSynthesisStream_Release(operation_ss_stream);
WindowsDeleteString(str);
@@ -963,13 +960,10 @@ static void test_SpeechSynthesizer(void)
check_interface(operation_ss_stream, &IID_IAgileObject, TRUE);
hr = IAsyncOperation_SpeechSynthesisStream_GetResults(operation_ss_stream, &ss_stream);
- todo_wine ok(hr == S_OK, "IAsyncOperation_SpeechSynthesisStream_GetResults failed, hr %#lx\n", hr);
+ ok(hr == S_OK, "IAsyncOperation_SpeechSynthesisStream_GetResults failed, hr %#lx\n", hr);
- if (hr == S_OK && ss_stream)
- {
- ref = ISpeechSynthesisStream_Release(ss_stream);
- ok(ref == 0, "Got unexpected ref %lu.\n", ref);
- }
+ ref = ISpeechSynthesisStream_Release(ss_stream);
+ ok(ref == 0, "Got unexpected ref %lu.\n", ref);
IAsyncOperation_SpeechSynthesisStream_Release(operation_ss_stream);
WindowsDeleteString(str);
--
GitLab
https://gitlab.winehq.org/wine/wine/-/merge_requests/217
June 9, 2022
[PATCH v3 5/6] windows.media.speech: Return IAsyncOperation from synthesizer_SynthesizeSsmlToStreamAsync.
by Bernhard Kölbl
From: Bernhard Kölbl <besentv(a)gmail.com>
Based on a patch by: Connor McAdams <cmcadams(a)codeweavers.com>
Signed-off-by: Bernhard Kölbl <besentv(a)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 8c584264fee..4dd1fd7d14c 100644
--- a/dlls/windows.media.speech/tests/speech.c
+++ b/dlls/windows.media.speech/tests/speech.c
@@ -955,9 +955,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);
@@ -974,8 +972,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
June 9, 2022
[PATCH v3 4/6] windows.media.speech: Return IAsyncOperation from synthesizer_SynthesizeTextToStreamAsync.
by Bernhard Kölbl
From: Bernhard Kölbl <besentv(a)gmail.com>
Based on a patch by: Connor McAdams <cmcadams(a)codeweavers.com>
Signed-off-by: Bernhard Kölbl <besentv(a)gmail.com>
---
dlls/windows.media.speech/synthesizer.c | 8 +++++++-
dlls/windows.media.speech/tests/speech.c | 6 +++---
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/dlls/windows.media.speech/synthesizer.c b/dlls/windows.media.speech/synthesizer.c
index e8c9f0a280d..9275aa18c67 100644
--- a/dlls/windows.media.speech/synthesizer.c
+++ b/dlls/windows.media.speech/synthesizer.c
@@ -241,11 +241,17 @@ static HRESULT WINAPI synthesizer_GetTrustLevel( ISpeechSynthesizer *iface, Trus
return E_NOTIMPL;
}
+static HRESULT CALLBACK text_to_stream_operation( IInspectable *invoker, IInspectable **result )
+{
+ return S_OK;
+}
+
static HRESULT WINAPI synthesizer_SynthesizeTextToStreamAsync( ISpeechSynthesizer *iface, HSTRING text,
IAsyncOperation_SpeechSynthesisStream **operation )
{
FIXME("iface %p, text %p, operation %p stub.\n", iface, text, operation);
- return E_NOTIMPL;
+ async_operation_inspectable_create(&IID_ISpeechSynthesisStream, NULL, text_to_stream_operation, (IAsyncOperation_IInspectable **)operation);
+ return S_OK;
}
static HRESULT WINAPI synthesizer_SynthesizeSsmlToStreamAsync( ISpeechSynthesizer *iface, HSTRING ssml,
diff --git a/dlls/windows.media.speech/tests/speech.c b/dlls/windows.media.speech/tests/speech.c
index 01543c145e3..8c584264fee 100644
--- a/dlls/windows.media.speech/tests/speech.c
+++ b/dlls/windows.media.speech/tests/speech.c
@@ -931,9 +931,7 @@ static void test_SpeechSynthesizer(void)
ok(hr == S_OK, "WindowsCreateString failed, hr %#lx\n", hr);
hr = ISpeechSynthesizer_SynthesizeTextToStreamAsync(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);
@@ -958,6 +956,8 @@ static void test_SpeechSynthesizer(void)
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;
+
await_async_inspectable((IAsyncOperation_IInspectable *)operation_ss_stream,
&async_inspectable_handler,
&IID_IAsyncOperationCompletedHandler_SpeechSynthesisStream);
--
GitLab
https://gitlab.winehq.org/wine/wine/-/merge_requests/217
June 9, 2022
[PATCH v3 3/6] windows.media.speech/tests: Add basic tests for ssml/text to stream functions.
by Bernhard Kölbl
From: Bernhard Kölbl <besentv(a)gmail.com>
Signed-off-by: Bernhard Kölbl <besentv(a)gmail.com>
---
dlls/windows.media.speech/tests/speech.c | 82 ++++++++++++++++++++++--
1 file changed, 77 insertions(+), 5 deletions(-)
diff --git a/dlls/windows.media.speech/tests/speech.c b/dlls/windows.media.speech/tests/speech.c
index d1e1c0cc396..01543c145e3 100644
--- a/dlls/windows.media.speech/tests/speech.c
+++ b/dlls/windows.media.speech/tests/speech.c
@@ -779,18 +779,26 @@ static void test_ActivationFactory(void)
static void test_SpeechSynthesizer(void)
{
+ static const WCHAR *simple_ssml =
+ L"<speak version='1.0' xmlns='http://www.w3.org/2001/10/synthesis' xml:lang='en-US'>"
+ "Hello, how are you doing today?"
+ "</speak>";
+ static const WCHAR *simple_synth_text = L"Hello, how are you doing today?";
static const WCHAR *speech_synthesizer_name = L"Windows.Media.SpeechSynthesis.SpeechSynthesizer";
static const WCHAR *speech_synthesizer_name2 = L"windows.media.speechsynthesis.speechsynthesizer";
static const WCHAR *unknown_class_name = L"Unknown.Class";
IActivationFactory *factory = NULL, *factory2 = NULL;
+ IAsyncOperation_SpeechSynthesisStream *operation_ss_stream = NULL;
IVectorView_VoiceInformation *voices = NULL;
IInstalledVoicesStatic *voices_static = NULL;
+ ISpeechSynthesisStream *ss_stream = NULL;
IVoiceInformation *voice;
IInspectable *inspectable = NULL, *tmp_inspectable = NULL;
IAgileObject *agile_object = NULL, *tmp_agile_object = NULL;
ISpeechSynthesizer *synthesizer;
ISpeechSynthesizer2 *synthesizer2;
IClosable *closable;
+ struct async_inspectable_handler async_inspectable_handler;
HMODULE hdll;
HSTRING str, str2;
HRESULT hr;
@@ -843,6 +851,7 @@ static void test_SpeechSynthesizer(void)
FreeLibrary(hdll);
}
+ /* Test static Synth ifaces: IActivationFactory, IInstalledVoicesStatic, etc. */
hr = IActivationFactory_QueryInterface(factory, &IID_IInspectable, (void **)&inspectable);
ok(hr == S_OK, "IActivationFactory_QueryInterface IID_IInspectable failed, hr %#lx\n", hr);
@@ -889,27 +898,91 @@ static void test_SpeechSynthesizer(void)
IVectorView_VoiceInformation_Release(voices);
- IInstalledVoicesStatic_Release(voices_static);
+ hr = IInstalledVoicesStatic_get_DefaultVoice(voices_static, &voice);
+ todo_wine ok(hr == S_OK, "IInstalledVoicesStatic_get_DefaultVoice failed, hr %#lx\n", hr);
+
+ if (hr == S_OK)
+ {
+ IVoiceInformation_get_Description(voice, &str2);
+ trace("SpeechSynthesizer default voice %s.\n", debugstr_hstring(str2));
+ WindowsDeleteString(str2);
+ ref = IVoiceInformation_Release(voice);
+ ok(ref == 0, "Got unexpected ref %lu.\n", ref);
+ }
+
+ IInstalledVoicesStatic_Release(voices_static);
IAgileObject_Release(agile_object);
IInspectable_Release(inspectable);
+ /* Test Synthesizer */
hr = IActivationFactory_QueryInterface(factory, &IID_ISpeechSynthesizer, (void **)&synthesizer);
ok(hr == E_NOINTERFACE, "Got unexpected hr %#lx.\n", hr);
hr = RoActivateInstance(str, &inspectable);
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
+ WindowsDeleteString(str);
hr = IInspectable_QueryInterface(inspectable, &IID_ISpeechSynthesizer, (void **)&synthesizer);
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
+ /* Test SynthesizeTextToStreamAsync */
+ hr = WindowsCreateString(simple_synth_text, wcslen(simple_synth_text), &str);
+ ok(hr == S_OK, "WindowsCreateString failed, hr %#lx\n", hr);
+
+ hr = ISpeechSynthesizer_SynthesizeTextToStreamAsync(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;
+
+ await_async_inspectable((IAsyncOperation_IInspectable *)operation_ss_stream,
+ &async_inspectable_handler,
+ &IID_IAsyncOperationCompletedHandler_SpeechSynthesisStream);
+ check_async_info((IInspectable *)operation_ss_stream, 1, Completed, S_OK);
+ check_interface(operation_ss_stream, &IID_IAgileObject, TRUE);
+
+ hr = IAsyncOperation_SpeechSynthesisStream_GetResults(operation_ss_stream, &ss_stream);
+ todo_wine ok(hr == S_OK, "IAsyncOperation_SpeechSynthesisStream_GetResults failed, hr %#lx\n", hr);
+
+ if (hr == S_OK && ss_stream)
+ {
+ ref = ISpeechSynthesisStream_Release(ss_stream);
+ todo_wine ok(ref == 0, "Got unexpected ref %lu.\n", ref);
+ }
+
+ IAsyncOperation_SpeechSynthesisStream_Release(operation_ss_stream);
+ WindowsDeleteString(str);
+
+ /* Test SynthesizeSsmlToStreamAsync */
+ hr = WindowsCreateString(simple_ssml, wcslen(simple_ssml), &str);
+ 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);
+ await_async_inspectable((IAsyncOperation_IInspectable *)operation_ss_stream,
+ &async_inspectable_handler,
+ &IID_IAsyncOperationCompletedHandler_SpeechSynthesisStream);
+ check_async_info((IInspectable *)operation_ss_stream, 2, Completed, S_OK);
+ check_interface(operation_ss_stream, &IID_IAgileObject, TRUE);
+
+ hr = IAsyncOperation_SpeechSynthesisStream_GetResults(operation_ss_stream, &ss_stream);
+ todo_wine ok(hr == S_OK, "IAsyncOperation_SpeechSynthesisStream_GetResults failed, hr %#lx\n", hr);
+
+ if (hr == S_OK && ss_stream)
+ {
+ ref = ISpeechSynthesisStream_Release(ss_stream);
+ ok(ref == 0, "Got unexpected ref %lu.\n", ref);
+ }
+
+ IAsyncOperation_SpeechSynthesisStream_Release(operation_ss_stream);
+
+skip_ss_stream:
+ WindowsDeleteString(str);
+
hr = IInspectable_QueryInterface(inspectable, &IID_IClosable, (void **)&closable);
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IInspectable_QueryInterface(inspectable, &IID_ISpeechSynthesizer2, (void **)&synthesizer2);
- ok(hr == S_OK ||
- broken(hr == E_NOINTERFACE), /* requires newer Windows */
- "Got unexpected hr %#lx.\n", hr);
+ ok(hr == S_OK || broken(hr == E_NOINTERFACE), "Got unexpected hr %#lx.\n", hr); /* Requires Win10 >= 1703 */
if (hr == S_OK)
{
@@ -927,7 +1000,6 @@ static void test_SpeechSynthesizer(void)
ok(!ref, "Got unexpected ref %lu.\n", ref);
IActivationFactory_Release(factory);
- WindowsDeleteString(str);
RoUninitialize();
}
--
GitLab
https://gitlab.winehq.org/wine/wine/-/merge_requests/217
June 9, 2022
[PATCH v3 2/6] windows.media.speech/tests: Handle a possible race condition.
by Bernhard Kölbl
From: Bernhard Kölbl <besentv(a)gmail.com>
Signed-off-by: Bernhard Kölbl <besentv(a)gmail.com>
---
dlls/windows.media.speech/tests/speech.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/dlls/windows.media.speech/tests/speech.c b/dlls/windows.media.speech/tests/speech.c
index 421819fd10a..d1e1c0cc396 100644
--- a/dlls/windows.media.speech/tests/speech.c
+++ b/dlls/windows.media.speech/tests/speech.c
@@ -1122,13 +1122,15 @@ static void test_SpeechRecognizer(void)
compilation_result = (void*)0xdeadbeef;
hr = IAsyncOperation_SpeechRecognitionCompilationResult_GetResults(operation, &compilation_result);
+ if (hr == S_OK) /* Sometimes the operation could have already finished here, */
+ goto skip_await; /* if so skip waiting and getting the results a second time. */
+
ok(hr == E_ILLEGAL_METHOD_CALL, "Got unexpected hr %#lx.\n", hr);
ok(compilation_result == (void*)0xdeadbeef, "Compilation result had value %p.\n", compilation_result);
await_async_inspectable((IAsyncOperation_IInspectable *)operation,
&compilation_handler,
&IID_IAsyncOperationCompletedHandler_SpeechRecognitionCompilationResult);
- check_async_info((IInspectable *)operation, 1, Completed, S_OK);
hr = IAsyncOperation_SpeechRecognitionCompilationResult_put_Completed(operation, NULL);
ok(hr == E_ILLEGAL_DELEGATE_ASSIGNMENT, "Got unexpected hr %#lx.\n", hr);
@@ -1138,10 +1140,13 @@ static void test_SpeechRecognizer(void)
compilation_result = (void*)0xdeadbeef;
hr = IAsyncOperation_SpeechRecognitionCompilationResult_GetResults(operation, &compilation_result);
+skip_await:
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
check_interface(compilation_result, &IID_IAgileObject, TRUE);
+ check_async_info((IInspectable *)operation, 1, Completed, S_OK);
+
hr = ISpeechRecognitionCompilationResult_get_Status(compilation_result, &result_status);
ok(hr == S_OK, "ISpeechRecognitionCompilationResult_get_Status failed, hr %#lx.\n", hr);
ok(result_status == SpeechRecognitionResultStatus_Success, "Got unexpected status %#x.\n", result_status);
--
GitLab
https://gitlab.winehq.org/wine/wine/-/merge_requests/217
June 9, 2022
[PATCH v3 1/6] windows.media.speech/tests: Remove a useless thread id trace.
by Bernhard Kölbl
From: Bernhard Kölbl <besentv(a)gmail.com>
Signed-off-by: Bernhard Kölbl <besentv(a)gmail.com>
---
dlls/windows.media.speech/tests/speech.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/dlls/windows.media.speech/tests/speech.c b/dlls/windows.media.speech/tests/speech.c
index 5e74b90bf9a..421819fd10a 100644
--- a/dlls/windows.media.speech/tests/speech.c
+++ b/dlls/windows.media.speech/tests/speech.c
@@ -331,7 +331,6 @@ struct async_inspectable_handler
HANDLE event_block;
HANDLE event_finished;
- DWORD thread_id;
};
static inline struct async_inspectable_handler *impl_from_IAsyncOperationCompletedHandler_IInspectable( IAsyncOperationCompletedHandler_IInspectable *iface )
@@ -378,9 +377,8 @@ HRESULT WINAPI async_inspectable_handler_Invoke( IAsyncOperationCompletedHandler
AsyncStatus status )
{
struct async_inspectable_handler *impl = impl_from_IAsyncOperationCompletedHandler_IInspectable(iface);
- DWORD id = GetCurrentThreadId();
+
trace("Iface %p, sender %p, status %d.\n", iface, sender, status);
- trace("Caller thread id %lu callback thread id %lu.\n", impl->thread_id, id);
/* Signal finishing of the handler. */
if (impl->event_finished) SetEvent(impl->event_finished);
@@ -1217,7 +1215,6 @@ static void test_SpeechRecognizer(void)
async_inspectable_handler_create_static(&compilation_handler, &IID_IAsyncOperationCompletedHandler_SpeechRecognitionCompilationResult);
compilation_handler.event_block = CreateEventW(NULL, FALSE, FALSE, NULL);
compilation_handler.event_finished = CreateEventW(NULL, FALSE, FALSE, NULL);
- compilation_handler.thread_id = GetCurrentThreadId();
ok(!!compilation_handler.event_block, "event_block wasn't created.\n");
ok(!!compilation_handler.event_finished, "event_finished wasn't created.\n");
--
GitLab
https://gitlab.winehq.org/wine/wine/-/merge_requests/217
June 9, 2022
[PATCH v3 0/6] MR217: windows.media.speech: ISpeechSynthesisStream stub implementation.
by Bernhard Kölbl
Signed-off-by: Bernhard Kölbl <besentv(a)gmail.com>
--
v3: windows.media.speech: Add stub ISpeechSynthesisStream iface.
windows.media.speech: Return IAsyncOperation from synthesizer_SynthesizeSsmlToStreamAsync.
windows.media.speech: Return IAsyncOperation from synthesizer_SynthesizeTextToStreamAsync.
windows.media.speech/tests: Add basic tests for ssml/text to stream functions.
windows.media.speech/tests: Handle a possible race condition.
https://gitlab.winehq.org/wine/wine/-/merge_requests/217
June 9, 2022
Re: HLSL offsetting
by Zebediah Figura
On 6/9/22 04:04, Matteo Bruni wrote:
>> The ugliness that we've run into is: how do we emit IR for the following
>> variable load?
>>
>> struct apple
>> {
>> int a;
>> struct
>> {
>> Texture2D b;
>> int c;
>> } s;
>> } a;
>>
>> /* in some expression */
>> func(a.s);
>>
>> Unlike the SM1 example above, the register numbers don't match up.
>> Separately, it's kind of ugly that backend-specific details regarding
>> register size and alignment are leaking into the frontend so much.
>
> I think most of that can be hidden or contained with some proper
> abstraction. And generous handwaving.
> But basically, that probably could be represented in the IR as copying
> around individual fields of the structure separately, rather than a
> single "struct deref". Clearly it can become more complex depending on
> the type of the variable but I think it should be doable.
Yeah, it could. Like I said it's not prohibitive. I'm just not sure it's
the best option at this point.
It's worth pointing out that, at parse time, we want and need for load
instructions (and therefore probably also store instructions) to have
larger-than-vector types—that is, load instructions can produce structs,
and store instructions can consume them. But we don't want that for
SMxIR, and I believe we don't want that for the "final form" of HLSL IR
either. That's the way the code is currently arranged and I see no
reason not to keep it that way.
>
>> Similarly, the amount of code that has to deal with matrix majority is
>> unfortunate.
>
> That personally seems more annoying. Although it's not clear to me
> that handling matrix majority at a later stage is necessarily any
> better.
The main idea is that we could handle it something closer to once (well,
once per backend), at HLSL -> SMx translation.
That doesn't necessarily mean requiring that all matrix loads and stores
are done on a single scalar—after all, we could translate a single
vector load to multiple MOV instructions if it can't actually be
represented by one.
It does potentially mean doing vectorization passes on SMxIR, though.
Hard to tell this far in advance, and it's also hard to tell if that's
something we're going to need anyway.
>
>> The former problem can potentially be solved by embedding multiple
>> register offsets into hlsl_deref (one per register type). Neither this
>> nor the latter problem are prohibitive, and I was at one point in favour
>> of continuing to use register offsets everywhere, but at this point my
>> feeling has changed, and I think using register offsets is looking more
>> ugly than the alternatives. I get the impression that Francisco
>> disagrees, though, which is why we should probably hash this out now.
>
> As I mention below, I currently see two options as the most appealing.
> This one (multiple register offsets) sits somewhat in the middle and
> it feels like it would be best to go to one of the extremes instead.
> It's also possible that this middle ground solution would end up being
> nicer in practice. At any rate, I certainly wouldn't flat out discount
> it.
>
>> Nor do I think we should use both register offsets and component offsets
>> (either in the same node type, or in different node types). That just
>> makes the IR way more complicated. Rather, I think we should be doing
>> everything in *just* component offsets until translation from HLSL IR to
>> SMx IR.
>
> I touched on this earlier and I agree that the additional complexity
> is unlikely to be worth it. Admittedly we're in a limbo right now
> where SMxIR isn't quite there yet, which makes reasoning on some of
> these details a bit fuzzy.
>
>> In order to deal with the problem of translating dynamic offsets from
>> components to registers, I see three options:
>>
>> (a) emit code at runtime, or do some sophisticated lowering,
>>
>> (b) use special offsetof and sizeof nodes,
>>
>> (c) introduce a structured deref type, much like [1]. Francisco was
>> actually proposing something like this, although with an array instead
>> of a recursive structure, which strikes me as an improvement.
>>
>> My guess is that (a) is very hard. I haven't really tried to reason it
>> out, though.
>>
>> Given a choice between (b) and (c), I'm more inclined to pick (c). It
>> makes the IR structure more restrictive, and those restrictions
>> fundamentally match the structured nature of the language we're working
>> with, both things I tend to like.
>
> After giving it some thought I think that's certainly fine *for the
> higher level IR*. At the same time it seems to me that, if we go that
> route, eventually we also want to have real SMxIR with register
> offsets, and make sure that we can optimize constant offsets (thus
> expressions) at that level.
>
> As I see it (as of current time and date, can't guarantee that I won't
> change my mind again...) we either push the backend-specific info up
> (register offsets all the way) or down (component offsets with
> structured deref / type info in the generic IR, transformation into
> register offsets in the SMxIR). I think either option works and it's
> mostly a matter of preference and which one fits / feels better with
> the rest of the compiler.
Yeah, that general approach makes sense to me. And yes, of course the
SMxIR should deal entirely in register offsets.
My current vision of SMxIR is that it should be a one-to-one
representation of actual instructions, writable without any lowering
passes (and hence any passes that are done on it should be optimization
only, with the *possible* exception of RA.) In a sense, it's what we
have already with sm4_instruction and such, except that we'd be storing
it and doing passes on it rather than just writing it directly.
Between those two extremes—well, what we currently have basically *is*
the first extreme, with register offsets pushed all the way up to parse
time. It's just causing some friction that makes me think the latter
extreme is probably going to be pretty.
>
>> Note that either way we're going to need specialized functions to
>> resolve deref offsets in one step. I also think that should depend on
>> the domain—e.g. for copy-prop we'll actually want to do everything in
>> component counts, but when translating to SMxIR we'll evaluate given the
>> register alignment constraints of the shader model. In the case of (b)
>> it's not going to be as simple as running the existing constant folding
>> pass, because we can't actually fold the sizeof/offsetof constants
>> (unless we dup the node list, evaluate, and then fold, which seems very
>> hairy and more work than the alternative).
>
> Right, each option will have different tradeoffs WRT optimization
> passes. But e.g. copy-prop should be doable even with register
> offsets, we "just" need to make sure to always map the component
> offsets to their respective register offsets.
Quite, in fact we're already doing it that way. But it's probably better
to work with components, since we (a) don't waste space tracking padding
[not very important], and (b) don't have to deal with multiple register
sets [more important].
>
>> I invite thoughts—especially from Matteo, since we discussed this sort
>> of problem ages ago.
>
> Yep, hope that my comments make sense. I want to hear from the others too.
>
>>
>> ἔρρωσθε,
>> Zeb
>>
>>
>> [1] https://www.winehq.org/pipermail/wine-devel/2020-April/164399.html
>>
>> [2] https://www.winehq.org/pipermail/wine-devel/2020-April/165493.html
>>
June 9, 2022