Audio artefacts on steam audio reflections.
System Information Steam Audio version: v4.5.3 Unity version: 2022.3.51f1 FMOD Studio version: 2.02.22 Operating System and version: Win10
Issue Description
We use Steam Audio as a spatialiser and for sound propagation, which has worked very well so far. For sound propagation, we only use Steam Audio Reflection together with Steam Audio Geometry, which also works very well. For example, imagine we are in a dungeon with winding corridors and doors. When an audio source is located behind several corners, the perception of sound direction, room information and spatialisation works great in our case. As I mentioned already, we only use reflections and not pathing for audio sources.
We also implemented an audio source pooling system to optimise performance. At the start, the sources with Steam Audio Source components will be initialised and used when an FMOD event is triggered. Firstly, the position will be transformed, then the desired FMOD event will be played, and finally the source will be transformed back to the waiting position. During development, I noticed that the positioning of the steam audio source was not that accurate. I had to deal with artefacts when an audio source was played behind a wall, even though I wasn't supposed to be able to hear anything. However, I could always hear a short audio fragment. I created a workaround using an AHDSR modulation on the Reflections Mix Level at the Steam Audio Plugin in FMOD, and added a 200 ms hold time so that the reflection sound mix opens up after 200 ms. It's a good compromise and it's working very well so far. There are no audible artefacts… in the editor.
The problem is that there are still a lot of audio artefacts when testing the Android build for Quest VR. There is currently no other build option. This means that testing is only possible in the Unity Editor and the Quest build at the moment.
When testing with the Quest build, I can profile the session with FMOD, analyse the artefacts and see an audio fragment more than 1 second long. This is an audio fragment that I should not be able to hear because it is behind a wall. I have captured an example by overlaying the different graphs from the FMOD profiler:
The grey dot and line represent the instance. The red bar at the bottom shows the FMOD voice that has been played. Green indicates both the level and audibility of the event.
This is an event using the pooling system with the Steam Audio Source, which should not be audible as it is behind a wall. You can see that this audio fragment does not behave properly and disturbs the soundscape and it appears ONLY for the pooled sources and on the Quest/Android build.
So, the question is: are there any parameters or options that could prevent this behaviour?
We tested adding a release delay to the pooling system so that a source would only be used again after waiting for one second, but this didn't produce positive results.
Thanks for reading.
I had to disable Steam Audio in UE5.5 because of so many crashes and issues with reverb/reflections. I hope they give some attention to this, as it looks like a lot of people are having similar issues
I had to disable Steam Audio in UE5.5 because of so many crashes and issues with reverb/reflections. I hope they give some attention to this, as it looks like a lot of people are having similar issues
Did you encounter crashes without reflections? Like only enable HRTFs
@ChristianHell There are a few different reasons why you may be encountering this behavior. As a first step, I'd want to figure out whether this issue is due to the reflected sound, or due to the direct sound path. Can you try setting the Direct Mix Level on all events to 0? If the issue persists, then it's related to the reflected sound.
I'm assuming you're using real-time reflections. Can you provide more details or a screenshot of your Steam Audio Settings? Does reducing Real-Time Rays or Real-Time Bounces reduce the amount of time the event is incorrectly audible? What happens if you increase or decrease the Simulation Update Interval?
@lakulish Thank you for your reply. I'll do some more research with the settings you mentioned and send you an update with the details soon.
@lakulish I did some thorough testing. First insight I can tell is that these artefacts are coming from the real-time reflection. When I set the Reflection Mix Level value in the FMOD plugin to 0.0, they no longer appear. Here a screenshot from the settings with the reflection mix:
I also tried to disable 'Apply HRTF To Reflections' which made no difference.
Then I started tweaking the steam audio settings, where I was already having success! I want to try more tests, but at the moment it looks like reducing Real Time Rays by half would help. The audio glitches hardly occur any more. Here a screenshot of the original settings:
Changing the values for 'Simulation Update Interval' didn't seem to make any differences. Reducing ‘Real Time Bounces’ still caused audio artefacts but no longer so drastically and shorter.
I will move on by reducing the 'Real Time Rays' to 2048. I'm not sure yet if this will affect the steam audio sources overall. I assume it should be no problem, since we have a pooled steam audio source system where there should not be more than 24 sources playing at the same time.
Another interesting fact is that in the meantime, we were able to test on PCVR and Android. On PCVR, there were no audio glitches at all.
We have since done some more tests and i still had problems with audio artifacts from sources that were actually behind walls. These were the steam audio settings: (I also increased Real Time Bounces to get a better reflection quality)
@ChristianHell I'd like to learn a little more about the artifact you're encountering. Can you provide a short video clip of the issue so we can listen to it and try to better understand what's going on? Thanks. Can you also try the following experiments to help diagnose what's going on?
- If you start an event, let it play for a few seconds, and leave the listener in a fixed position, does the artifact continuously occur? Or does it only occur when the event starts playing?
- What happens if you change the "staging position" of the sources (i.e., the position of the pooled sources when they are not being played) to be exactly at the final position behind the wall? In other words, if no transformation needs to be applied to the source before using it, does it help reduce the artifact?
Related to the second point, can you elaborate a little more about how your pooling system works? Do you pool IPLSource API objects, or Steam Audio Source components/GameObjects? If the latter, do you enable/disable them when taking them from and putting them back into the pool?