Version

menu_open
Wwise SDK 2023.1.4

◆ GetSourceStreamBuffering()

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

Gets 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_PlayingIDNotFound.
  • 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_PlayingIDNotFound 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
  • Understanding Events
Parameters
in_PlayingIDPlaying ID returned by AK::SoundEngine::PostEvent()
out_bufferingReturned amount of buffering (in ms) of the source (or one of the sources) associated with that playing ID
out_bIsBufferingReturned buffering status of the source(s) associated with that playing ID

Was this page helpful?

Need Support?

Questions? Problems? Need more info? Contact us, and we can help!

Visit our Support page

Tell us about your project. We're here to help.

Register your project and we'll help you get started with no strings attached!

Get started with Wwise