Bernhard Kölbl (@besentv) commented about dlls/windows.media.speech/synthesizer.c:
factory_ActivateInstance,
};
+static HRESULT dummy_provider_init(struct synth_voices_provider *provider) +{
- HRESULT hr;
- WCHAR locale[LOCALE_NAME_MAX_LENGTH];
- if (GetUserDefaultLocaleName(locale, ARRAY_SIZE(locale)) > ARRAY_SIZE(locale))
return E_OUTOFMEMORY;
- provider->voices = calloc(1, sizeof(all_voices.provider.voices[0]));
- if (!provider->voices) return E_OUTOFMEMORY;
- hr = voice_information_create(L"Dummy voice", L"--noid--", locale, VoiceGender_Male, &provider->voices[0]);
- if (FAILED(hr))
- {
The preceding lines can be squashed into 2