버전

menu_open
AKRESULT __cdecl AK::MusicEngine::GetPlayingSegmentInfo ( AkPlayingID  in_PlayingID,
AkSegmentInfo out_segmentInfo,
bool  in_bExtrapolate = true  
)

Query information on the active segment of a music object that is playing. Use the playing ID that was returned from AK::SoundEngine::PostEvent(), provided that the event contained a play action that was targetting a music object. For any configuration of interactive music hierarchy, there is only one segment that is active at a time. To be able to query segment information, you must pass the AK_EnableGetMusicPlayPosition flag to the AK::SoundEngine::PostEvent() method. This informs the sound engine that the source associated with this event should be given special consideration because GetPlayingSegmentInfo() can be called at any time for this AkPlayingID. Notes:

  • If the music object is a single segment, you will get negative values for AkSegmentInfo::iCurrentPosition during the pre-entry. This will never occur with other types of music objects because the pre-entry of a segment always overlaps another active segment.
  • The active segment during the pre-entry of the first segment of a Playlist Container or a Music Switch Container is "nothing", as well as during the post-exit of the last segment of a Playlist (and beyond).
  • When the active segment is "nothing", out_uSegmentInfo is filled with zeros.
  • If in_bExtrapolate is true (default), AkSegmentInfo::iCurrentPosition is corrected by the amount of time elapsed since the beginning of the audio frame. It is thus possible that it slightly overshoots the total segment length.
    Returns:
    AK_Success if there is a playing music structure associated with the specified playing ID.
    See also:
  • AK::SoundEngine::PostEvent
  • AkSegmentInfo
Parameters:
in_PlayingID  Playing ID returned by AK::SoundEngine::PostEvent().
out_segmentInfo  Structure containing information about the active segment of the music structure that is playing.
in_bExtrapolate  Position is extrapolated based on time elapsed since last sound engine update.

이 페이지가 도움이 되었나요?

지원이 필요하신가요?

질문이 있으신가요? 문제를 겪고 계신가요? 더 많은 정보가 필요하신가요? 저희에게 문의해주시면 도와드리겠습니다!

지원 페이지를 방문해 주세요

작업하는 프로젝트에 대해 알려주세요. 언제든지 도와드릴 준비가 되어 있습니다.

프로젝트를 등록하세요. 아무런 조건이나 의무 사항 없이 빠른 시작을 도와드리겠습니다.

Wwise를 시작해 보세요