[PATCH 06/11] windows.media.speech: Move speechsynthesis into a seperate file.

Rémi Bernon rbernon at codeweavers.com
Wed Jan 19 12:34:58 CST 2022


On 1/19/22 14:28, Bernhard Kölbl wrote:
> +
> +struct activation_factory
> +{
> +    /* Factories */
> +    IActivationFactory IActivationFactory_iface;
> +    /* Static interfaces */
> +    IInstalledVoicesStatic IInstalledVoicesStatic_iface;
> +    /* Variables */
> +    HRESULT (*create_instance)(IInspectable **instance);
> +    LONG ref;
> +};


Not really going into the details but this looks weird and wrong, I 
expect each class to have their own unique activation factory, and each 
of the factory to implement all the "static" interfaces that are 
declared for their class, but not for a factory to have the "static" 
interfaces that are declared on a different class.

Like for instance, the SpeechRecognizer activation factory should only 
implement the IActivationFactory, ISpeechRecognizerStatics and 
ISpeechRecognizerStatics2 interfaces, not IInstalledVoicesStatic or 
IInstalledVoicesStatic2. And the SpeechSynthesizer activation factory 
should only implement the IActivationFactory, IInstalledVoicesStatic and 
IInstalledVoicesStatic2 interfaces.

So the factories may still be declared statically, and in separate 
files, but probably shouldn't share the same structure. Could be all 
dispatched with some get_<class>_factory functions implemented in 
separate files and returning the IActivationFactory iface pointer.

Of course, tests could and should tell if this is really how it all works.
-- 
Rémi Bernon <rbernon at codeweavers.com>



More information about the wine-devel mailing list