版本

menu_open
AKRESULT __cdecl AK::SoundEngine::GetSourcePlayPositions ( AkPlayingID  in_PlayingID,
AkSourcePosition out_puPositions,
AkUInt32 io_pcPositions,
bool  in_bExtrapolate = true  
)

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

  • You need to pass AK_EnableGetSourcePlayPosition to PostEvent() in order to use this function, otherwise it returns AK_Fail, even if the playing ID is valid.
  • The source's position is updated at every audio frame, and the time at which this occurs is stored. When you call this function from your thread, you therefore query the position that was updated in the previous audio frame. If in_bExtrapolate is true (default), the returned position is extrapolated using the elapsed time since last sound engine update and the source's playback rate.
  • If 0 is passed in for the number of entries (*in_pcPositions == 0) then only the number of positions will be returned and the position array (out_puPositions) will not be updated.
  • The io_pcPositions pointer must be non-NULL. out_puPositions may be NULL if *io_pcPositions == 0, otherwise it must be non-NULL.
    返回:
    AK_Success if successful. It returns AK_InvalidParameter if the provided pointers are not valid. It returns AK_Fail if the playing ID is invalid (not playing yet, or finished playing).
    参见:
  • 集成详情——GetSourcePlayPosition
  • 概念:Events
参数:
in_PlayingID  Playing ID returned by AK::SoundEngine::PostEvent()
out_puPositions  Audio Node IDs and positions of sources associated with the specified playing ID
io_pcPositions  Number of entries in out_puPositions. Needs to be set to the size of the array: it is adjusted to the actual number of returned entries
in_bExtrapolate  Position is extrapolated based on time elapsed since last sound engine update

此页面对您是否有帮助?

需要技术支持?

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

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

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

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

开始 Wwise 之旅