From: Shaun Ren sren@codeweavers.com
--- dlls/sapi/tests/tts.c | 4 ++-- dlls/sapi/xml.c | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/dlls/sapi/tests/tts.c b/dlls/sapi/tests/tts.c index dbb8736f76e..569ee918164 100644 --- a/dlls/sapi/tests/tts.c +++ b/dlls/sapi/tests/tts.c @@ -1015,8 +1015,8 @@ static void test_spvoice_ssml(void) reset_engine_params(&test_engine);
hr = ISpVoice_Speak(voice, text3, SPF_IS_XML, NULL); - todo_wine ok(hr == S_OK, "got %#lx.\n", hr); - todo_wine ok(test_engine.frag_count == 7 || broken(test_engine.frag_count == 1) /* win7 */, + ok(hr == S_OK, "got %#lx.\n", hr); + ok(test_engine.frag_count == 7 || broken(test_engine.frag_count == 1) /* win7 */, "got %Iu.\n", test_engine.frag_count);
if (test_engine.frag_count == 7) { diff --git a/dlls/sapi/xml.c b/dlls/sapi/xml.c index 518a687a5e8..aad32462272 100644 --- a/dlls/sapi/xml.c +++ b/dlls/sapi/xml.c @@ -459,8 +459,9 @@ static HRESULT add_sapi_text_fragment(struct xml_parser *parser, const SPVSTATE
static HRESULT parse_ssml_elems(struct xml_parser *parser, const SPVSTATE *state, const struct xml_elem *parent) { + struct xml_attr attr; struct xml_elem elem; - BOOL is_text; + BOOL is_text, end; HRESULT hr = S_OK;
while (SUCCEEDED(hr) && next_text_or_xml_elem(parser, &is_text, &elem, parent)) @@ -469,6 +470,12 @@ static HRESULT parse_ssml_elems(struct xml_parser *parser, const SPVSTATE *state { hr = add_sapi_text_fragment(parser, state); } + else if (xml_elem_eq(&elem, ssml_ns, L"p") || xml_elem_eq(&elem, ssml_ns, L"s")) + { + while (next_xml_attr(parser, &attr, &end)) ; + if (end) continue; + hr = parse_ssml_elems(parser, state, &elem); + } else { FIXME("Unknown element %s.\n", debugstr_xmlstr(&elem.name));