Hi jparodrigues,
Thanks for the video demonstrating the issue. Aaron has been investigating this issue and believes the actual culprit has been identified. The current suspect is a 3rd party DLL that hooks into XAudio2, We will continue to work towards a resolution of the issue.
Any further progress on this thread, a member of our team is reporting this and were using the latest 4.12 version.
Yes, we tracked the issue to the EQ effect being used in XAudio2. Something about that specific effect doesn’t work on AMD. Since XAudio2 is closed source, we can’t fix it ourselves without writing our own equalizer effect. Good news is that I am literally doing that right now for the new audio mixer.
In the meantime, we have checked in a short-term fix/workaround which is not ideal if the game is heavily using the EQ effect.
In XAudio2Source.cpp, in FXAudio2SoundSource::CreateSource, we are doing the following:
// Create a source that goes to the spatialisation code and reverb effect
Destinations[NumSends].pOutputVoice = Effects->DryPremasterVoice;
// EQFilter Causes sound devices on AMD boards to lag and starve important game threads. Hack disable for AMD until a long term solution is put into place.
static const bool bIsAMD = (FPlatformMisc::GetCPUVendor() == TEXT("AuthenticAMD"));
if (!bIsAMD && IsEQFilterApplied())
{
Destinations[NumSends].pOutputVoice = Effects->EQPremasterVoice;
}
NumSends++;
Well give this a try and stay tuned for your new release, is there any release channel to follow so we know when that is released? Thanks allot.
You’ll find out… as soon as its ready I’m going to be singing it from the rooftops.
I found the file in Epic Games\4.12\Engine\Source\Runtime\Windows\XAudio2\Private, I made the temporary code changes suggested above, after saving the file, is it necessary to compile this, and if so can you provide any suggestions? I’m mostly familiar with working with project based source and blueprints as opposed to these engine files. Thanks allot.
Hi edencorbin,
I have not implemented this fix personally, but if you make a change to a file in the Engine source code, you would need to build the Engine again for those changes to be reflected in your game. In most cases, this simply involves opening the UE4.sln file in Visual Studio, right-clicking on the UE4 project in the solution explorer window, and selecting the Build option.
XAudio libs embedded in third party directory is pretty old 2010 june.
For example, the engine is using:
// Retrieve state source is in.
XAUDIO2_VOICE_STATE SourceState;
Source->GetState( &SourceState );
Only SourceState.BuffersQueued is used, and according to microsoft docs:
There is XAUDIO2_VOICE_NOSAMPLESPLAYED new parameter and “GetState takes roughly one-third as much time to complete when you specify XAUDIO2_VOICE_NOSAMPLESPLAYED.”
I wonder if these issues aren’t fixed in latest XAudio and If EPIC’s will try use latest DirectX libs, I read some time ago about improvement of shader compilation speed with latest DirectX libs too.