Community Q&A

Welcome to Audiokinetic’s community-driven Q&A forum. This is the place where Wwise and Strata users help each other out. For direct help from our team, please use the Support Tickets page. To report a bug, use the Bug Report option in the Audiokinetic Launcher. (Note that Bug Reports submitted to the Q&A forum will be rejected. Using our dedicated Bug Report system ensures your report is seen by the right people and has the best chance of being fixed.)

To get the best answers quickly, follow these tips when posting a question:

  • Be Specific: What are you trying to achieve, or what specific issue are you running into?
  • Include Key Details: Include details like your Wwise and game engine versions, operating system, etc.
  • Explain What You've Tried: Let others know what troubleshooting steps you've already taken.
  • Focus on the Facts: Describe the technical facts of your issue. Focusing on the problem helps others find a solution quickly.

+2 votes
Currently I'm trying to hook Vivox voice chat into the Wwise AudioInputComponent. Everything is working for short periods of time, but the sound cuts out after a little while. I currently have it set up to call PostAssociatedAudioInputEvent in the BeginPlay function and this successfully causes FillSamplesBuffer to be called for a while, but after roughly 30 seconds to a minute it will simply stop calling FillSamplesBuffer. After some debugging, I discovered that the block of code in AkAudioInputManager that checks whether SamplesCallback is bound will suddenly fail the check at this point, so it appears that the callback is being unbound, but I never return false in the callback so it should always continue.

I had a similar problem with a different delegate that I was using to intercept the Vivox audio, so I'm wondering if this might be the same issue. In that case, I was told by Epic that I shouldn't be using CreateUObject because the delegate was called in a different thread and if it was called while the main thread was doing garbage collection then that could cause it to become unbound. Is it possible something similar is occurring with the AudioInputComponent? I noticed that it also utilizes CreateUObject when it sets up the callbacks and I believe FillSamplesBuffer is called in a different thread as well.

Any help would be appreciated.
in General Discussion by Joshua S. (120 points)

1 Answer

0 votes
We noticed the same behavior in our project as well when trying to support input from Vivox as well as audio played through the Ureal Media Player. We patched it up by using FAkGlobalAudioInputDelegate::CreateLambda instead of CreateUObject. The lambda won't get accidentally unbound during garbage collection but it may require manual clean up depending on your implementation to ensure nothing tries to call your functions on dead objects.
by Alex P. (190 points)
...