Wwise SDK 2025.1.0
|
Dialogue Event(对白事件)由声音设计师创建。在运行时,对白事件被解析成使用指定参数路径的音频节点 ID,对应于声音设计师选择的参数。
然后此音频节点 ID 可以被放到动态播放序列的播放列表中。动态序列实际是在运行时创建的采样点精度序列容器。
您可以使用指定参数路径 将对白事件解析成 音频节点 ID。该路径中的参数值序列必须与 Wwise 设计工具中设定的参数顺序相匹配。
参数路径可使用参数值 ID 或名称指定。AK_FALLBACK_ARGUMENTVALUE_ID 或空白名称(L"")用于指示备用参数值。
动态序列(Dynamic Sequence)可以用于:
打开 Dynamic Sequence 将产生用于进一步互动的 AkPlayingID。关闭 应该是使用给定 AkPlayingID 所做的最后一个调用。关闭正在播放的动态序列后序列不会立刻停止:它会一直播放到结束,然后自己释放分配的内存。Play starts playback. During playback, the dynamic sequence takes items either from a playlist or a user callback.
Playlist-based sequences determine the next item to play from a AK::SoundEngine::DynamicSequence::Playlist
object. 播放列表将逐渐抽空,当它不再包含任何项目的时候就会停止播放。
要更改播放列表,必须锁定 它。一旦完成更改,需要执行相应的解锁 调用。保持锁定会阻止声音引擎线程访问播放列表。因此,保持锁定的时间应尽量短。
![]() | 备注: 更改播放列表内容属于同步调用,而暂停、停止、继续和中断可异步进行。 播放列表 类从 AkArray 获取,因此可使用标准数组访问方法更改播放列表。为了方便起见,提供了一个简单的排队 方法。播放列表条目包括音频节点 ID、延时(单位:毫秒)和用户数据字段。 |
Callback-based sequences determine the next item to play from an event callback. A sequence opened with the AK_DynamicSequenceSelect
callback flag is a callback-based dynamic sequence. Callback-based sequences have no associated Playlist object.
When a new item must be selected, the user event callback is invoked with type AK_DynamicSequenceSelect. The callback info pointer can be cast to AkDynamicSequenceSelectCallbackInfo
and then filled out with the playback information for the next item to play. The callback blocks the sound engine thread. It is therefore necessary to return from the callback as soon as possible.
If the user callback fails to provide a valid audio node ID, the sequence is stopped. Use AK::SoundEngine::DynamicSequence::Play
to start it when you are ready to provide a new playback item.