Loopback recording problem: the streaming is amplified.

Hello, I discovered that when I record from a source via wasapi loopback (windows 10), the recording of the audio stream is amplified by about 4 dB!
Obviously this is prone to causing clipping. I’ve tried with different sources: web browser, audio player, etc.
Any idea on the causes of this malfunction? Any fixes?
Thanks

That shouldn’t be happening. Normally the digital audio data stream isn’t altered with WASAPI loopback.

How are you measuring that 4dB of amplification?

Make sure [u]Software Playthrough[/u] is turned off. That will create a feedback loop which can introduce “amplification”, but usually you’ll get echo or feedback-oscillation that are more noticeable than the amplification.

Software playthrough is turned off when I record.
I measured the RMS amplitude in the original cd audio track, and then I measured the RMS amplitude in the same track recorded via wasapi loopback: the amplitude is boosted by about 4 dB.
I made several attempts.
The problem is indipendent from the source used, so it is a problem of audacity, not of the sources.
So far the only solution I’ve found is lowering the volume in the app by about 4 dB to have the streaming correctly recorded.
Unfortunately I discovered I have hundreds of recording ruined by this problem: now I have to re-record all.

How did you do that?

It is recommended in the manual, that you allow a bit of headroom when recording. If you did that, then there shouldn’t be any problems with your previous recordings.

but it’s possible that the digital audio stream has already been boosted above unity gain. robtz should check the playback level and settings in the Windows Sounds Control Panel.

Audacity has no way of adjusting the recording level other than via the recording level slider. The recording level slider is an alias for recording level slider in the Windows sound system. If you prefer, you can use the Windows controls rather than Audacity’s and the result will be exactly the same.

I used Adobe Audition to get the RMS values.
I have not added headroom because I wanted the streaming to be recorded without loss of information: lowering the volume of the streaming to get headroom involves a loss of resolution at the rate of 1 bit every 6 dB of volume lowering.
Furthermore the streaming was not preamplified, and there is no way to control the recording volume in audacity when recording via wasapi loopback; the slider works only with microphone recording. The only way is lowering the volume within the audio app, with loss of resolution.

[SOLVED] Now I have tried with different audio drivers of different audio hardware and the problem has disappeared, so probably the problem lies not in Audacity but in the buggy drivers of certain audio hardware.

[SOLVED] Now I have tried with different audio drivers of different audio hardware and the problem has disappeared, so probably the problem lies not in Audacity but in the buggy drivers of certain audio hardware.

GOOD! Sometimes there are “driver utilities” that allow you to equalize, or create surround effects, or otherwise alter the sound. Usually these work on the playback, but of course with loopback you are recording what you’re playing.

I’m pretty confident your problems were on the PLAYBACK SIDE.

I measured the RMS amplitude in the original cd audio track, and then I measured the RMS amplitude in the same track recorded via wasapi loopback: the amplitude is boosted by about 4 dB.

I measured the RMS amplitude in the original cd audio track, and then I measured the RMS amplitude in the same track recorded via wasapi loopback: the amplitude is boosted by about 4 dB.

… and there is no way to control the recording volume in audacity when recording via wasapi loopback; the slider works only with microphone recording.

But your PLAYER software DOES have a volume control and that will be reflected in your recording. Most player software won’t boost (they can always attenuate) but VLC can boost over 100% and I’m sure there are others.

lowering the volume of the streaming to get headroom involves a loss of resolution at the rate of 1 bit every 6 dB of volume lowering.

That’s really not a big issue at 16-bits or better. You can’t hear the difference in “resolution” between 16-bits and 15-bits, and your dynamic range goes from 96dB down to 90dB which is still very good. If you get down to 8-bits you can hear the quantization noise. And it is perceived as noise riding on top of the signal, you don’t hear it as a “loss of resolution”. The biggest issue with streaming audio is that it’s usually lossy-compressed. With analog, the resolution is usually limited by the noise floor, so again no big deal. And with CDs you shouldn’t be “recording” anyway. :wink:

The only way is lowering the volume within the audio app, with loss of resolution.

Actually, amplification followed by attenuation isn’t necessarily lossy unless you are clipping. And if you are clipping that’s WORSE than a little loss of resolution. :wink: