版本

menu_open
Wwise SDK 2023.1.3
Wwise Authoring API 参考 – 函数

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

ak.soundengine.executeActionOnEvent
针对给定 Event 的 Play 动作中引用的所有节点执行相应动作。参阅 AK::SoundEngine::ExecuteActionOnEvent 章节。

ak.soundengine.getState
获取 State Group 的当前状态。在 getState 之前使用 setState 时,允许有短暂的延迟(不超过 10 ms),以便在声音引擎中更新信息。

ak.soundengine.getSwitch
获取给定 Game Object 的 Switch Group 的当前状态。

ak.soundengine.loadBank
Load a SoundBank. See AK::SoundEngine::LoadBank.

ak.soundengine.postEvent
按照 Event ID 将 Event 异步发送到声音引擎。参阅 AK::SoundEngine::PostEvent 章节。

ak.soundengine.postMsgMonitor
在 Profiler 的 Capture Log 视图中显示消息。

ak.soundengine.postTrigger
发送给定 Trigger。参阅 AK::SoundEngine::PostTrigger 章节。

ak.soundengine.registerGameObj
注册游戏对象。将游戏对象注册两次并没有什么作用。注销一次便可将其彻底注销,无论其之前被注册过多少次。参阅 AK::SoundEngine::RegisterGameObj 章节。

ak.soundengine.resetRTPCValue
将 RTPC 的值重置为 Wwise 工程中指定的默认值。参阅 AK::SoundEngine::ResetRTPCValue 章节。

ak.soundengine.seekOnEvent
在内部对给定 Event 的 Play 动作中引用的所有在播对象进行寻址。参阅 AK::SoundEngine::SeekOnEvent 章节。

ak.soundengine.setDefaultListeners
为所有后续注册的游戏对象设置默认的活跃听者。参阅 AK::SoundEngine::SetDefaultListeners 章节。

ak.soundengine.setGameObjectAuxSendValues
设置 Auxiliary Bus 以输出给定游戏对象。参阅 AK::SoundEngine::SetGameObjectAuxSendValues 章节。

ak.soundengine.setGameObjectOutputBusVolume
设置给定游戏对象的输出总线音量(直达声)。参阅 AK::SoundEngine::SetGameObjectOutputBusVolume 章节。

ak.soundengine.setListeners
设置单个游戏对象的活跃听者。在默认情况下,所有新的游戏对象都没有活跃听者,不过可使用 SetDefaultListeners() 来改写此行为。非活跃听者不实施计算。参阅 AK::SoundEngine::SetListeners 章节。

ak.soundengine.setListenerSpatialization
设置听者的空间化参数。这样方便定义各个音频声道的听者特定音量偏置。参阅 AK::SoundEngine::SetListenerSpatialization 章节。

ak.soundengine.setMultiplePositions
为单个游戏对象设置多个位置。通过为单个游戏对象设置多个位置,只需占用一个声部的资源就可模拟多个声源。我们可以采用这种方式来模拟墙壁开口、区域声音或在同一区域发出相同声音的多个对象。参阅 AK::SoundEngine::SetMultiplePositions 章节。

ak.soundengine.setObjectObstructionAndOcclusion
设置游戏对象的声障和声笼电平。此函数用于影响对象应当如何被特定听者听到。参阅 AK::SoundEngine::SetObjectObstructionAndOcclusion 章节。

ak.soundengine.setPosition
设置游戏对象的位置。参阅 AK::SoundEngine::SetPosition 章节。

ak.soundengine.setRTPCValue
设置 RTPC 的值。参阅 AK::SoundEngine::SetRTPCValue 章节。

ak.soundengine.setScalingFactor
设置游戏对象的缩放系数。您可以修改此游戏对象的衰减计算结果,以便模拟具有更大或更小传播区域的声音。参阅 AK::SoundEngine::SetScalingFactor 章节。

ak.soundengine.setState
设置 State Group 的 State。参阅 AK::SoundEngine::SetState 章节。

ak.soundengine.setSwitch
设置 Switch Group 的 State。参阅 AK::SoundEngine::SetSwitch 章节。

ak.soundengine.stopAll
停止播放与给定游戏对象 ID 关联的当前内容。若未指定游戏对象,则停止播放所有声音。参阅 AK::SoundEngine::StopAll 章节。

ak.soundengine.stopPlayingID
停止播放与给定 Playing ID 关联的当前内容。参阅 AK::SoundEngine::StopPlayingID 章节。

ak.soundengine.unloadBank
Unload a SoundBank. See AK::SoundEngine::UnloadBank.

ak.soundengine.unregisterGameObj
注销游戏对象。将游戏对象注册两次并没有什么作用。注销一次便可将其彻底注销,无论其之前被注册过多少次。允许注销在使用的游戏对象,但是会失去对其参数的控制。比方说,与此游戏对象关联的声音是在 3D 空间内移动的声音。在注销游戏对象后其会停止移动,而且无法恢复对它的控制。参阅 AK::SoundEngine::UnregisterGameObj 章节。

ak.wwise.console.project.close
关闭当前工程。This operation is synchronous.

ak.wwise.console.project.create
Creates, saves and opens new empty project, specified by path and platform. The project has no factory setting WorkUnit. This operation is synchronous.

ak.wwise.console.project.open
打开由路径指定的工程。This operation is synchronous.

ak.wwise.core.audio.import
创建 Wwise 对象并导入音频文件。This function does not return an error when something fails during the import process, please refer to the log for the result of each import command. 此函数使用 Audio File Importer 中 Tab Delimited import 提供的同一导入处理器。函数会返回包含所有创建、替换或重用的对象的数组。使用选项来指定如何返回对象。有关详细信息,请参阅 导入音频文件和创建架构 章节。

ak.wwise.core.audio.importTabDelimited
通过制表符分隔文件创建脚本化对象并导入音频文件。

ak.wwise.core.audio.mute
Mutes an object.

ak.wwise.core.audio.resetMute
Unmute all muted objects.

ak.wwise.core.audio.resetSolo
Unsolo all soloed objects.

ak.wwise.core.audio.solo
Solos an object.

ak.wwise.core.audioSourcePeaks.getMinMaxPeaksInRegion
在音频源的给定区域以二进制字符串数组形式获取最小/最大峰值对(每个声道对应一个字符串)。字符串为 base-64 编码的 16 位有符号整数数组(交错存取最小值和最大值)。若 getCrossChannelPeaks 为 true,则仅有一个二进制字符串(代表所有声道的全局峰值)。

ak.wwise.core.audioSourcePeaks.getMinMaxPeaksInTrimmedRegion
针对每个声道在音频源的整个修剪区域以二进制字符串数组形式获取最小/最大峰值对(每个声道对应一个字符串)。字符串为 base-64 编码的 16 位有符号整数数组(交错存取最小值和最大值)。若 getCrossChannelPeaks 为 true,则仅有一个二进制字符串(代表所有声道的全局峰值)。

ak.wwise.core.executeLuaScript
Execute a Lua script. Optionally, specify additional Lua search paths, additional modules, and additional Lua scripts to load prior to the main script. The script can return a value. All arguments will be passed to the Lua script in the "wa_args" global variable.

ak.wwise.core.getInfo
检索全局 Wwise 信息。

ak.wwise.core.getProjectInfo
检索有关当前所打开工程的信息,包括平台、语言和工程目录。

ak.wwise.core.log.addItem
Adds a new item to the logs on the specified channel.

ak.wwise.core.log.clear
Clears the logs on the specified channel.

ak.wwise.core.log.get
检索特定通道的最新日志。Refer to ak.wwise.core.log.itemAdded to be notified when an item is added to the log. The log is empty when used in WwiseConsole.

ak.wwise.core.object.copy
将对象复制到给定父对象。Note that if a Work Unit is copied, the operation cannot be undone and the project will be saved.

ak.wwise.core.object.create
创建 'type' 类型的对象作为 'parent' 的子对象。如需详细了解如何创建对象,请参阅 导入音频文件和创建架构 章节。如需了解如何将音频文件导入到 Wwise 中,请参阅 ak.wwise.core.audio.import 章节。To create Effect or Source plug-ins, use ak.wwise.core.object.set, and refer to Wwise 对象参考 for the classId.

ak.wwise.core.object.delete
删除给定对象。Note that if a Work Unit is deleted, the operation cannot be undone and the project will be saved.

ak.wwise.core.object.diff
将源对象的属性和列表与目标对象进行比对。

ak.wwise.core.object.get
按照选项中所作指定针对每个对象执行查询并在查询结果中返回数据。该查询可指定 'waql' 或 'from' 参数以及可选的 'transform' 参数。有关详细信息,请参阅 使用 Wwise Authoring Query Language (WAQL)查询 Wwise 工程 章节。如需了解有关选项的信息,请参阅 返回选项 章节。

ak.wwise.core.object.getAttenuationCurve
针对给定 Attenuation 对象获取给定 Attenuation 曲线。

ak.wwise.core.object.getPropertyAndReferenceNames
检索包含对象属性和引用名称的列表。

ak.wwise.core.object.getPropertyInfo
检索有关对象属性的信息。注意,此函数并不返回属性的值。如需了解如何检索属性的值,请参阅 ak.wwise.core.object.get返回选项 章节。

ak.wwise.core.object.getPropertyNames
ak.wwise.core.object.getTypes
检索包含 Wwise 对象模型中注册的所有对象类型的列表。此函数返回 Wwise 对象参考 的对应项。

ak.wwise.core.object.isLinked
Indicates whether a property, reference, or object list is bound to a particular platform or to all platforms.

ak.wwise.core.object.isPropertyEnabled
若依据所基于的属性的值启用了属性,则返回 true。

ak.wwise.core.object.move
将对象移动到给定父对象。返回被移动的对象。

ak.wwise.core.object.pasteProperties
将某一对象的属性、引用和列表粘贴到若干目标对象。仅粘贴源对象和目标对象之间存在差异的属性、引用和列表。如需详细了解各种对象类型的可用属性、引用和列表,请参阅 Wwise 对象参考 章节。

ak.wwise.core.object.set
允许批量处理以下操作:在子对象层级结构下创建对象;在列表中创建对象;设置名称、备注、属性和引用。如需详细了解如何创建对象,请参阅 导入音频文件和创建架构 章节。如需了解如何将音频文件导入到 Wwise 中,请参阅 ak.wwise.core.audio.import 章节。

ak.wwise.core.object.setAttenuationCurve
针对给定 Attenuation 对象设置给定 Attenuation 曲线。

ak.wwise.core.object.setLinked
Link or unlink a property/reference or object list to a particular platform.

ak.wwise.core.object.setName
对对象进行重命名。

ak.wwise.core.object.setNotes
设置对象的备注。

ak.wwise.core.object.setProperty
针对特定平台设置对象的属性值。如需详细了解各种对象类型的可用属性,请参阅 Wwise 对象参考 章节。如需了解如何设置对对象的引用,请参阅 ak.wwise.core.object.setReference 章节。如需了解如何获取对象的属性值,请参阅 ak.wwise.core.object.get 章节。

ak.wwise.core.object.setRandomizer
针对特定平台设置对象属性的 Randomizer 值。如需详细了解各种对象类型的可用属性,请参阅 Wwise 对象参考 章节。

ak.wwise.core.object.setReference
设置对象的引用值。如需详细了解各种对象类型的可用引用,请参阅 Wwise 对象参考 章节。

ak.wwise.core.object.setStateGroups
Sets the State Group objects associated with an object. Note, this will remove any previously associated State Group.

ak.wwise.core.object.setStateProperties
Set the state properties of an object. Note, this will remove any previous state property, including the default ones.

ak.wwise.core.plugin.getList
ak.wwise.core.plugin.getProperties
ak.wwise.core.plugin.getProperty
ak.wwise.core.profiler.enableProfilerData
指定所要捕获的数据的类型。不沿用用户的 Profiler Settings。

ak.wwise.core.profiler.getAudioObjects
在特定性能分析器捕获时间点检索 Audio Object。

ak.wwise.core.profiler.getBusses
在特定性能分析器捕获时间检索总线。

ak.wwise.core.profiler.getCpuUsage
Retrieves CPU usage statistics at a specific profiler capture time. This data can also be found in the Advanced Profiler, under the CPU tab. To ensure the CPU data is received, refer to ak.wwise.core.profiler.enableProfilerData. The returned data includes "Inclusive" and "Exclusive" values, where "Inclusive" refers to the time spent in the element plus the time spent in any called elements, and "Exclusive" values pertain to execution only within the element itself.

ak.wwise.core.profiler.getCursorTime
返回给定性能分析器光标的当前时间(毫秒)。

ak.wwise.core.profiler.getGameObjects
在特定性能分析器捕获时间点检索游戏对象。

ak.wwise.core.profiler.getLoadedMedia
Retrieves the loaded media at a specific profiler capture time. This data can also be found in the Advanced Profiler, under the Loaded Media tab. To ensure the Loaded Media data is received, refer to ak.wwise.core.profiler.enableProfilerData.

ak.wwise.core.profiler.getPerformanceMonitor
Retrieves the Performance Monitor statistics at a specific profiler capture time. Refer to Wwise Authoring Performance Monitor Counter Identifiers for the available counters.

ak.wwise.core.profiler.getRTPCs
在特定性能分析器捕获时间检索活跃的 RTPC。

ak.wwise.core.profiler.getStreamedMedia
Retrieves the streaming media at a specific profiler capture time. This data can also be found in the Advanced Profiler, under the Streams tab. To ensure the Streams data is received, refer to ak.wwise.core.profiler.enableProfilerData.

ak.wwise.core.profiler.getVoiceContributions
检索影响声部路径的声部音量、高通滤波和低通滤波的所有参数(通过 Pipeline ID 进行解析)。

ak.wwise.core.profiler.getVoices
在特定性能分析器捕获时间检索声部。

ak.wwise.core.profiler.saveCapture
Saves profiler as a .prof file according to the given file path.

ak.wwise.core.profiler.startCapture
开始捕获性能分析器数据,并在捕获开始时返回时间(毫秒)。

ak.wwise.core.profiler.stopCapture
停止捕获性能分析器数据,并在捕获结束时返回时间(毫秒)。

ak.wwise.core.project.save
保存当前工程。

ak.wwise.core.remote.connect
Connects the Wwise Authoring application to a Wwise Sound Engine running executable or to a saved profile file. 主机必须在运行代码且启用了通信。若仅提供了 "host",则将 Wwise 连接到找到的第一个声音引擎实例。为了对不同的实例加以区分,还可提供所要连接的应用程序的名称。

ak.wwise.core.remote.disconnect
将 Wwise 设计工具与运行可执行文件的 Wwise 声音引擎断开连接。

ak.wwise.core.remote.getAvailableConsoles
检索所有可用主机以将 Wwise 设计工具连接到声音引擎实例。

ak.wwise.core.remote.getConnectionStatus
检索连接状态。

ak.wwise.core.sound.setActiveSource
设置用于给定声音的音频源版本。使用 ak.wwise.core.object.get 及 'activeSource' 返回选项获取声音的活跃音频源。

ak.wwise.core.soundbank.convertExternalSources
按照 wsources 文件中所述对工程的外部源文件进行转码,并将其放在默认文件夹或由输出参数指定的文件夹中。External Source 是在 Wwise 里您可以放到声音对象中的一种特殊类型的源(Source)。它表明在运行时将采用真实声音数据。若 SoundBank 生成也会触发 External Source 转码,则可利用此操作来处理未包含在 Wwise 工程中的源。请参阅 Wwise SDK 帮助页面“集成 External Source”。

ak.wwise.core.soundbank.generate
Generate a list of SoundBanks with the import definition specified in the WAAPI request. If you do not write the SoundBanks to disk, subscribe to ak.wwise.core.soundbank.generated to receive SoundBank structure info and the bank data as base64. Note: This is a synchronous operation.

ak.wwise.core.soundbank.getInclusions
检索 SoundBank 的 Inclusion 列表。

ak.wwise.core.soundbank.processDefinitionFiles
从给定文件导入 SoundBank 定义。可指定多个文件。打开 WAAPI 日志查看状态消息。

ak.wwise.core.soundbank.setInclusions
修改 SoundBank 的 Inclusion 列表。'operation' 参数决定 'inclusions' 参数如何修改 SoundBank 的 Inclusion 列表;可在 SoundBank 的 Inclusion 列表中添加/移除/替换 'inclusions'。

ak.wwise.core.sourceControl.add
Add files to source control. Equivalent to Mark for Add for Perforce.

ak.wwise.core.sourceControl.checkOut
Check out files from source control. Equivalent to Check Out for Perforce.

ak.wwise.core.sourceControl.commit
Commit files to source control. Equivalent to Submit Changes for Perforce.

ak.wwise.core.sourceControl.delete
Delete files from source control. Equivalent to Mark for Delete for Perforce.

ak.wwise.core.sourceControl.getSourceFiles
Retrieve all original files.

ak.wwise.core.sourceControl.getStatus
Get the source control status of the specified files.

ak.wwise.core.sourceControl.move
Move or rename files in source control. Always pass the same number of elements in files and newFiles. Equivalent to Move for Perforce.

ak.wwise.core.sourceControl.revert
Revert changes to files in source control.

ak.wwise.core.sourceControl.setProvider
Change the source control provider and credentials. This is the same setting as the Source Control option in the Project Settings dialog in Wwise.

ak.wwise.core.switchContainer.addAssignment
将 Switch Container 的子对象指派给 Switch。此函数相当于将子对象拖放到 Assigned Objects 视图中所列的 State。对于每个 State,都会在末尾添加子对象。

ak.wwise.core.switchContainer.getAssignments
返回包含 Switch Container 子对象和 State 之间的指派的列表。

ak.wwise.core.switchContainer.removeAssignment
移除 Switch Container 的子对象和 State 之间的指派。

ak.wwise.core.transport.create
针对给定 Wwise 对象创建走带对象。可使用返回的走带对象来播放、停止、暂停和继续播放 Wwise 对象(通过另一走带函数实现)。

ak.wwise.core.transport.destroy
销毁给定走带对象。

ak.wwise.core.transport.executeAction
针对给定走带对象或所有走带对象(如未作任何指定)执行某项动作。

ak.wwise.core.transport.getList
返回包含走带对象的列表。

ak.wwise.core.transport.getState
获取给定走带对象的 State。

ak.wwise.core.transport.prepare
准备对象及其依赖项以供播放。在通过 IAkGlobalPluginContext 调用 PostEventSync 或 PostMIDIOnEventSync 之前使用此函数。

ak.wwise.core.transport.useOriginals
Sets the Original/Converted transport toggle globally. This allows playing the original or the converted sound files.

ak.wwise.core.undo.beginGroup
开始某个 Undo Group。对于执行的每项 ak.wwise.core.beginUndoGroup 调用,确保仅调用 ak.wwise.core.undo.endGroup 一次。可嵌套对 ak.wwise.core.undo.beginGroup 的调用。在关闭 WAMP 会话时,将检查并确认是否所有 Undo Group 均已关闭。若未全部关闭,则针对每个仍处于打开状态的分组调用 cancelGroup。

ak.wwise.core.undo.cancelGroup
取消最后一个 Undo Group。

ak.wwise.core.undo.endGroup
结束最后一个 Undo Group。

ak.wwise.core.undo.redo
Redoes the last operation in the Undo stack.

ak.wwise.core.undo.undo
撤消 Undo 堆栈中的最后一项操作。

ak.wwise.debug.enableAsserts
启用 Debug 断言。每次使用 'false' 调用 enableAsserts 都会导致 ref 计数递增。若使用 true 调用,则 ref 计数递减。此函数仅在 Debug 版本中可用。

ak.wwise.debug.enableAutomationMode
针对 Wwise 启用或禁用自动化模式。这样可以减少由消息框和对话框造成的潜在中断。比如,在启用自动化模式后,将自动允许迁移工程、保存工程加载日志、接受 EULA、工程许可协议和一般弹出消息框。

ak.wwise.debug.generateToneWAV
Generate a WAV file playing a tone with a simple envelope and save it to the specified location. This is provided as a utility to generate test WAV files.

ak.wwise.debug.getWalTree
Retrieves the WAL tree, which describes the nodes that are synchronized in the Sound Engine. 仅限私人使用。

ak.wwise.debug.restartWaapiServers
Restart WAAPI servers. For internal use only.

ak.wwise.debug.testAssert
仅限私人使用。

ak.wwise.debug.testCrash
仅限私人使用。

ak.wwise.ui.bringToForeground
将 Wwise 主窗口调到前台。如需详细了解相关限制,请参阅 MSDN 上的 SetForegroundWindow 和 AllowSetForegroundWindow 章节。如需了解如何获取 AllowSetForegroundWindow 的 Wwise 进程 ID,请参阅 ak.wwise.core.getInfo 章节。

ak.wwise.ui.captureScreen
捕获相对于视图的部分 Wwise UI。

ak.wwise.ui.commands.execute
执行命令。有些命令可将一系列对象作为参数。有关可用命令的信息,请参阅 Wwise 设计工具命令标识符 章节。

ak.wwise.ui.commands.getCommands
获取命令列表。

ak.wwise.ui.commands.register
注册包含扩展命令的数组。保留注册的命令,直到 Wwise 进程终止。如需详细了解如何注册命令,请参阅 定义命令扩展 章节。另请参阅 ak.wwise.ui.commands.executed 章节。

ak.wwise.ui.commands.unregister
注销包含扩展 UI 命令的数组。

ak.wwise.ui.getSelectedObjects
检索用户当前在活跃视图中选中的一系列对象。

ak.wwise.ui.project.close
关闭当前工程。

ak.wwise.ui.project.create
Creates, saves and opens new empty project, specified by path and platform. The project has no factory setting WorkUnit. 如需进一步了解如何在操作完成时接收通知,请参阅 ak.wwise.core.project.loaded 章节。

ak.wwise.ui.project.open
打开由路径指定的工程。如需进一步了解如何在操作完成时接收通知,请参阅 ak.wwise.core.project.loaded 章节。

ak.wwise.waapi.getFunctions
检索包含函数的列表。

ak.wwise.waapi.getSchema
检索 WAAPI URI 的 JSON 架构。

ak.wwise.waapi.getTopics
检索包含客户端可订阅主题的列表。


此页面对您是否有帮助?

需要技术支持?

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

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

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

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

开始 Wwise 之旅