We’ve integrated, for the most part, EOS Crossplay into our upcoming game. And RTCAudio is working “most” of the time for our player lobbies.
However, sometimes when a player is talking it seems like the callback we get from EOS_RTCAudio_AddNotifyAudioBeforeRender will unexpectedly spam our audio system and overflow the buffers we have to receive the audio data. These buffers are sized to hold 100ms of audio, 10x the 10ms of audio that is supposed to come in from each callback of AudioBeforeRender.
Is this expected behavior? Does EOS RTCAudio play “catch up” with a players communication if, for some reason, their is a connection issue? How big should we make our audio buffer size if this is intended behavior? 1 full second? More? Are we expected to “fast forward” the audio a little if our buffer is starting to fill faster than its draining?
Or is this a sign we’re doing something wrong? We’re currently letting the EOS SDK handle capturing the microphone. We’re only plugging into the AudioBeforeRenderer as we’d like to, eventually, do more complex per-player volume adjustments like proximity chat. Also, our implementation is pretty by-the-book/by-the-sample.
And to reiterate, it is working normally most of the time. The issue seems more likely to occur the longer a specific player has been talking.
Happy to provide any further details if needed, but any insight into this problem would be greatly appreciated!
~~~~
UPDATE 1/26/2026
~~~~
We were able to get a playtest where I was able to monitor our audio buffers in realtime as we made use of EOS Voice Chat.
One user, on a mac, to my Window’s machine suddenly sent a huge glut of sound data, eating up the rather large audio buffer we have reserved for EOS coms. The buffer should be able to handle a glut of sound send in delayed fashion as long as there some silence behind it, but then the problem came that EOS never sent actual, total silence.
From what I could tell, EOS Voice Chat began sending a mostly silent buffer with a single frame at the front with a non-zero value. Does EOS, if it doesn’t receive new data, just resend the last frame? Is this a bug where EOS is not properly clearing that buffer to send silence? Or is this a bug with the MAC implementation where it’s not properly silencing itself and it’s actually resending some audio over and over again.
I really don’t think I’m accessing the audio buffer pointer wrong. It’s just an int_16 pointer and I’m accessing it with just a basic 0-indexed for loop.
Again, any help would be greatly appreciated!