Welcome to the official Amplitude Audio SDK integration plugin for the Flax Engine. This plugin provides a seamless middleware implementation that hooks Amplitude Audio directly into the custom AudioSystem Plugin developed by Sparky Studios.
- Flax Engine
- Amplitude Audio SDK: You must have the SDK available on your system, and the
AM_SDK_PATHenvironment variable must be set pointing to the SDK directory. This is required for the plugin to compile. - AudioSystem Plugin: This custom plugin must be installed and enabled in your project before using the Amplitude Audio integration.
- AudioSystem Middleware Integration: Implements the custom
AudioSystemmiddleware interface, intercepting and processing audio calls through the Amplitude Audio SDK. - Flax-Native Subsystems: Routes Amplitude's internal memory allocation, logging, and file I/O operations through Flax's high-performance native APIs (
FlaxMemoryAllocator,FlaxLogger, andAmplitudeFileSystem). - Audio Controls Script: Easily manage your audio at runtime using the
AudioControlsScript. Attach it to any actor to automatically load/unloadAudioControlCollectionJSON assets based on the actor's lifecycle. - Editor Extensions: Custom editor integrations (like the
AudioControlsScriptEditor) to quickly reload and manage audio controls directly from the Flax Editor.
- Clone or download this repository into the
Plugins/directory of your Flax Engine project:cd YourFlaxProject mkdir -p Plugins cd Plugins git clone https://github.com/AmplitudeAudio/integration-flax.git AmplitudeAudio
- Open your project's
.flaxprojfile and ensure the plugin is referenced. - In your game's target build script (e.g.,
Source/GameTarget.Build.cs), addAmplitudeAudioto the module dependencies:Modules.Add("AmplitudeAudio");
- Regenerate your project's script files and build the project.
The plugin expects an Amplitude configuration file to be present in your project's content directory, which binds the platform profiles and points to your Amplitude project source and build outputs.
- Create a valid configuration JSON asset at:
Content/Sounds/Amplitude/Config.json. This can be done via the Flax Editor context menu (New -> Audio System -> Amplitude -> Configuration). - This asset must contain:
- Per-platform Profiles: E.g.,
InitSoundBankandEngineConfigFileentries required to initialize the Amplitude SDK on each platform. - ProjectBuildPath: The directory where your built
.ambankand.amconfigfiles are exported (e.g."build"). - ProjectSourcesPath: The directory containing your Amplitude project source files (e.g.
"sources").
- Per-platform Profiles: E.g.,
The plugin operates within the Content/Sounds/Amplitude/ base path. Below is an example of how your files should be structured if your ProjectBuildPath is set to "build" and ProjectSourcesPath is set to "sources":
YourFlaxProject/
└── Content/
└── Sounds/
└── Amplitude/
├── Config.json <-- Main configuration asset
├── MyControls.json <-- Generated AudioControlCollection
│
├── sources/ <-- ProjectSourcesPath
│ ├── .amproject <-- Amplitude project file (no name)
│ ├── pc.config.json <-- Source JSON definitions
│ ├── buses.json
│ ├── events/
│ ├── soundbanks/
│ └── ...
│
└── build/ <-- ProjectBuildPath
├── init.ambank
├── desktop.amconfig
├── mobile.amconfig
├── events/
├── soundbanks/
└── ...
At runtime, the middleware uses the ProjectBuildPath relative to Content/Sounds/Amplitude/ to mount the file system and load your banks. In the Editor, the ProjectSourcesPath is scanned to regenerate audio controls.
To load an AudioControlCollection at runtime:
- Create a new Actor in your scene.
- Add the
AudioControlsScriptto the Actor. - In the properties panel, set the
ControlsAssetPathto the project-relative path of your controls JSON file (e.g.,Content/Sounds/Amplitude/MyControls.json). - Keep
AutoLoadenabled to have the script automatically register all sound banks, triggers, switches, and RTPCs with the AudioSystem duringOnBeginPlay().
The plugin includes a custom editor extension. When selecting an Actor with an AudioControlsScript, you will see a "Reload Controls" button. This button scans your Amplitude project directory and writes the updated control definitions to your configured asset path.
This project is licensed under the Apache License, Version 2.0.
Copyright (c) 2026-present Sparky Studios. All rights reserved.
See the LICENSE file for more information.