Hello,
I’m trying to do use the Fmod/Audiolink integration on Unreal but I have some problems.
Unreal Version: 5.4.4-180888
Platform: Windows 10 (22H2) [10.0.19045.5011] (x86_64)
Fmod Version: 2.02.22
I tried to start with the simplest AudioLink Setup, that is with SubMixes.
I enabled and set up the AudioLink plugin:
The Fmod event is a looping 2D Programmer sound as explained
I enabled verbose logging
log LogFMODAudioLink All
LogFMODAudioLink: VeryVerbose: FFMODAudioLinkFactory::CreateSourcePushedAudioLink: Create AudioLink SourcePushed.
LogFMODAudioLink: Verbose: FFMODAudioLinkSourcePushed::Ctor() Name=Rims2_mx_System, Producer=0x0000080268BE4378, Consumer=0x00000801940BB210, p2c%=2.00, PlayEvent=2D_AUDIOLINK_TEST_01, TotalFramesForSource=479952000, This=0x000008025A7B9E70
LogFMODAudioLink: VeryVerbose: FFMODAudioLinkSourcePushed::OnNewBuffer() Name=Rims2_mx_System, Producer=0x0000080268BE4378, Consumer=0x00000801940BB210, SourceID=-1, RecievedFrames=-1/479952000, This=0x000008025A7B9E70
LogFMODAudioLink: Verbose: FFMODAudioLinkInputClient::Start: SelSP = 3281840176ll, LinkEvent = 2D_AUDIOLINK_TEST_01, InComponent = 3281840240ll.
LogFMODAudioLink: Warning: FMODAudioLink: No initial submix got routed to AudioLink. Consider creating custom versions of global submixes in Project Settings Audio, and Enable Audio Link in their advanced settings.
LogFMODAudioLink: VeryVerbose: FFMODAudioLinkSourcePushed::OnNewBuffer() Name=Rims2_mx_System, Producer=0x0000080268BE4378, Consumer=0x00000801940BB210, SourceID=0, RecievedFrames=255/479952000, This=0x000008025A7B9E70
LogFMODAudioLink: Verbose: FFMODAudioLinkInputClient::GetSamples: (post-pop), SamplesPopped=1024, SamplesNeeded=1024, ZeroFrames=0, This=0x00000801940BB210
LogFMODAudioLink: Verbose: Sound Created: Rims2_mx_System , Consumer = 2483794448ll.
LogFMODAudioLink: VeryVerbose: FFMODAudioLinkSourcePushed::OnNewBuffer() Name=Rims2_mx_System, Producer=0x0000080268BE4378, Consumer=0x00000801940BB210, SourceID=0, RecievedFrames=511/479952000, This=0x000008025A7B9E70
LogFMODAudioLink: VeryVerbose: FFMODAudioLinkSourcePushed::OnNewBuffer() Name=Rims2_mx_System, Producer=0x0000080268BE4378, Consumer=0x00000801940BB210, SourceID=0, RecievedFrames=767/479952000, This=0x000008025A7B9E70
LogFMODAudioLink: VeryVerbose: FFMODAudioLinkSourcePushed::OnNewBuffer() Name=Rims2_mx_System, Producer=0x0000080268BE4378, Consumer=0x00000801940BB210, SourceID=0, RecievedFrames=1023/479952000, This=0x000008025A7B9E70
Even without setting a proper mix (there’s a warning in fact) I see that AudioLink should be working.
I can use live update, connect and in fact see the 2D_AUDIOLINK_TEST_01 event instances being spawned for each sound being spawned. For example here’s the profiler when outputting some UI_sounds:
The problem as you may see is that, while I CAN hear audio, apparently there’s no audio coming out from Fmod (I see no monitoring, nor applying any effect or volume modulation modifies the audio output).
I tried then to add a submix to - for example - this UI sound
Activate the audio link with proper Audio Link Settings
Unfortunately, the result was worse than before, since audio was completely muted, while I could track the fmod event on the profiler (before I could hear audio). The log was very similar than before, except that the warning above about the submix disappeared (instead, my FMOD_AudioLink_01_Main_Submix was registered or something similar, unfortunately I lost that log )
I aslo tried to change and have a couple of events 2D_AUDIOLINK_TEST_01 and _02, I could verify that both events were triggered, but still no audio and something was going on also with instances…anyhow after a while both Unreal and Fmod crashed, so I guess my last tests were not very reliable.
The only strange thing happening in the log was this when stopping the PIE:
LogFMODAudioLink: VeryVerbose: FFMODAudioLinkSourcePushed::OnNewBuffer() Name=Rims2_mx_System, Producer=0x00000B0B207E24D8, Consumer=0x00000B0A02942A90, SourceID=0, RecievedFrames=826367/479952000, This=0x00000B0B822F8C80
LogFMODAudioLink: VeryVerbose: FFMODAudioLinkSourcePushed::OnNewBuffer() Name=Rims2_mx_System, Producer=0x00000B0B207E24D8, Consumer=0x00000B0A02942A90, SourceID=0, RecievedFrames=826623/479952000, This=0x00000B0B822F8C80
LogFMODAudioLink: Verbose: FFMODAudioLinkSourcePushed::OnSourceReleased() Name=Rims2_mx_System, Producer=0x00000B0B207E24D8, Consumer=0x00000B0A02942A90, RecievedFrames=826879/479952000, This=0x00000B0B822F8C80
LogFMODAudioLink: Verbose: FFMODAudioLinkSourcePushed::Dtor() Name=Rims2_mx_System, Producer=0x00000B0B207E24D8, Consumer=0x00000B0A02942A90, RecievedFrames=826879/479952000, This=0x00000B0B822F8C80
LogFMODAudioLink: Verbose: FFMODAudioLinkInputClient::Stop: Stopping EventInstance.
LogFMOD: Warning: C:\buildagent1\work\570ad728b1678096\studio_api\src\fmod_playback_event.cpp(2926) - Event instance has programmer sounds pending release, update thread will be blocked until programmer sounds are released.
LogFMODAudioLink: Verbose: Sound Release: 2747336456ll.
LogFMODAudioLink: Verbose: Event Destroyed: ClientRef = 3944415488ll.
LogFMODAudioLink: Verbose: FFMODAudioLinkInputClient::Unregister.
LogFMOD: Warning: C:\buildagent1\work\570ad728b1678096\studio_api\src\fmod_playback_system.cpp(1465) - Destroying event instance '2018e0' due to event description {457b4ad6-f4ab-4cbe-bea0-616976484fdd} unload
LogFMOD: Warning: C:\buildagent1\work\570ad728b1678096\studio_api\src\fmod_playback_event.cpp(2926) - Event instance has programmer sounds pending release, update thread will be blocked until programmer sounds are released.
LogFMODAudioLink: Verbose: Sound Release: 2747334664ll.
LogFMODAudioLink: Verbose: Event Destroyed: ClientRef = 3440875568ll.
I guess that the crash was related to some sounds not being released, but I don’t know about the missing audio…
Sorry for the long post, but do you have an hint about what is happening? Am I missing something?
Thanks in advance for the help, best!