Note
Please see Azure Cognitive Services for Speech documentation for the latest supported speech solutions.
Microsoft Speech Platform
ISpAudio::SetBufferInfo
ISpAudio::SetBufferInfo sets the audio stream buffer information.
<pre IsFakePre="true" xmlns="http://www.w3.org/1999/xhtml"> <strong>HRESULT SetBufferInfo(</strong> <strong> const</strong> <a runat="server" href="jj127865(v=msdn.10).md"><strong>SPAUDIOBUFFERINFO</strong></a> *<em>pBuffInfo</em> <strong>);</strong> </pre>
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.