ISpAudio::SetBufferInfo (SAPI 5.3)

Speech API 5.3
Microsoft Speech API 5.3

ISpAudio::SetBufferInfo

ISpAudio::SetBufferInfo sets the audio stream buffer information.

HRESULT SetBufferInfo(
   const SPAUDIOBUFFERINFO  *pBuffInfo
);

Parameters

pBuffInfo
[in] Pointer to the SPAUDIOBUFFERINFO buffer providing the requested settings.

Return values

ValueDescription
S_OKFunction completed successfully.
SPERR_UNINITIALIZEDAudio stream not initialized.
E_INVALIDARGpBuffInfo is invalid or the parameters do not meet the criteria described above.
SPERR_DEVICE_BUSYAudio device is not in the SPAS_CLOSED state.
FAILED(hr)Appropriate error message.

Remarks

This method can be called only when the audio device is in the SPAS_CLOSED state. The SPAUDIOBUFFERINFO members must conform to the following restrictions:

SPAudioBufferInfo.ulMsMinNotification cannot be larger than one quarter the size of SPAudioBufferInfo.ulMsBufferSize and must not be zero.
SPAudioBufferInfo.ulMsEventBias cannot be larger than SPAudioBufferInfo.ulMsBufferSize.
SPAudioBufferInfo.ulMsBufferSize must be greater than or equal to 200 milliseconds.
Show: