Helper SPBindToFile (SAPI 5.3)
Speech API 5.3
SPBindToFile binds the audio stream to the specified file.
Found in: sphelper.h
SPBindToFile( LPCWSTR pFileName, SPFILEMODE eMode, ISpStream **ppStream, const GUID *pFormatId = NULL, const WAVEFORMATEX *pWaveFormatEx = NULL, ULONGLONG *ullEventInterest = SPFEI_ALL_EVENTS );
- [in] Address of a null-terminated string containing the file name of the file to bind the stream to.
- [in] Flag of the type SPFILEMODE to define the file opening mode. When opening an audio wave file, this must be SPFM_OPEN_READONLY or SPFM_CREATE_ALWAYS, otherwise the call will fail.
- [in, out] The address of an ISpStream pointer. If the function succeeds, this value is filled in with the newly created ISpStream interface.
- [in] The data format identifier associated with the stream. This can be NULL (default) and the format will be determined from the supplied wave file, if the file has the '.wav' extension. If it doesn't, the file is assumed to be a text file.
- [in] Address of the WAVEFORMATEX structure that contains the wave file format information. If guidFormatId is SPDFID_WaveFormatEx, this must point to a valid WAVEFORMATEX structure. For other formats, it should be NULL.
- [in] Flags of type SPEVENTENUM for the events wanted.
|S_OK||Function completed successfully.|
|E_INVALIDARG||One or more parameters are invalid.|
|SPERR_ALREADY_INITIALIZED||The object has already been initialized.|