I’m playing around with some of the new audio goodness in 4.19 preview 2 and exploring avenues for microphone processing. Specifically, I’m wanting PCM data from a microphone to be used in a custom VOIP solution. It doesn’t interact with UE4’s built-in VOIP system in any way.
There are two routes I’ve tried: using a Media Sound Component, and an Audio Capture Component.
The Media Sound component requires a bit more work to enumerate and Open the audio capture stream for the microphone, but it seems to work. I’m printing the envelope value and it behaves as it should.
Similar story with the Audio Capture Component – the envelope reacts as expected.
The next step would be to write a custom Source Effect to add to the chain which would receive and process the captured audio.
The problem is that in both cases I can hear the captured audio out of my speakers. I assume all this audio is being consumed by the new audio mixer and output as a normal sound. This is not my intended behavior – I want to capture this audio for processing only, and not output it to the final mix.
I’ve tried muting the sound but anything that quiets the sound also affects the detected envelope. If I’m understanding correctly, this makes sense – anything connected to the source effect chain needs real audio to ‘hear’, but I basically want to kill the sound immediately after the source effect chain is processed and before it enters the rest of the sound system to be processed (spatialized, etc) and output.
Am I barking up the wrong tree completely? I can’t help but think that even if I zeroed out the audio in the source effect, there is a considerable amount of unnecessary processing happening for what could be a simple capture straight to memory. It may be that since I only want to capture (and not play back) audio, avoiding a synth component and going straight for platform-dependent capture is the cleanest route.
I looked briefly at Audio Recording Manager, but it seems steeped in Sequencer and intended for output to a file, which is not what I’m after.
I’m very new to audio in UE4 in general, let alone the new audio mixer, so I may have a gross misunderstanding of what is going on. Any wisdom is appreciated!