Helper SpConvertStreamFormatEnum (SAPI 5.4)

Speech API 5.4
Microsoft Speech API 5.4

SpConvertStreamFormatEnum

SpConvertStreamFormatEnum converts the specified stream format into a fully populated wave format structure.

Found in: sphelper.h

SpConvertStreamFormatEnum(
   SPSTREAMFORMAT   eFormat,
   GUID            *pFormatId,
   WAVEFORMATEX   **ppCoMemWaveFormatEx
);

Parameters

eFormat
[in] The requested stream format. Must be a valid SPSTREAMFORMAT value of SPSF_8kHz8BitMono or greater.
pFormatId
[in, out] The GUID of the new format. May be GUID_NULL if an error occurred.
ppCoMemWaveFormatEx
[out] The populated WAVEFORMATEX structure specified by the supplied SPSTREAMFORMAT.

Return values

ValueDescription
S_OKFunction completed successfully.
E_OUTOFMEMORYExceeded available memory.
E_INVALIDARGEither pFormatId or ppCoMemWaveFormatEx is invalid or bad. Alternatively, the specified format is not recognized.
FAILED(hr)Appropriate error message.
Show: