This method plays a prerecorded speech sound file.
HRESULT IAPCSpeech::PlaySound ( LPCWSTR lpcwSound, HMODULE hModule, DWORD dwSound, DWORD dwReserved );
The following values are defined:
SND_APPLICATION | SND_NODEFAULT |
SND_ALIAS | SND_NOSTOP |
SND_ALIAS_ID | SND_NOWAIT |
SND_ASYNC | SND_PURGE |
SND_FILENAME | SND_RESOURCE |
SND_LOOP | SND_SYNC |
SND_MEMORY |
For more information about these flags, see the Windows CE PlaySound function.
An appropriate HRESULT value is returned.
Always use this method to play prerecorded speech. Besides playing the sound file, this method also attenuates the music and disables speech recognition during playback. This method uses the same waveform (WAV) output device as the text-to-speech (TTS) engine. If TTS is playing, IAPCSpeech::PlaySound stops TTS. TTS also stops the Windows CE PlaySound function if that function is in progress. For event sounds, use the Windows CE sndPlaySound function, which uses a different WAV output device than IAPCSpeech::PlaySound and TTS.