Possible to route FMOD through bus in UE5?

Hi,

Firstly, as an aside, FMOD support for Audiolink is currently in development. However, AudioLink doesn’t allow FMOD audio to be routed into UE, only for UE audio to be routed into FMOD, which by the sounds of things probably doesn’t address your use-case.

While I’m unsure where exactly UE’s audio system exposes a buffer for you to submit sample data to, it is 100% possible to retrieve audio data from your FMOD system. This can be done in two ways: either by creating a custom output plugin for the FMOD system to output to, or by inserting a custom DSP into the system’s DSP graph. A custom output is cleaner to implement and is easier to synchronize with an external buffer, but only allows you to access the system’s final mix, whereas a custom DSP potentially allows you retrieve audio from different points within the system (i.e. multiple Buses).

To retrieve audio with a custom output plugin, you can define an FMOD_OUTPUT_MIXER_CALLBACK, use FMOD_OUTPUT_READFROMMIXER_FUNC within it to generate and retrieve audio from the mixer. If you need to synchronize your buffers, you can block within FMOD_OUTPUT_MIXER_CALLBACK until you need to execute a new mix. You will also need to modify FMODStudioModule.cpp to set the Core System’s output to your custom output plugin. I would recommend taking a look at the “output_mp3” Core API example for a basic example of how you might set up a custom Output plugin, as well as the Output Plugin API Docs.

For a custom DSP, the “dsp_custom” Core API example shows how to create a custom DSP that uses FMOD_DSP_READ_CALLBACK to access audio data that is input into a custom DSP, and how attach the DSP to a given channel in the FMOD system. You can find more info on the DSP Plugin API in our DSP Plugin API Reference.

As for using FMOD alongside UE native audio, you shouldn’t run into any issues besides a couple of platforms, where UE audio will need to be disabled. On iOS/tvOS, both systems require exclusive control of the AudioSession, and on XBOX One and Series X/S or PS5, where both systems attempt to consume all spatialization resources. Please read over the Disabling Unreal Audio Device section and Platform Specifics chapter of our Unreal Integration Docs for more info.

1 Like