Share via


ISpTTSEngineSite::Write

Other versions of this page are also available for the following:

Windows Mobile Not SupportedWindows Embedded CE Supported

8/28/2008

This method sends output data (typically audio) to SAPI, which then routes it to the correct output destination. Before calling this method, the TTS engine must queue any events associated with the output data by calling the ISpEventSink::AddEvents method. This ensures proper synchronization of event firing and data rendering.

Syntax

HRESULT Write(
  const void* pBuff,
  ULONG cb,
  ULONG* pcbWritten
);

Parameters

  • pBuff
    [in] Pointer to synthesized speech audio data. The output format is specified by SAPI in a call to the ISpTTSEngine::Speak call method.
  • cb
    [in] Size, in bytes (not samples), of the buffer specified by pBuff.
  • pcbWritten
    [out] Pointer to the number of bytes actually copied.

Return Value

The following table shows the possible return values.

Value Description

S_OK

Function completed successfully.

E_INVALIDARG

pBuff is bad or invalid.

E_POINTER

pcbWritten is bad or invalid.

SPERR_UNINITIALIZED

Output stream cannot be initialized.

Requirements

Header sapiddk.h, sapiddk.idl
Library sapilib.lib
Windows Embedded CE Windows CE .NET 4.1 and later

See Also

Reference

ISpTTSEngineSite
SAPI Interfaces