版本

menu_open
Wwise SDK 2023.1.3
Wwise Authoring API 示例索引

有关 Wwise Authoring API 的详细信息,请参阅 使用 Wwise Authoring API(WAAPI) 章节。

示例

将 Custom Cue 添加到现有 Music Segment
按照给定名称和时间(毫秒)在现有 Music Segment 内创建 Custom Cue。

Adding a Marker to an Audio Source
In the "Markers" list of an audio source, appends a Marker using the given Time and Label properties.

Adding a State Group to a Sound
Adds a State Group to a Sound.

Adding a message to the logs
Adds a message to the logs on channel 'general'.

Adding a new files to source control.
Add two new audio files to the SFX directory and the source control.

Adding a warning to the SoundBank Generation channel
Adds a warning to the logs on channel 'soundbankGenerate'.

Adding an RTPC with curve to an object
在对象的 "RTPC" 列表中,使用给定 ControlInput 和曲线控制点在属性上创建 RTPC。

Adding an RTPC with curve to an object and creates a new Custom ControlInput
在对象的 "RTPC" 列表中,使用给定 ControlInput 和曲线控制点在属性上创建 RTPC。

将对象添加到 Inclusion 列表
将对象添加到 SoundBank 的 Inclusion 列表。未考虑 'media' 筛选器。

将 Switch Container 的子对象指派给 State
相当于将 Switch Group 的子对象拖到 Assigned Objects 视图中所列的 State。

开始某个 Undo Group
开始某个 Undo Group。

将当前所连 Wwise 调到前台
将当前所连 Wwise 调到前台。

取消某个 Undo Group
取消某个 Undo Group。

Changing the playlist of a Random Sequence object
The playlist added to the Random Sequence object is composed of the '1st number' object followed by two times '2nd Number'.

检查是否启用了某项属性
检查是否启用了某项属性。

Clear an attenuation reference
Clears the attenuation reference on the specified object by setting a null GUID.

Clearing the general log.
Clears the entire log on the channel 'general'.

清理 Inclusion 列表
通过 'replace' 操作和空白 'inclusions' 列表清理 SoundBank 的 Inclusion 列表。

Closing the current project
关闭当前工程。

关闭当前工程
关闭当前工程。

Commiting a file modification in the source control.
The modification and the message on it is sent to the source file.

连接到《Cube》
在同一电脑上连接到《Cube》游戏。

连接到性能分析会话
通过给定完整路径连接到所保存性能分析会话(.prof 文件)。

针对某个平台对 External Source 进行转码
在默认输出路径针对 Linux 对 External Source 进行转码。

针对多个平台和输出路径对 External Source 进行转码
按照给定的各个 wsources 文件在可选和默认输出路径针对多个平台对 External Source 进行转码。

将对象复制到给定父对象
复制由 "object" ID 指定的对象,并将副本作为 "parent" 的子对象。若 "parent" 已经包含同名子对象,则对相应对象进行重命名。

Create a Music Playlist Container with segment and playlist
Creates a new Music Playlist Container, import a wav file in a Music Segment and create a playlist.

Create a Sound with Source Plug-in
Creates a new Sound with a Synth One Source Plug-in.

为 Sound 对象创建 Play Event
在 'WAAPI' 虚文件夹下创建 'Play_SFX' Event,并为 SFX 声音对象添加 Play 动作。如需查看可用事件属性和动作类型列表,请参阅 Action

创建 Random Container 并添加两个 Sound 对象
在给定父对象下创建 'Boom' Random Container,并在其中添加 'A' 和 'B' Sound 对象。

创建 Sound 对象
在给定父对象下创建新的 'Boom' Sound 对象。

创建 Virtual Folder
在 Default Work Unit 下创建新的 'Guns' Virtual Folder。若已存在同名的文件夹,则自动命名为唯一名称。

Creating a music hierarchy
In one operation, create a Music Switch Container, a Music Playlist Container, a Music Segment, and a Music Track with one imported WAV file.

Creating a new SFX with no file and setting a value to a property
在 "objectPath" 下创建新的 SFX,将其音量属性设为 1。

Creating a new project
Creates the .wproj project specified by path.

Creating a new project
Creates the .wproj project specified by path.

Creating a new project for Android platform
Creates the .wproj project specified by path.

Creating a new project for Windows and Android platforms
Creates the .wproj project specified by path.

创建走带对象
针对给定 Wwise 对象创建走带对象。

Creating an Actor-Mixer
在 Default Work Unit 下创建新的 'Guns' Virtual Folder。若已存在同名的文件夹,则自动命名为唯一名称。

Creating multiple child hierarchies of objects in batch
在多个对象下一并创建子对象层级结构:#1. 在给定父对象下创建新的 'Boom' Sound 对象。#2. 在 Default Work Unit 下创建新的 'Guns' Virtual Folder。若已存在同名的文件夹,则自动命名为唯一名称。#3. 在 'WAAPI' 虚文件夹下创建 'Play_SFX' Event,并为 SFX 声音对象添加 Play 动作。#4. 在给定父对象下创建 'Boom' Random Container,并在其中添加 'A' 和 'B' Sound 对象。#5. 按照给定名称和时间(毫秒)在现有 Music Segment 内创建 Custom Cue。参见有关 ak.wwise.core.object.create 的示例来对比两种架构。

Creating new Source Plug-ins for a Voice
针对 "English(US)" 和 "French" 语言为使用 Silence 和 SoundSeed Grain 插件的 Voice 创建两个新的 Source 对象。

定义对象的 Attenuation 曲线
通过设置一系列 "points" 来为 "object" 定义 "curveType" 类型的 Attenuation 曲线。

Deleting a new file to source control.
Remove an existing file to the SFX directory and the source control.

按照 GUID 删除对象
删除由 GUID 指定的对象。

按照路径删除对象
删除由路径指定的 MyTone 对象。

销毁走带对象
销毁给定走带对象。

禁用性能分析器数据
禁用 "Voices Data"。

与游戏断开连接
与当前所连游戏或进程断开连接。

启用 ak.wwise.core.profiler.getVoiceContributions 所需的性能分析器数据
针对 enable 属性使用默认值 (true) 启用 "Voices Data" 和 "Voice Inspector Data"。

启用性能分析器数据
启用 "Voices Data"。

结束某个 Undo Group
结束某个 Undo Group。

执行不需要对象参数的命令
执行 "ResetAllMutes" 命令。

执行需要对象参数的命令
针对由 "objects" 的 GUID 定义的对象执行 "ConvertCurrentPlatform"。

在 Project Explorer 中查找并选中对象
在 Project Explorer 视图中查找并选中给定对象 (Selection Channel 1)。

通过指定 Inclusion 来生成新的 SoundBank
通过示例调用来导入并生成新的 SoundBank,但不会将 SoundBank 保存到工程中。如需了解如何检索 SoundBank 数据,请参阅 ak.wwise.core.soundbank.generated 章节。

通过指定 Inclusion 来在磁盘上生成新的 SoundBank
导入并生成新的 SoundBank,然后将其写入到磁盘上的 SoundBank 生成文件夹。

Generating a short sine tone WAV file
Generates a 1 second mono WAV file that contains a sine waveform, with a very short attack and release.

生成多个现有 SoundBank 而不将其写入到磁盘中
生成多个已存在于工程中的 SoundBank,并通过 WAAPI 对 SoundBank 数据进行流传输。如需了解如何检索 SoundBank 数据,请参阅 ak.wwise.core.soundbank.generated 章节。

获取 State Group 的状态
通过 GUID 获取 "PlayerHealth" State Group 的当前状态。

获取 Game Object 的 Switch 的状态
获取 "Footstep" Game Object 的 "Surface" Switch Group 的状态。

获取有关 Curve 的信息
使用 "points" 访问器获取曲线的控制点。

获取有关 RTPC 的信息
使用属性/引用访问器 @ 获取 RTPC 的 "PropertyName" 属性及 "ControlInput" 和 "Curve" 引用。

获取声音的 "RTPC" 列表的 RTPC ID
使用列表访问器 @ 引用 "RTPC" 列表。注意,RTPC 未命名。

获取走带对象的 State
获取给定走带对象的 State。

Getting all Conversion Plug-ins
Using a WAQL query in order to retrieve all Conversion Plug-ins.

获取所有包含 Sound 对象的对象
检索至少有一个子对象为 Sound 对象的对象的 ID。可使用 "distinct" 转换来滤掉重复项。

获取所有平台
检索平台的 ID 和名称。

获取对象的 Attenuation 曲线
从由 "object" 指定的对象获取 "curve"。

获取对象的名称
返回对象的“名称”属性。

获取可用主机
获取可用主机以连接声音引擎。

获取有关 Wwise 的信息
获取有关当前所连 Wwise 的信息。

统一获取各个声道的峰值
获取 Audio Source 对象的峰值。

统一获取各个声道的峰值
在修剪区域内获取 Audio Source 对象的峰值。

单独获取每个声道的峰值
获取 Audio Source 对象的峰值。

单独获取每个声道的峰值
在修剪区域内获取 Audio Source 对象的峰值。

获取声音对象的活跃音频源
使用 "activeSource" 访问器获取声音的活跃音频源。

获取 Switch Container 的指派
获取包含 Switch Container 指派的列表。

获取连接状态
检索当前连接状态。在本例中,Wwise 被连接到了 Integration Demo。

Getting the current output bus
Returns the output bus that the object is currently using. The bus returned in the result is either inherited from a parent at a higher level in the hierarchy or is an override (the result does not distinguish between inherited or overridden busses).

获取与筛选器匹配的下级对象
检索 Actor-Mixer Hierarchy 下的所有下级对象,并返回名称以 'My' 为开头的对象。此项使用 '^My' 正则表达式。

获取有关当前 Project 的信息
获取有关当前所打开工程的信息。

获取包含所有对象类型的列表
检索包含所有对象类型的列表。

Getting the objects using an effect
Uses the referencesTo and owner accessors to get the list of objects using the effect ShareSet.

获取工程名称、路径和未同步状态
检索工程名称、文件路径和未同步状态。注意,工程名称在 WPROJ MXL 中定义,其有可能跟文件名不一致。如需了解如何在 Mac 上使用 WAAPI,请参阅 在 Mac 上使用 WAAPI 章节。

获取对象的属性和引用
返回对象的声部音量和输出总线。

获取选定对象
检索选定对象的 GUID。

Getting the source control status of a file
Returns the source control status and owner of the file.

获取对象的音量
返回 Master Audio Bus 的音量。

从文件导入 SoundBank Definition
从给定文本文件导入 SoundBank Definition。

Importing Base64 content to create a Sound SFX object
Creates a Source SFX object and an audio file source object and imports the specified base64 content as a WAV file.

Importing WAV files into Impacter source plug-in
Creates a Sound and an Impacter source plug-in, then imports WAV files.

Importing a MIDI file into a Music Segment to create a Music Track
Creates a Music Segment from the imported MIDI file. A Music Track and a Music Clip are also created.

Importing a WAV file into Soundseed Grain source plug-in
Creates a Sound and a Soundseed Grain source plug-in, then imports a WAV file.

Importing a WAV file into a Convolution Reverb effect plug-in
Creates a Sound and a Convolution Reverb effect plug-in, then imports a WAV file as an impulse response.

Importing a WAV file into a Music Track to create a Music Clip
Creates a Music Segment, a Music Track, and imports its WAV file. A Music Track is also created.

Importing a WAV file into a Sound Voice
Creates a Sound Voice object and an audio file source object and imports its wave file for English localization.

Importing a WAV file into a new Sound SFX and creating the associated Event
Creates a new Sound object, imports a WAV file into it, and then creates an Event with a Play action on the Sound.

Importing a WAV file into an Audio File Source
Creates a Sound SFX object and its audio source. The property field Sound object is also set.

Importing a WAV file to create a Sound SFX object
Creates a Source SFX object and an audio file source object and imports its wave file.

导入音频文件
通过制表符分隔文件导入音频文件。

Importing an audio file to create a Sound SFX using a relative object path
Imports files using the importLocation, a relative objectPath, and an objectType.

Importing an audio file to create a Sound SFX using an absolute object path
Imports files using an absolute objectPath that includes the object type.

Importing an audio file to create a Sound Voice for English
Imports files using an absolute objectPath and specifying the English language.

Importing an audio file to create a Sound Voice for French
Imports files using an absolute objectPath and specifying the French language.

Importing an audio files to create Sound Voices for English and French
Imports files using an absolute objectPath and specifying the language for each entry.

Importing audio files and creating multiple Sound SFX
将由 "audioFile" 指定的文件导入到 "objectPath" 下。

Importing audio files to create Sound SFX and Audio File Sources
Imports files using an absolute objectPath that includes the object type for the Sound SFX and the Audio File Source.

Importing two WAV files into a Music Segment to create two Music Tracks
Creates a Music Segment, and imports two WAV files. Two new Music Tracks and two Music Clips are also created.

Importing two WAV files to create two Sound SFX objects
Creates two Sound SFX objects and two audio file source objects and imports their wave files.

针对 Event 执行 Stop 动作
针对给定 Event 执行 Stop 动作,在 5 秒内按照 log1 曲线淡出。

将对象移动到新的父对象
移动由 "id" 定义的对象,并将其作为 "parent" 的子对象。若 "parent" 已经包含同名子对象,则无法移动对象。

将对象移动到包含同名子对象的父对象
移动由 "id" 定义的对象,并将其作为 "parent" 的子对象。若 "parent" 已经包含同名子对象,则对相应对象进行重命名。

Mute a WwiseObject
Mutes the object specified by "object".

将给定对象静音
执行 "Mute" 命令并指定 Mute 状态。

Opening a project
打开由路径指定的 .wproj 工程。

打开工程
打开由路径指定的 .wproj 工程。

粘贴列表
将存在差异的属性、引用和列表从源对象粘贴到目标对象。只会粘贴选定 "RTPC" 列表,不会粘贴存在差异的属性或引用。

粘贴列表和所有属性及引用
将存在差异的属性、引用和列表从源对象粘贴到目标对象。只会随所有属性和引用一起粘贴 "RTPC" 列表。源对象只包含 "RTPC" 和 "Metadata" 列表。

粘贴属性和所有列表
将存在差异的属性、引用和列表从源对象粘贴到目标对象。只会随源对象的所有列表一起粘贴 "Volume" 属性。源对象只包含 "RTPC" 和 "Metadata" 列表。

粘贴默认项
将存在差异的属性、引用和列表从源对象粘贴到目标对象。将粘贴所有差异项。

不粘贴排除项
将存在差异的属性、引用和列表从源对象粘贴到目标对象。为列表选择非默认 Paste Mode 并粘贴 "Volume" 属性和 "RTPC" 列表以外的所有条目。

粘贴包含项
将存在差异的属性、引用和列表从源对象粘贴到目标对象。仅粘贴 "Volume" 属性和 "RTPC" 列表。

Performing a redo
Performs a redo.

执行“撤销”操作
执行“撤销”操作。

播放走带对象
播放给定走带对象。

Playing converted files
Setting the useOriginals global option to play converted files

按照 GUID 发送 Trigger
按照 GUID 发送给定 "trigger" 以作用于 "gameObject"。

按照名称发送 Trigger
按照名称发送给定 "trigger" 以作用于 "gameObject"。

按照 Short ID 发送 Event
使用 Event 的 Short ID 将 Event 发送到声音引擎。

按照名称发送 Event
使用 Event 的名称将 Event 发送到声音引擎。

按照对象 GUID 发送 Event
使用 Event 的 GUID 将 Event 发送到声音引擎。

准备 Event
准备对象及其依赖项以供播放并用于走带对象。

查询在 1 分钟或之前注册的游戏对象
获取注册时间为 60,000 毫秒或更早的游戏对象。

Querying the CPU usage at a point in time.
Queries the CPU usage in the current capture session at the latest capture time.

Querying the Loaded Media at a point in time.
Queries the active Loaded Media in the current capture session at the latest capture time.

Querying the Performance Monitor at a point in time.
Queries the Performance Monitor Counters in the current capture session at the latest capture time. For the purposes of this example only a subset of the returned counters are displayed.

在某个时间点查询 RTPC 值及 ID
在当前捕获会话的 30 秒(30,000 毫秒)位置查询活跃的 RTPC。

Querying the Streamed Media at a point in time.
Queries the active Streamed Media in the current capture session at the latest capture time.

在某个时间点查询总线名称
在当前捕获会话的 30 秒(30,000 毫秒)位置查询总线。

通过 Capture Time Cursor 查询 Audio Object 的游戏对象属性
指定 Capture Time Cursor 作为处理调用时捕获会话的最新时间来查询 Audio Object。

通过 Capture Time Cursor 查询声部的游戏对象属性
指定 Capture Time Cursor 作为处理调用时捕获会话的最新时间来查询声部。

在某个时间点查询 Audio Object 的 Instigator ID (Pipeline ID)
在当前捕获会话的 30 秒(30,000 毫秒)位置查询 Audio Object 的 Instigator ID (Pipeline ID)。

在某个时间点查询声部名称
在当前捕获会话的 30 秒(30,000 毫秒)位置查询声部。

将命令注册为 Edit in Visual Studio Code
注册要在新的 Extra 菜单中显示的命令。

将命令注册为 Edit in Wavosaur
注册只在上下文菜单中显示的命令。

将命令注册为 Programless registration
注册不含任何程序的命令。通常用作 WAAPI 中的回调。最简单的示例。

注册游戏对象
注册 "MyGameObjectName" 游戏对象。

从 Switch Container 中移除指派
相当于在 Assigned Objects 视图中选中并删除指派给 State 的子对象。

对 WwiseObject 进行重命名
将由 "object" 指定的对象重命名为 "value"。

使用 GUID 重置 RTPC 值
针对 "gameObject" 使用 GUID 将 "rtpc" 的值重置为默认值。

使用名称重置 RTPC 值
针对 "gameObject" 使用名称将 "rtpc" 的值重置为默认值。

Retrieve all audio files in a specific folder
Returns the absolute path of audio files in a folder.

Retrieve all audio files in the projet
Return the absolute path of audio files that are not used by a Wwise object and all folders under the Originals folder.

Retrieve unused audio files in the projet
Return the path of audio files that are not used by a Wwise object.

检索 SoundBank 的 Inclusion 列表
获取 SoundBank 的 Inclusion 列表。

检索有关对象属性的信息
检索有关对象属性的信息。

检索 SoundBank 日志
使用 'soundbankGenerate' 通道来检索最新的 SoundBank 生成日志。

检索包含对象属性和引用名称的列表
检索包含对象属性和引用名称的列表。

检索包含走带对象的列表
检索包含走带对象的列表。

返回属性和列表差异
返回 2 个对象之间的属性和列表差异。

Reverting a file modification in the source control.
The modification is canceled and the contents of the file return to what was before the checkout.

Saving a profiler capture
Saves the current profiler capture to the file "capture.prof".

保存当前工程
保存当前工程。

按照文本搜索对象
搜索名称中包含 'gun' 的对象。

搜索特定类别的对象
检索“文本”属性中带有 "Tone" 的对象的 ID 和名称,并对结果进行筛选来仅获取 "Actor-Mixer Hierarchy" 类别下的对象。

搜索特定类型的对象
检索“文本”属性中带有 "Tone" 的对象的 ID、名称和备注,并对结果进行筛选来仅获取 "Sound" 类型的对象。有关可用类型的信息,请参阅 Wwise 对象参考 章节。

寻址到时长的 35%
在时长的 35% 位置对 "event" 的 Play 动作中引用的 "gameObject" 进行寻址。

寻址到 1 秒位置
在 1 秒位置对 "event" 的 Play 动作中引用的 "gameObject" 进行寻址。

将消息发送到 Profiler
将 "message" 发送到 Profiler。

Set state properties to a Sound
Sets BypassEffects and Volume state properties to a Sound.

设置游戏对象的听者列表
将 "listeners" 设为 "gameObject" 的活跃听者列表。

使用 GUID 设置 RTPC 值
针对 "gameObject" 使用 GUID 将 "rtpc" 的值设为 "value"。

使用名称设置 RTPC 值
针对 "gameObject" 使用名称将 "rtpc" 的值设为 "value"。

Setting an effect plug-in
Sets the effects of a Sound to a newly created Custom RoomVerb Effect plug-in.

设置对象引用
为给定对象设置 Output Bus。

为游戏对象设置多个位置
按照 "positions" 中的定义为 "gameObject" 设置多个位置以模拟一个在播声音对应的多个声源。

设置 RTPC 的 "Curve" 引用
设置给定 RTPC 的曲线控制点。

设置游戏对象的 Auxiliary Bus
设置 "listener" 对应 "emitter" 的 Auxiliary Bus,分别为其指定总线名称和数值。

使用 Short ID 将 State Group 设为另一 State
将 "stateGroup" 设为 "state"。

使用名称将 State Group 设为另一 State
将 "stateGroup" 设为 "state"。

使用 Short ID 将 Switch Group 设为另一 State
针对 "gameObject" 将 "switchGroup" 设为 "switchState"。

使用名称将 Switch Group 设为另一 State
针对 "gameObject" 将 "switchGroup" 设为 "switchState"。

为 Sound 对象的 Volume 属性设置 Randomizer 值
为由 "object" 定义的对象的 "Volume" 属性设置 Randomizer 值。

为 Sound Voice 设置活跃音频源
为 Sound Voice 设置活跃音频源。Sound 有一个主要音频源和一个备用音频源。

设置听者对应发声体的输出总线音量
使用倍数控制值将听者对应发声体的输出总线音量放大。

设置默认听者列表
将 "listeners" 设为默认听者列表。

设置听者空间化
使用 "volumeOffsets" 设置 "listener" 的空间化以将声像摆位到左侧。

设置对象的备注
为由 "object" 定义的对象设置备注。

设置游戏对象的声障和声笼电平
设置 "listener" 对应 "emitter" 的 "obstructionLevel" 和 "occlusionLevel"。

设置游戏对象的位置
按照给定朝向将 "gameObject" 的位置设为 "position/position"。

设置游戏对象的缩放系数
将 "gameObject" 的缩放系数设为 "attenuationScalingFactor" (200%)。

Setting the trigger of a MusicStinger.
The object field contains the id of the MusicStinger we want to change.

针对给定平台设置给定属性的值
将由 "object" 定义的对象的 "Volume" 属性设为 "Value"。

设置名称、备注、属性和引用的值
设置 "object" 所定义对象的名称、备注、"Volume" 属性和 "OutputBus" 引用。参见有关 ak.wwise.core.object.setNameak.wwise.core.object.setNotesak.wwise.core.object.setPropertyak.wwise.core.object.setReference 的示例来对比两种架构。

设置音量
将由 "object" 定义的对象的 "Volume" 属性设为 "Value"。

Solo a WwiseObject
Solos the object specified by "object".

停止播放当前在播内容
停止播放与 "playingId" 关联的内容,在 "transitionDuration" 内按照线性曲线淡出。

停止播放当前在播内容
停止播放所有与 "gameObject" 关联的内容。

停止播放所有走带对象
停止播放所有走带对象。

切换走带对象的播放状态(暂停/继续)
切换给定走带对象的播放状态(暂停/继续)。

切换走带对象的播放状态(播放/停止)
切换给定走带对象的播放状态(播放/停止)。

切换给定对象的 Mute 状态
执行 "Mute" 命令但不指定值,以此来切换当前状态。

Unmute all objects
Unmute all muted objects in Wwise.

注销游戏对象
注销 "gameObject"。

注销一系列命令
注销 ak.wwise.ui.commands.register 示例中的所有命令。

Unsolo all objects
Unsolo all soloed objects in Wwise.


此页面对您是否有帮助?

需要技术支持?

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

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

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

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

开始 Wwise 之旅