AudioLink Programmer Sound Issue

I’ve been attempting to get a MetaSound playing through AudioLink from a 3D position. I’ve assigned Attenuation Settings to the MetaSound that have Spatialization enabled and have Audio Link Enabled along with an Audio Link Settings override object. I have tried playing the sound using Play Sound At Location and passing in the MetaSound, as well as using an FMOD Audio Link component with the MetaSound assigned to it and using the same Audio Link Settings. In both cases, I see the Audio Link Event played in the FMOD Studio Profiler and it lasts for the correct duration (2 seconds), however the actual audio does not appear to be getting to FMOD (the meter on the event never shows any activity).

When I set FMODAudioLink logging to All, I see that an FMODAudioLinkInputClient is created and the Programmer Sound gets a Sound assigned to it. But FFMODAudioLinkInputClient::GetSamples is called only twice right after the sound is started. Meanwhile, FFMODAudioLinkSourcePushed::OnNewBuffer() is called repeatedly for the duration of the sound, as expected. This happens with both methods of playing the MetaSound. The only difference is that when I use Play At Location I can hear the sound coming through Unreal’s audio system, presumably because the audio is routing to the main submix.

The Programmer Instrument in the event in FMOD Studio is configured the same as shown in the FMOD Studio documentation.

I’m using FMOD 2.02.21, same version for the plugin and FMOD Studio.

I’m seeing the same behavior when attempting to play a 2D looping MetaSound that has a Submix assigned that is routed through a 2D AudioLink event in FMOD Studio. The FMOD Event starts when the level starts, I see only one call to FFMODAudioLinkInputClient::GetSamples and then the Programmer Sound Release callback fires when the FMOD Event ends on its own. The event is not stopped on the game side, nor is the MetaSound.

I sounds like the event/programmer sound is stopping naturally (which is confirmed by the Release callback firing), can you share an image of your event containing the programmer instrument?

Here’s the programmer instrument setup and the master track for the 3D event.


And here’s the debug output from triggering a sound. Again noting that calls to GetSamples from the fmod audio thread appear to stall immediately, whereas the audio link source pushes samples from the metasound for the full duration and the event/programmer sound are not cleaned up until that is done.

LogFMODAudioLink: VeryVerbose: FFMODAudioLinkFactory::CreateSourcePushedAudioLink: Create AudioLink SourcePushed.
LogFMODAudioLink: Verbose: FFMODAudioLinkSourcePushed::Ctor() Name=MSS_ElectricPiano, Producer=0x000005F74C01DE58, Consumer=0x000005F7C3466D90, p2c%=2.00, PlayEvent=AudioLink3D, TotalFramesForSource=479952000, This=0x000005F7B293FEB0
LogFMODAudioLink: VeryVerbose: FFMODAudioLinkSourcePushed::OnNewBuffer() Name=MSS_ElectricPiano, Producer=0x000005F74C01DE58, Consumer=0x000005F7C3466D90, SourceID=-1, RecievedFrames=-1/479952000, This=0x000005F7B293FEB0
LogFMODAudioLink: Verbose: FFMODAudioLinkInputClient::Start: SelSP = 981617273856, LinkEvent = 䫰릺Ȋ, InComponent = 981617273920.
LogFMODAudioLink: VeryVerbose: FFMODAudioLinkSourcePushed::OnNewBuffer() Name=MSS_ElectricPiano, Producer=0x000005F74C01DE58, Consumer=0x000005F7C3466D90, SourceID=1, RecievedFrames=255/479952000, This=0x000005F7B293FEB0
LogFMODAudioLink: VeryVerbose: FFMODAudioLinkSourcePushed::OnNewBuffer() Name=MSS_ElectricPiano, Producer=0x000005F74C01DE58, Consumer=0x000005F7C3466D90, SourceID=1, RecievedFrames=511/479952000, This=0x000005F7B293FEB0
LogFMODAudioLink: VeryVerbose: FFMODAudioLinkSourcePushed::OnNewBuffer() Name=MSS_ElectricPiano, Producer=0x000005F74C01DE58, Consumer=0x000005F7C3466D90, SourceID=1, RecievedFrames=767/479952000, This=0x000005F7B293FEB0
LogFMODAudioLink: VeryVerbose: FFMODAudioLinkSourcePushed::OnNewBuffer() Name=MSS_ElectricPiano, Producer=0x000005F74C01DE58, Consumer=0x000005F7C3466D90, SourceID=1, RecievedFrames=1023/479952000, This=0x000005F7B293FEB0
LogFMODAudioLink: VeryVerbose: FFMODAudioLinkSourcePushed::OnNewBuffer() Name=MSS_ElectricPiano, Producer=0x000005F74C01DE58, Consumer=0x000005F7C3466D90, SourceID=1, RecievedFrames=1279/479952000, This=0x000005F7B293FEB0
LogFMODAudioLink: VeryVerbose: FFMODAudioLinkSourcePushed::OnNewBuffer() Name=MSS_ElectricPiano, Producer=0x000005F74C01DE58, Consumer=0x000005F7C3466D90, SourceID=1, RecievedFrames=1535/479952000, This=0x000005F7B293FEB0
LogFMODAudioLink: VeryVerbose: FFMODAudioLinkSourcePushed::OnNewBuffer() Name=MSS_ElectricPiano, Producer=0x000005F74C01DE58, Consumer=0x000005F7C3466D90, SourceID=1, RecievedFrames=1791/479952000, This=0x000005F7B293FEB0
LogFMODAudioLink: Verbose: FFMODAudioLinkInputClient::GetSamples: (post-pop), SamplesPopped=512, SamplesNeeded=512, ZeroFrames=0, This=0x000005F7C3466D90
LogFMODAudioLink: Verbose: Sound Created: MSS_ElectricPiano , Consumer = 6561691233680.
LogFMODAudioLink: VeryVerbose: FFMODAudioLinkSourcePushed::OnNewBuffer() Name=MSS_ElectricPiano, Producer=0x000005F74C01DE58, Consumer=0x000005F7C3466D90, SourceID=1, RecievedFrames=2047/479952000, This=0x000005F7B293FEB0
LogFMODAudioLink: VeryVerbose: FFMODAudioLinkSourcePushed::OnNewBuffer() Name=MSS_ElectricPiano, Producer=0x000005F74C01DE58, Consumer=0x000005F7C3466D90, SourceID=1, RecievedFrames=2303/479952000, This=0x000005F7B293FEB0
LogFMODAudioLink: VeryVerbose: FFMODAudioLinkSourcePushed::OnNewBuffer() Name=MSS_ElectricPiano, Producer=0x000005F74C01DE58, Consumer=0x000005F7C3466D90, SourceID=1, RecievedFrames=2559/479952000, This=0x000005F7B293FEB0
LogFMODAudioLink: VeryVerbose: FFMODAudioLinkSourcePushed::OnNewBuffer() Name=MSS_ElectricPiano, Producer=0x000005F74C01DE58, Consumer=0x000005F7C3466D90, SourceID=1, RecievedFrames=2815/479952000, This=0x000005F7B293FEB0
[Trimmed additional OnNewBuffer() calls]
LogFMODAudioLink: VeryVerbose: FFMODAudioLinkSourcePushed::OnNewBuffer() Name=MSS_ElectricPiano, Producer=0x000005F74C01DE58, Consumer=0x000005F7C3466D90, SourceID=1, RecievedFrames=97023/479952000, This=0x000005F7B293FEB0
LogFMODAudioLink: VeryVerbose: FFMODAudioLinkSourcePushed::OnNewBuffer() Name=MSS_ElectricPiano, Producer=0x000005F74C01DE58, Consumer=0x000005F7C3466D90, SourceID=1, RecievedFrames=97279/479952000, This=0x000005F7B293FEB0
LogFMODAudioLink: VeryVerbose: FFMODAudioLinkSourcePushed::OnNewBuffer() Name=MSS_ElectricPiano, Producer=0x000005F74C01DE58, Consumer=0x000005F7C3466D90, SourceID=1, RecievedFrames=97535/479952000, This=0x000005F7B293FEB0
LogFMODAudioLink: VeryVerbose: FFMODAudioLinkSourcePushed::OnNewBuffer() Name=MSS_ElectricPiano, Producer=0x000005F74C01DE58, Consumer=0x000005F7C3466D90, SourceID=1, RecievedFrames=97791/479952000, This=0x000005F7B293FEB0
LogFMODAudioLink: Verbose: FFMODAudioLinkSourcePushed::OnSourceDone() Name=MSS_ElectricPiano, Producer=0x000005F74C01DE58, Consumer=0x000005F7C3466D90, RecievedFrames=98047/479952000, This=0x000005F7B293FEB0
LogFMODAudioLink: Verbose: FFMODAudioLinkSourcePushed::OnSourceReleased() Name=MSS_ElectricPiano, Producer=0x000005F74C01DE58, Consumer=0x000005F7C3466D90, RecievedFrames=98047/479952000, This=0x000005F7B293FEB0
LogFMODAudioLink: Verbose: FFMODAudioLinkSourcePushed::Dtor() Name=MSS_ElectricPiano, Producer=0x000005F74C01DE58, Consumer=0x000005F7C3466D90, RecievedFrames=98047/479952000, This=0x000005F7B293FEB0
LogFMODAudioLink: Verbose: FFMODAudioLinkInputClient::Stop: Stopping EventInstance.
LogFMODAudioLink: Verbose: Sound Release: 6561229458696.
LogFMODAudioLink: Verbose: Event Destroyed: ClientRef = 6561268696880.
LogFMODAudioLink: Verbose: FFMODAudioLinkInputClient::Unregister.

You will need to use a loop region or sustain point if the programmer instrument is the only thing in the event. Otherwise when the instrument loops, if there is nothing to play (ie. the programmer sound has not been set or has finished), then the event will end naturally as it has nothing left to play.

I tried adding a loop region to the FMOD Event. It looks like this:

I am still not hearing any sound coming through from Audio Link. I still see FFMODAudioLinkInputClient::GetSamples called only once over the lifetime of the event. In the profiler I can see that the FMOD Event is active for the duration of the MetaSound I am attempting to play through it.

Is there anything else worth trying?

Apologies for the delay, I have been unable to reproduce this behavior myself and I cannot think of what would be causing it.

If you are able to reproduce this in a reduced project that you could share with us, we might have a bit more luck trying to find the cause of this.

No worries. I have also attempted to reproduce this in a new Unreal 5.3 project and it works there. So it might be something to do with our custom version of the Engine. I’m really not sure. We only wanted to evaluate this feature, though, so I’m moving on. Thank you for your help.

1 Like