menu
 

La section Questions et réponses de la communauté Audiokinetic est un forum où les utilisateurs de Wwise et de Strata peuvent poser des questions et répondre à celles des autres membres de la communauté. Si vous souhaitez obtenir une réponse de la part de l'équipe de soutien technique d'Audiokinetic, veillez à utiliser le formulaire de Tickets de Soutien.

+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.
dans General Discussion par Joshua S. (120 points)

1 Réponse

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.
par Alex P. (190 points)
...