Hello,
I’m trying to record my voice from a mic and save it as a wav file.
I’m using a UAudioCaptureComponent + a USoundSubmix and it works well, i can record and save the audio.
The problem is that while recording, there is some echo.
I found on youtube some tutorials to deal with this, the idea is to create a second USoundSubmix that take its input from the output of the first one, and setting all its volumes to the minimum.
The tutorials on YT are done with blueprints, so i translated the setup in C++ like this:
soundSubmixSilent = CreateDefaultSubobject(TEXT(“soundSubmixSilent”));
soundSubmixSilent->SetSubmixOutputVolume(this, -96.f);
soundSubmixSilent->SetSubmixDryLevel(this, -96.f);
soundSubmixSilent->SetSubmixWetLevel(this, -96.f);soundSubmixRecord = CreateDefaultSubobject(TEXT(“soundSubmixRecord”));
soundSubmixRecord->SetParentSubmix(soundSubmixSilent);audioCaptureComponent = CreateDefaultSubobject(TEXT(“audioCaptureComponent”));
audioCaptureComponent->bAutoActivate = false;
audioCaptureComponent->bEnableBaseSubmix = true;
audioCaptureComponent->SoundSubmix = soundSubmixRecord;
audioCaptureComponent->SetSubmixSend(soundSubmixRecord, 1.f);
Unfortunately it doesn’t work: the echo is still there.
Any idea of what i’m missing ?
Thanks
Cedric