juce-framework / JUCE

JUCE is an open-source cross-platform C++ application framework for desktop and mobile applications, including VST, VST3, AU, AUv3, LV2 and AAX audio plug-ins.
https://juce.com
Other
6.31k stars 1.67k forks source link

[Bug]: dsp::Limiter distorts if threshold >> 0.0 dBFS #1322

Open emezeske opened 6 months ago

emezeske commented 6 months ago

Detailed steps on how to reproduce the bug

  1. Add a dsp::Limiter to a project that makes sound, and set its threshold to something like 100 dBFS, and set the release to something short like 4ms.
  2. Make sound
  3. Hear distortion

What is the expected behaviour?

I would expect that if the threshold is set to something really high like 100 dBFS, the limiter would just do nothing -- it would pass the audio through with no changes. But somehow it seems that the audio is getting massively amplified before the hard 0 dBFS clipper, causing significant distortion.

Operating systems

Windows

What versions of the operating systems?

Windows 11

Architectures

x86_64

Stacktrace

No response

Plug-in formats (if applicable)

No response

Plug-in host applications (DAWs) (if applicable)

No response

Testing on the develop branch

The bug is present on the develop branch

Code of Conduct