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.
While I digest the first part of your message, I have a follow up question for the second (FMOD running along aside UE audio).
If FMOD is only being used for music - in 2D timeline events - and so not using up spatialsiation resources, would it still work along side UE’s audio system? We are not at the porting stage yet so I can’t test this myself, but we need to make a decision about what to do soon as I build the complex music systems!
Unfortunately no - FMOD will automatically attempt to claim spatialization resources on those platforms regardless of whether or not you’re using 3D spatialization. A new feature that provides a means of adjusting how much FMOD attempts to claim is currently scheduled for development, but I cannot provide a timeline for when development will begin or finish.
That said, there may be a workaround for this, so I’ll do some digging and get back to you.
Each of the platform packages for the FMOD Unreal integration contain FMODPlatform.cpp. By default, the function FMODPlatform_SetRealChannelCount() in FMODPlatform.cpp uses the “Real Channel Count” in your UE project’s FMOD settings as the amount of AT9/XMA codecs to use for PS5/GameCore respectively. However, if you modify the code to set the codec count to 0: