Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Constructor

CSpStreamFormat Constructor Methods (SAPI 5.3)

Speech API 5.3
Microsoft Speech API 5.3

CSpStreamFormat::Constructor

The following methods may be used to construct the instance.



Initializes the class members to null values

CSpStreamFormat( void );

Parameters

None.



Formats the instance into a wave format structure. The new format and format ID are passed back from the class' public members, m_pCoMemWaveFormatEx and m_guidFormatId respectively.

CSpStreamFormat(
   SPSTREAMFORMAT   eFormat,
   HRESULT         *phr
);

Parameters

eFormat
[in] The requested stream format. Must be a valid SPSTREAMFORMAT value of SPSF_8kHz8BitMono or greater.
phr
The return value for the method.

Return values

ValueDescription
S_OKFunction completed successfully.
E_OUTOFMEMORYExceeded available memory.
E_INVALIDARGEither class member m_guidFormatId or m_pCoMemWaveFormatEx is invalid or bad. Alternatively, the current format is not recognized.
FAILED(hr)Appropriate error message.


Formats the instance according to the format structure specified.

CSpStreamFormat(
   const WAVEFORMATEX *pWaveFormatEx,
   HRESULT            *phr
);

Parameters

pWaveFormatEx
[in] Address of the WAVEFORMATEX structure containing the wave file format information.
phr
The return value for the method.

Return values

ValueDescription
S_OKFunction completed successfully.
E_OUTOFMEMORYExceeded available memory.
Show:
© 2015 Microsoft