Ah, MacOS. I love that!
After some time audio stops playing. While debugging I noticed that AL.BufferData fails with error INVALID_VALUE because buffer equals 0.
After game reloading it works fine. Also Windows users never complained, so it is MacOS only problem.
After some inspecting code I noticed that buffer never deleting (nowhere called AL.DeleteBuffer). Some searching in Internet said to me that it have to be deleted. Source deleting, but not buffer. I think, it is a clue. But I don’t sure.
Reproduction
You have to play some much time. Russian servers have TTS, which breaks at first, so it some easily to reproduce with that.
Screenshots
It don’t need.
Additional context
I can help to solve the problem. I have some expirience in Space Station 14 programming, I know the base of the RobustToolbox. But I need your help and advice.
I tried to find a cause. My guess turned out to be true: default MacOS’s realisation of OpenAL has the limit is 1023 buffers. Engine doesn’t free up buffers, because of it OpenAL after a lot of created buffers can’t continue to do it.
How I got this? I made a test. I wrote a program with C++, firstly I used default OpenAL.
After I used OpenAL Soft (Installed with brew):
In the first case there is a limit for 1023 buffers. In the second case there is no so small limit.
The problem has two ways to solve it: freeing up buffers or use OpenAL Soft solution. But both solutions have their own problems. It needs rewriting anyway. I didn’t find how to make OpenTK.OpenAL to use OpenAL Soft.
As an alternative, use Silk.NET.OpenAL.Soft instead OpenTK