Microsoft Speech SDK Version 5.1
SPBindToFile
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
);
Parameters
- pFileName
[in] Address of a null-terminated string containing the file name of the file to bind the stream to. - eMode
[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. - ppStream
[in, out] The address of an ISpStream pointer. If the function succeeds, this value is filled in with the newly created ISpStream interface. - pFormatId
[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. - pWaveFormatEx
[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. - ullEventInterest
[in] Flags of type SPEVENTENUM for the events wanted.
Return values
Value | Description |
---|---|
S_OK | Function completed successfully. |
E_INVALIDARG | One or more parameters are invalid. |
SPERR_ALREADY_INITIALIZED | The object has already been initialized. |