I am working on a language game that involves an AudioCapture component to record and analyze audio. I have the system working on Windows and even on Android to a point, but when you try to leave the level with the AudioCapture, it gives the error as follows:
LogPlayLevel: Error: 06-02 14:14:24.670 15038 15085 D UE4 : [2022.06.02-20.14.24:670][252]LogAndroid: Error: === Critical error: ===
LogPlayLevel: Error: 06-02 14:14:24.670 15038 15085 D UE4 : [2022.06.02-20.14.24:670][252]LogAndroid: Error:
LogPlayLevel: Error: 06-02 14:14:24.670 15038 15085 D UE4 : [2022.06.02-20.14.24:670][252]LogAndroid: Error: Assertion failed: !CaptureSynth.IsStreamOpen() [File:D:/Build/++UE4/Sync/Engine/Plugins/Runtime/AudioCapture/Source/AudioCapture/Private/AudioCaptureComponent.cpp] [Line: 68]
LogPlayLevel: Error: 06-02 14:14:24.670 15038 15085 D UE4 : [2022.06.02-20.14.24:670][252]LogAndroid: Error:
LogPlayLevel: Error: 06-02 14:14:24.670 15038 15085 D UE4 : [2022.06.02-20.14.24:670][252]LogAndroid: Error: [Callstack] 0x00000076748CF184 libUE4.so(0x0000000009BA8184)!FDebug::CheckVerifyFailedImpl(char const*, char const*, int, char16_t const*, ...) []
LogPlayLevel: Error: 06-02 14:14:24.670 15038 15085 D UE4 : [2022.06.02-20.14.24:670][252]LogAndroid: Error: [Callstack] 0x000000767427E990 libUE4.so(0x0000000009557990)!UAudioCaptureComponent::FinishDestroy() []
LogPlayLevel: Error: 06-02 14:14:24.670 15038 15085 D UE4 : [2022.06.02-20.14.24:670][252]LogAndroid: Error: [Callstack] 0x0000007674E770F4 libUE4.so(0x000000000A1500F4)!UObject::ConditionalFinishDestroy() []
LogPlayLevel: Error: 06-02 14:14:24.670 15038 15085 D UE4 : [2022.06.02-20.14.24:670][252]LogAndroid: Error: [Callstack] 0x0000007674DE62DC libUE4.so(0x000000000A0BF2DC)!IncrementalPurgeGarbage(bool, float) []
LogPlayLevel: Error: 06-02 14:14:24.671 15038 15085 D UE4 : [2022.06.02-20.14.24:671][252]LogAndroid: Error: [Callstack] 0x0000007678ACFEC4 libUE4.so(0x000000000DDA8EC4)!UEngine::ConditionalCollectGarbage() []
LogPlayLevel: Error: 06-02 14:14:24.671 15038 15085 D UE4 : [2022.06.02-20.14.24:671][252]LogAndroid: Error: [Callstack] 0x000000767829B5F4 libUE4.so(0x000000000D5745F4)!UWorld::Tick(ELevelTick, float) []
LogPlayLevel: Error: 06-02 14:14:24.671 15038 15085 D UE4 : [2022.06.02-20.14.24:671][252]LogAndroid: Error: [Callstack] 0x00000076780C2CE4 libUE4.so(0x000000000D39BCE4)!UGameEngine::Tick(float, bool) []
LogPlayLevel: Error: 06-02 14:14:24.671 15038 15085 D UE4 : [2022.06.02-20.14.24:671][252]LogAndroid: Error: [Callstack] 0x000000767310FFD8 libUE4.so(0x00000000083E8FD8)!FEngineLoop::Tick() []
LogPlayLevel: Error: 06-02 14:14:24.671 15038 15085 D UE4 : [2022.06.02-20.14.24:671][252]LogAndroid: Error: [Callstack] 0x0000007673107630 libUE4.so(0x00000000083E0630)!AndroidMain(android_app*) []
LogPlayLevel: Error: 06-02 14:14:24.671 15038 15085 D UE4 : [2022.06.02-20.14.24:671][252]LogAndroid: Error: [Callstack] 0x00000076731170F8 libUE4.so(0x00000000083F00F8)!android_main() []
LogPlayLevel: Error: 06-02 14:14:24.671 15038 15085 D UE4 : [2022.06.02-20.14.24:671][252]LogAndroid: Error: [Callstack] 0x00000076731465BC libUE4.so(0x000000000841F5BC)![Unknown]() []
LogPlayLevel: Error: 06-02 14:14:24.671 15038 15085 D UE4 : [2022.06.02-20.14.24:671][252]LogAndroid: Error: [Callstack] 0x000000771F857A14 libc.so(0x0000000000091A14)![Unknown]() []
LogPlayLevel: Error: 06-02 14:14:24.671 15038 15085 D UE4 : [2022.06.02-20.14.24:671][252]LogAndroid: Error: [Callstack] 0x000000771F7E9F78 libc.so(0x0000000000023F78)![Unknown]() []
LogPlayLevel: Error: 06-02 14:14:24.671 15038 15085 D UE4 : [2022.06.02-20.14.24:671][252]LogAndroid: Error:
LogPlayLevel: Error: 06-02 14:14:24.671 15038 15085 D UE4 : [2022.06.02-20.14.24:671][252]LogAndroid: Error:
I have tried deactivating the component, destroying the actor, “Stop” with audio synth component, finish recording with empty parameters to try to end the stream before quitting but nothing. How can I close the audio stream? I tried to use the FAudioCapture class in the C++ documentation in order to use the AbortStream() function but couldn’t figure out how to get it working.