menu
 

Audiokinetic의 커뮤니티 Q&A는 사용자가 Wwise와 Strata 커뮤니티 내에서 서로 질문과 답변을 하는 포럼입니다. Audiokinetic의 기술 지원팀에게 문의하고 싶으신 경우 지원 티켓 페이지를 사용해주세요.

+2 투표
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.
General Discussion Joshua S. (120 포인트) 로 부터

1 답변

0 투표
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.
Alex P. (180 포인트) 로 부터
...