What is the way of getting data from Audio Capture Component

Hi! In case someone still needs help with the AudioCapture data, here is a way to do it.

[How to use Audio Capture Component and Audio Capture in Unreal C++ | by Brandon McCowan | Medium]

To sum it up, you create an inherited class and override the OnGenerateAudio function.

#include "MyCaptureComponent.h"

int32 UMyCaptureComponent::OnGenerateAudio(float* OutAudio, int32 NumSamples)
{
 int32 Samples = Super::OnGenerateAudio(OutAudio, NumSamples);

 // Do something, for example reduce the amplitude for each sample by a factor of 10
 for (int i = 0; i < Samples; i++)
 {
  OutAudio[i] = OutAudio[i] / 10.f;
 }

 return Samples;
}