ISpRecognizer::GetFormat (Windows Embedded CE 6.0)
1/6/2010
This method gets the current input audio format. It retrieves either the input format or the engine format. Typically, these two values are the same. However, if SAPI is using a format converter to convert the input data from the audio input to the engine format, the values are different.
Syntax
HRESULT GetFormat(
SPSTREAMFORMATTYPE WaveFormatType,
GUID* pFormatId,
WAVEFORMATEX** ppCoMemWFEX
);
Parameters
- WaveFormatType
[in] Wave file format type. Possible values are defined for the SPSTREAMFORMATTYPE enumeration.
- pFormatId
[out] Pointer to a unique identifier associated with the format type.
- ppCoMemWFEX
[out] Address of a pointer to a WAVEFORMATEX structure containing the format information. This is set only if the input is of a wave format type. The application must free this data with a call to CoTaskMemFree after use.
Return Value
The following table shows the possible return values.
Value | Description |
---|---|
S_OK |
Function completed successfully. |
E_POINTER |
Invalid pointer. |
SPERR_UNINITIALIZED |
Audio input not yet set. |
FAILED(hr) |
Appropriate error message. |
Requirements
Header | sapi.h, sapi.idl |
Library | sapilib.lib |
Windows Embedded CE | Windows CE .NET 4.1 and later |