Version

menu_open
Warning: you were redirected to the latest documentation corresponding to your major release ( 2024.1.1.8691 ). Should you wish to access your specific version's documentation, please download the offline documentation from the Audiokinetic Launcher and check the Offline Documentation option in Wwise Authoring.
Target Platform(s):
Wwise SDK 2024.1.1
Android-Specific Information

This page contains information that is specific to using the Wwise SDK for the Android platform.

Platform Requirements

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 Release Notes.

Note:

  • To build the sample plug-ins on Android you need to use ndk-build.
  • The makefile is dependent on the Android NDK toolchain, as pointed by NDK_ROOT environment variable.

You can build the Android libraries using the script BuildAllAndroid.cmd with the desired platform and configuration (i.e. BuildAllAndroid.cmd armeabi-v7a debug) on windows in the SDK/source/SoundEngine folder. This will call ndk-build with the appropriate parameters. This script can target the 4 supported architectures (v7a, x86, v8a-64 and x86_64) in 3 configurations (debug, profile, release).

Using the "Fast Audio Path" (low-latency)

In recent OS versions, Google introduced the "Fast Audio Path". This bypasses some of the internal processing if some conditions are met, drastically reducing the latency of the OS and hardware processing. Please read Controlling Latency on Android for more details.

Deploying and Loading SoundBanks

There are three ways of deploying and loading SoundBanks on Android:

  1. Deploy SoundBanks as part of the Android application package (APK).
    Before deploying the application to devices, the SoundBanks have to be placed in the "assets" sub-folder of the Android NDK project and packaged normally with the APK (or an equivalent process with other tools). To read bank files from the APK, you must specify the path to the banks relative to the standard "assets" directory within the APK archive. Call CAkDefaultIOHookDeferred::SetBasePath() to do so. This is not done automatically.
  2. Deploy SoundBanks as part of an Android Application Split Binary (a.k.a. OBB). To read SoundBanks from an OBB, your banks must be in the same relative path within the OBB as in the main APK.
  3. Deploy SoundBanks to the Android device file system directly. The SoundBanks can be deployed anywhere in the file system of the device. You can add as many directories as you want with CAkDefaultIOHookDeferred::AddBasePath().

The default implementation of the low-level IO found in $<Wwise>/SDK/samples/SoundEngine/Android can access APK, OBB, and POSIX files. You must call the function CAkDefaultIOHookDeferred::InitAndroidIO with a JavaVM and the android.app.Activity to initialize both APK and OBB readers.

Note: The OBB archive must be unencrypted for the default Low Level IO to work. If not, you'll need to write your own IO.
Note: The OBB reading is done with libzip, please check the license under Libzip. If you do not accept the license, you can disable the use of LibZip by defining the symbol "REMOVE_LIBZIP" in your compilation flag. If so, you'll need to write your own IO hook to read OBB or uncompress the OBB before use.

The IO system will search for files in the given paths in the reverse order, newest added first, APK content last. This allows for DLC content to replace APK content.

Refer to Low-Level I/O on how to implement the low-level I/O submodule.

Android Library Flavors

The Wwise SDK precompiled libraries come compiled in these flavors:

  • armeabi-v7a with NEON
  • x86 with SSE
  • arm64-v8a with NEON
  • x86_64 with SSE

Android Audio APIs

Wwise supports the following audio APIs on Android:

By default, Wwise automatically selects the most suitable API based on a variety of parameters including:

  • Device make and model.
  • Android OS version.
  • Whether the Allow 3D Audio Audio Device property is enabled in the Wwise project.

To force Wwise to use a specific API, set AkPlatformInitSettings::eAudioAPI to the appropriate value.

3D Audio Support

Wwise 3D Audio is supported on Android. Two technologies are possible: Dolby Atmos and Android's Spatial Audio technology (distinct from Wwise Spatial Audio). Both are designed for headphone output and support a spatialized bed and a passthrough mix. System audio objects are not supported.

Wwise chooses the appropriate technology based on device capabilities and initialization settings. To activate 3D Audio, these conditions must be met:

  • The Allow 3D Audio Audio Device property is enabled in the Wwise project.
  • AkInitSettings::settingsMainOutput uses default settings, or specifies a standard channel configuration that has height channels such as 7.1.4 or 5.1.4.

When these conditions are met, 3D audio can be activated.

If the device supports Dolby Atmos, this technology is selected. Otherwise, if the following conditions are met, Android Spatial Audio is selected.

Android OS versions 13 and higher have Spatial Audio user preferences for wired and wireless headphones.

We recommend that you allow the user to choose whether to use 3D Audio through an in-game setting, and swap between two Audio Device sharesets based on this setting.

Using 3D Audio with Dolby Atmos

Upon initialization, when using 3D Audio with Dolby Atmos, the main mix is configured as 5.1.4. Dolby Atmos for Android does not support other channel configurations.

Note: Dolby Atmos is the preferred 3D Audio solution because it is optimized with latency suitable for gaming. However, note that Android does not support the low-latency "Fast Audio Path" when using Bluetooth headphones. For best results with Dolby Atmos, use wired headphones. See Using the "Fast Audio Path" (low-latency) for more information.

Using 3D Audio with Android Spatial Audio

Upon initialization, when using 3D Audio with Android Spatial Audio, the main mix is configured as 7.1.4 PCM (default), unless the Main Mix Configuration property of the Audio Device is set to a different value. These are the supported main mix PCM channel configurations for use with Android Spatial Audio:

  • 5.1.2
  • 5.1.4
  • 7.1.2
  • 7.1.4 (recommended)
Note: Android Spatial Audio does not support the low-latency "Fast Audio Path", even when using wired headphones. This is why Wwise does not activate Android Spatial Audio when AkPlatformInitSettings::bEnableLowLatency is set to false. See Using the "Fast Audio Path" (low-latency) for more information.

Android Release Notes


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