Helper SpConvertStreamFormatEnum (Microsoft Speech Platform)

Microsoft Speech Platform SDK 11

Microsoft Speech Platform

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

Value Description
S_OK Function completed successfully.
E_OUTOFMEMORY Exceeded available memory.
E_INVALIDARG Either pFormatId or ppCoMemWaveFormatEx is invalid or bad. Alternatively, the specified format is not recognized.
FAILED(hr) Appropriate error message.