I know your doing it in C++ but if you want to take a look at what i did here are a few snippets:
- Activate the New Audio Sound Mixer by going to D:\Program Files\Unreal Engine\UE_4.21\Engine\Config\Windows (Where ever your instal is located) look for WindowsEngine.ini
Uncomment AudioDeviceModuleName=AudioMixerXAudio2 & Comment ;AudioDeviceModuleName=XAudio2 as stated in the highlighted area. Not sure if it’s the same procedure for IOS, Anfroid Etc. But works for Windows.
- Add AudioCaptureCompnent to which ever actor or Logic your making
- Add NewSoundSubMix ( Right click in content browser : Sound > SoundSubmix Open and set to your liking
- Add Created SoundSubMix in AudioCaptureCompnent settings. Effects section as show.
- In the Finish Recording SubMix Output Name= Whatever name you want to give your file (file to save eg., Wav File) Path= The absolute Location where file will be saved (Considering Content folder being Root) and Exisiting Sound Wave to Overwrite= You can set this to the wav file you wish to overwrite otherwise leave blank.
I hope it helps. As this was my first attempt at it and it works. I just cant figure out how to record without hearing myself on the speakers.