Windows Loudness Equalization is reverse-engineered for PipeWire

A GitHub project called pw-loudness-eq brings Windows' Loudness Equalization to PipeWire. Its README says the effect was reverse engineered from WMALFXGFXDSP.dll. It evens out the volume of each application, so that quiet and loud parts play at a similar level.
The project has three parts. A loudness module, made of a PipeWire module and a DSP plugin, processes every app's playback stream. A limiter module ports the output limiter of Windows' audio engine (CAudioLimiter in AudioEng.dll), runs on every playback device and keeps the boost from clipping. An optional GTK3 window turns the effect on or off, globally or per app, and sets the release time. It requires PipeWire 1.4 or later, plus GTK 3 for the window, and the instructions build it from source with make.
The README also spells out the algorithm. Despite its name, the effect does not equalize the spectrum: it is a broadband automatic gain control. Audio is cut into frames (512 samples at 44.1 or 48 kHz) with 50% overlap, each channel goes through an FFT, and the power of all channels is summed into 25 frequency bands with edges from 100 Hz to 24,000 Hz. From those bands it computes a loudness value L and a target gain of min((1300/L)^1.6, 10), so the boost is at most +20 dB. When the target is lower than the current gain, the gain drops to it instantly. Otherwise it moves toward the target gradually, with a time constant of about 4.6 seconds at release setting 4. Latency is one frame.
The limiter delays output so it can look ahead, by 64 frames at 44.1 or 48 kHz and by 16, 32 or 128 frames at other rates. When an incoming frame peaks above the tracked peak (initially 0.985), the gain ramps down linearly over that window, with all channels sharing one gain. It recovers only once the signal peaks at half the tracked peak or less, at about 19 dB per second. As on Windows, it is always on, whether or not Loudness Equalization is enabled.
The loudness plugin runs inside each app's stream, before that stream's volume and before mixing, like a Windows stream effect. The limiter needed one adaptation: Windows applies a device's software volume before the limiter, while PipeWire applies it after the device's filter graphs. The plugin therefore reads each channel's volume, measures peaks as they will be after that volume, and applies only its own gain. According to the README, once PipeWire applies the volume, the result is the same as on Windows.
JACK clients, streams with more than 8 channels and Flatpak apps that use PipeWire directly are not processed. Flatpak apps that go through PulseAudio are.
Key facts
- pw-loudness-eq brings Windows' Loudness Equalization to PipeWire, reverse engineered from WMALFXGFXDSP.dll, and levels the volume of each app.
- The effect is a broadband automatic gain control using 25 frequency bands for its loudness estimate, with a maximum boost of +20 dB.
- A port of the Windows output limiter from AudioEng.dll stays on for every playback device and adds 64 frames of latency at 44.1 or 48 kHz.
- It needs PipeWire 1.4 or later, builds with make, and offers an optional GTK3 window with global and per-app switches.
- JACK clients, streams with more than 8 channels and Flatpak apps using PipeWire directly are not processed.
Why it matters
The project takes a Windows audio feature to PipeWire and aims to reproduce how it behaves: the loudness effect runs per stream like a Windows stream effect, and the limiter sits on each playback device as it does under audiodg.exe. The README also documents the processing itself, including frame size, band edges, loudness formula, gain smoothing and limiter logic, so readers can see what happens to their audio.
Who it affects
It is relevant to people on PipeWire 1.4 or later who want quiet and loud material to play at a similar level. The README gives dependency commands for Arch and Debian. Coverage has limits: JACK clients, streams with more than 8 channels and Flatpak apps talking to PipeWire directly are left unprocessed, while Flatpak apps going through PulseAudio are handled.
How to use it
Install the dependencies, run make and sudo make install, then restart the user services with systemctl --user restart pipewire pipewire-pulse wireplumber. Single parts can be installed with make -C modules/loudness, make -C modules/limiter or make -C app. To remove it, run sudo make uninstall and restart the same services.
Open Loudness Equalization from the application menu or run pw-loudness-eq. Settings live in a PipeWire metadata object named loudness-eq, so pw-metadata can script them: turn the effect off, set the release time from 2 (fast) to 7 (slow), or exclude apps such as Discord. Changes apply immediately and persist across restarts. Defaults are in /usr/share/pipewire/pipewire.conf.d/60-loudness-eq.conf and can be overridden by a copy in ~/.config/pipewire/pipewire.conf.d/. Runtime changes are saved in ~/.local/state/pw-loudness-eq/state.conf and take precedence. The leq-wav tool processes a WAV file offline.
How solid is it
This account rests on the project's own README. It is detailed about the algorithm, and the repository includes DSP and plugin tests for both modules, run with make check. It does not describe the reverse-engineering method or tools, and it reports no measurements or comparison tests against real Windows output. The statement that the result matches Windows refers specifically to how the limiter handles software volume.
Risks and caveats
The limiter is always on, even with Loudness Equalization switched off, and its look-ahead delay is added latency on the device. The loudness effect has its own latency of one frame, 512 samples at 44.1 or 48 kHz. The boost can push pure tones such as a whistle well above full scale; the README says the limiter catches this, which is worth remembering before installing only one of the two modules. Anyone expecting a spectral equalizer should note that this is gain control only.
“A broadband automatic gain control. Despite the name, it doesn't equalize the spectrum.”
— pw-loudness-eq README