Version

menu_open
Wwise SDK 2019.1.11
Quick Start Sample Integration - Dynamic Dialogue

Dynamic Dialogue Example

The following code plays back a single dialogue event inside of a dynamic sequence:

#include <AK/SoundEngine/Common/AkDynamicDialogue.h>
#include <AK/SoundEngine/Common/AkDynamicSequence.h>
(...)
{
// Open a dynamic sequence using the appropriate game object.
AkPlayingID sequenceID = AK::SoundEngine::DynamicSequence::Open( GAME_OBJECT_ID_HUMAN );
// Add a single dialogue event to the playlist of the dynamic sequence.
{
// Resolve dialogue event into an audio node ID based on the specified argument path.
const char * argPath[3] = { // Following the order of Arguments:
"Unit_A", // "Units"
"RescueHostage", // "Objectives"
"Completed" }; // "ObjectiveStatus"
AkUniqueID nodeID =
AK::SoundEngine::DynamicDialogue::ResolveDialogueEvent( "Objective_Status", argPath, 3 );
// Add audio node ID to dynamic sequence playlist.
pPlaylist->Enqueue( nodeID );
}
// Play the dynamic sequence.
// Close the dynamic sequence. The dynamic sequence will play until finished and then
// deallocate itself automatically.
}

Refer to Integration Details - Dynamic Dialogue for more information.

AKSOUNDENGINE_API AkUniqueID ResolveDialogueEvent(AkUniqueID in_eventID, AkArgumentValueID *in_aArgumentValues, AkUInt32 in_uNumArguments, AkPlayingID in_idSequence=AK_INVALID_PLAYING_ID, AkCandidateCallbackFunc in_candidateCallbackFunc=NULL, void *in_pCookie=NULL)
AKSOUNDENGINE_API Playlist * LockPlaylist(AkPlayingID in_playingID)
AKSOUNDENGINE_API AKRESULT Play(AkPlayingID in_playingID, AkTimeMs in_uTransitionDuration=0, AkCurveInterpolation in_eFadeCurve=AkCurveInterpolation_Linear)
Play specified Dynamic Sequence.
AkForceInline AKRESULT Enqueue(AkUniqueID in_audioNodeID, AkTimeMs in_msDelay=0, void *in_pCustomInfo=NULL, AkUInt32 in_cExternals=0, AkExternalSourceInfo *in_pExternalSources=NULL)
AKSOUNDENGINE_API AKRESULT UnlockPlaylist(AkPlayingID in_playingID)
AKSOUNDENGINE_API AkPlayingID Open(AkGameObjectID in_gameObjectID, AkUInt32 in_uFlags=0, AkCallbackFunc in_pfnCallback=NULL, void *in_pCookie=NULL, DynamicSequenceType in_eDynamicSequenceType=DynamicSequenceType_SampleAccurate)
AKSOUNDENGINE_API AKRESULT Close(AkPlayingID in_playingID)

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