版本

menu_open

Integration Details - Dynamic Dialogue

Introduction

Dialogue Events are created by the Wwise user. At runtime, a dialogue event is resolved into an audio node ID using a specified argument path, which corresponds to the arguments chosen by the Wwise user.

This audio node ID can then be placed into the playlist of a dynamic sequence for playback. The dynamic sequence is essentially a runtime-created sample-accurate sequence container.

Integrating Dialogue Events

You can resolve a dialogue event into an audio node ID using a specified argument path. The order of argument values in the path needs to match the order of arguments set in the Wwise authoring application.

The argument path can be specified either using either argument value IDs or names. To indicate a fallback argument value, AK_FALLBACK_ARGUMENTVALUE_ID or an empty name (L"") is used.

Using Dynamic Sequences

Dynamic sequences allow you to:

  • Enqueue several audio nodes to play with sample-accurate behavior, with an optional delay between items.
  • Modify the playlist during playback.
  • Pause, Resume and Stop playback.
  • Be notified at the end of each playlist item through a callback (in addition to all normal event-related callbacks).

Opening a Dynamic Sequence yields an AkPlayingID used for further interaction. Close should be the last call to be made using a given AkPlayingID. Closing a playing dynamic sequence will not stop it: it will play until finished and then deallocate itself. Play starts playback during playback, the dynamic sequence takes items from its playlist. The playlist is progressively emptied until it contains no more items and playback stops.

To modify the playlist, you must lock it. A corresponding unlock call needs to be made once the modifications are done. Holding the lock will block the sound engine thread from accessing the playlist. It is therefore necessary to hold the lock for as little time as possible.

Note.gif

Note: Modifying the playlist content is a synchronous call while Pause, Stop, Resume, and Break are done asynchronously.

The Playlist class is derived from AkArray, so standard array access methods can be used to modify the playlist. A simple Enqueue method is provided for convenience. A playlist item consists of an audio node ID, a delay time in milliseconds and a user-data field.


此页面对您是否有帮助?

需要技术支持?

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

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

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

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

开始 Wwise 之旅