版本
Wwise SDK 2022.1.13
|
本页包含有关将 Wwise SDK 用于 Android 平台的特定信息。
To use the Wwise SDK with the Android platform, you must install the Android SDK, Android SDK Tools, and Android NDK. For the required versions, refer to the appropriate version of the Android 版本说明.
备注:
在 Windows 上,您可以根据所需平台和配置,使用 SDK/source/SoundEngine 文件夹中的 BuildAllAndroid.cmd 脚本(即 BuildAllAndroid.cmd armeabi-v7a debug)来构建 Android 库。这样会调用 ndk-build 及相应参数。 此脚本可在 3 种配置(Debug、Profile、Release)下构建 4 种支持的架构(v7a、x86、v8a-64 和 x86_64)。 |
在最近的操作系统版本中,谷歌引入了“快速音频路径”。如果满足一些条件,这样做会旁通一些内部处理,极大地减少操作系统和硬件处理的延迟。请参阅 控制Android上的延迟 了解更多详情。
在 Android 中部署和加载 SoundBank 有三种方式:
CAkDefaultIOHookBlocking::SetBasePath()
。此操作不会自动完成。CAkDefaultIOHookBlocking::AddBasePath()
添加任意数量的目录。位于 $<Wwise>/SDK/samples/SoundEngine/Android 中的底层 I/O 的默认实现可访问 APK、OBB 和 POSIX 文件。您必须使用 JavaVM 和 android.app.Activity 来调用 CAkDefaultIOHookBlocking::InitAndroidIO
函数,对 APK 和 OBB 文件解析器进行初始化。
备注: OBB 包必须解密,之后默认 Low-Level I/O 才能正常工作。否则需要编写自己的 IO。 |
备注: OBB 读取操作通过 libzip 执行,请检查 Libzip 下的授权。如果您不接受该授权,则可通过在编译选项中定义“REMOVE_LIBZIP”符号来禁用 LibZip。在这种情况下,您需要编写自己的 I/O hook 来读取 OBB 或在使用前解压 OBB。 |
IO 系统将在给定路径中逆序查找文件,先添加最新内容,最后添加 APK 内容。这样 DLC 内容便可替换 APK 内容了。
请参阅 Low-Level I/O 了解有关如何实现 Low-level I/O 子模块的信息。
安装包中的 Wwise SDK 库采用以下编译方式:
Android 专用 AkPlatformInitSettings
If you are using the Wwise Unreal Integration, you must set several options in the Unreal project to enable 3D Audio. Different speaker configurations (7.1.4, 5.1, and so on) require different configurations.
To configure Android 3D Audio options in Unreal: #- In the Unreal project, select Edit > Project Settings and in the Wwise section, select Android. The Wwise - Android settings page opens. #- Open Common Settings > Main Output Settings. #- Set the Panning Rule to Headphones. #- Set the Channel Config Type to Standard. #- Set the Channel Mask options according to the desired speaker configuration, listed in the following table:
Speaker configuration | Channel Mask settings |
---|---|
5.1 |
|
5.1.2 |
|
7.1 |
|
7.1.2 |
|
7.1.4 |
|