バージョン

menu_open
Wwise SDK 2022.1.12

◆ GetSourcePlayPosition()

AKSOUNDENGINE_API AKRESULT AK::SoundEngine::GetSourcePlayPosition ( AkPlayingID  in_PlayingID,
AkTimeMs out_puPosition,
bool  in_bExtrapolate = true 
)

Gets the current position of the source associated with this playing ID, obtained from PostEvent(). If more than one source is playing, the first to play is returned. 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.
    戻り値
  • AK_Success if successful.
  • AK_InvalidParameter if the provided pointer is not valid.
  • AK_PlayingIDNotFound if the playing ID is invalid (not playing yet, or finished playing).
    参照
  • 統合の詳細 - GetSourcePlayPosition
  • 概念:Event(イベント)
引数
in_PlayingIDPlaying ID returned by AK::SoundEngine::PostEvent()
out_puPositionPosition of the source (in ms) associated with the specified playing ID
in_bExtrapolatePosition is extrapolated based on time elapsed since last sound engine update.

このページはお役に立ちましたか?

サポートは必要ですか?

ご質問や問題、ご不明点はございますか?お気軽にお問い合わせください。

サポートページをご確認ください

あなたのプロジェクトについて教えてください。ご不明な点はありませんか。

プロジェクトを登録していただくことで、ご利用開始のサポートをいたします。

Wwiseからはじめよう