Microsoft Speech Platform
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
Value |
Description |
S_OK |
Function completed successfully. |
SPERR_UNINITIALIZED |
Audio stream not initialized. |
E_INVALIDARG |
pBuffInfo is invalid or the parameters do not meet the criteria described above. |
SPERR_DEVICE_BUSY |
Audio 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. |