-1

I have created a DLL in C++ VS2010.

It seems to me that 2 programs can not access it at the same time. First program 1 has to complete the calls to the DLL, only then the DLL will process the calls from the other program.

I would like to know if there is a certain switch in the project settings that I need to set to make the DLL "multi-threaded".

The DLL is used by Windows SAPI. A program (in my case two programs) can reference the SAPI and make a computer voice (the computer voice is the DLL) speak something. I expected both programs to speak at the same time, but since they don't (they wait for each other), I expected my DLL to be single-threaded.

Thank you.

4

1 回答 1

4

语音 API 序列化来自多个来源的语音,因此它们不会同时播放。一个将首先播放,然后是下一个,依此类推,直到没有更多待播放的语音要播放。您可以通过注册表禁用此功能,如下所述:http: //msdn.microsoft.com/en-us/library/ee431801 (v=vs.85).aspx#_Toc494873956

特别是where的NoSerializeAccess值是您的音频输出设备的名称。HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\Speech\AudioOutput\<AudioOutput1>\Attributes<AudioOutput1>

此信息可在http://msdn.microsoft.com/en-us/library/speechplatform_ispaudio.aspx找到

为了防止多个 TTS 语音或引擎同时说话,语音平台将输出序列化到实现 ISpAudio 接口的对象。要禁用输出到 ISpAudio 对象的序列化,请在其对象令牌的 Attributes 文件夹中放置一个名为“NoSerializeAccess”的属性。

于 2013-09-21T22:11:57.097 回答