Version

menu_open
Wwise SDK 2021.1.14
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: 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.


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