版本

    其他文档

menu_open
AKRESULT __cdecl AK::SoundEngine::GetSourceStreamBuffering ( AkPlayingID  in_PlayingID,
AkTimeMs out_buffering,
bool &  out_bIsBuffering  
)

Get the stream buffering of the sources associated with this playing ID, obtained from PostEvent(). Notes:

  • You need to pass AK_EnableGetSourceStreamBuffering to PostEvent() in order to use this function, otherwise it returns AK_Fail, even if the playing ID is valid.
  • The sources stream buffering is updated at every audio frame. If there are multiple sources associated with this playing ID, the value returned corresponds to the least buffered source.
  • The returned buffering status out_bIsBuffering will be true If any of the sources associated with the playing ID are actively being buffered. It will be false if all of them have reached the end of file, or have reached a state where they are buffered enough and streaming is temporarily idle.
  • Purely in-memory sources are excluded from this database. If all sources are in-memory, GetSourceStreamBuffering() will return AK_Fail.
  • The returned buffering amount and state is not completely accurate with some hardware-accelerated codecs. In such cases, the amount of stream buffering is generally underestimated. On the other hand, it is not guaranteed that the source will be ready to produce data at the next audio frame even if out_bIsBuffering has turned to false.
    Returns:
  • AK_Success if successful.
  • AK_Fail if the source data associated with this playing ID is not found, for example if PostEvent() was not called with AK_EnableGetSourceStreamBuffering, or if the header was not parsed.
    See also:
  • Concept: Events
Parameters:
in_PlayingID  Playing ID returned by AK::SoundEngine::PostEvent()
out_buffering  Returned amount of buffering (in ms) of the source (or one of the sources) associated with that playing ID
out_bIsBuffering  Returned buffering status of the source(s) associated with that playing ID

此页面对您是否有帮助?

需要技术支持?

仍有疑问?或者问题?需要更多信息?欢迎联系我们,我们可以提供帮助!

查看我们的“技术支持”页面

介绍一下自己的项目。我们会竭力为您提供帮助。

来注册自己的项目,我们帮您快速入门,不带任何附加条件!

开始 Wwise 之旅