ISpRecognizer::GetFormat (Windows CE 5.0)
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.
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 Values
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
OS Versions: Windows CE .NET 4.1 and later.
Header: Sapi.h, Sapi.idl.
Link Library: Sapilib.lib.
See Also
ISpRecognizer | SAPI Interfaces
Send Feedback on this topic to the authors