Helper SPBindToFile (SAPI 5.4)
Microsoft Speech API 5.4
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 |
S_OK |
E_INVALIDARG |
SPERR_ALREADY_INITIALIZED |
SPERR_INVALID_WAV_FILE |