开源开发者社区将 Windows 系统中的响度均衡(Loudness Equalization)功能通过逆向工程移植到了 Linux 的 PipeWire 音频服务器上 1。该项目的核心算法源自对 WMALFXGFXDSP.dll 和 AudioEng.dll 文件的逆向分析,旨在让不同应用程序的播放音量保持一致 1。项目包含两个核心模块:用于应用级音量平衡的响度均衡模块,以及用于防止削波的输出限制器模块 1。
在技术实现上,该移植项目要求 PipeWire 版本不低于 1.4,安装时需依赖 GTK 3 以提供控制界面 1。响度均衡算法采用重叠率为 50% 的帧大小(公式为 $N=2^{\lceil \log_2(fs/100) \rceil}$),并通过快速傅里叶变换(FFT)分析将功率总和划分为 25 个频段进行能量计算 1。其目标增益计算公式设定为 $\min((1300/L)^{1.6}, 10)$,最大提升幅度限制在 +20 dB 1。内置的限制器采用前看式(look-ahead)设计,通过引入 L 帧的延迟来确保信号峰值不超过满量程的 0.985 1。
目前该工具尚不支持 JACK 客户端、超过 8 声道的音频流以及直接使用 PipeWire 的 Flatpak 应用 1。用户可通过 pw-metadata 命令行工具脚本化地配置启用状态、调整释放时间或禁用特定应用程序 1。
A developer has successfully reverse-engineered the Windows "Loudness Equalization" feature and ported it to the Linux PipeWire audio server, aiming to standardize playback volume across different applications 1. The functionality was extracted by analyzing Microsoft's proprietary WMALFXGFXDSP.dll and AudioEng.dll libraries 1. The resulting project consists of two primary components: a loudness equalization module that balances application-level volumes and an output limiter module designed to prevent signal clipping 1. A graphical control interface built with GTK3 is provided for user interaction 1.
The technical implementation relies on Fast Fourier Transform (FFT) analysis to process audio signals, dividing the power sum into 25 frequency bands using frames with 50% overlap 1. The frame size is calculated dynamically as $N=2^{\lceil \log_2(fs/100) \rceil}$ 1. To normalize volume, the system employs an automatic gain control algorithm with a target gain formula of $\min((1300/L)^{1.6}, 10)$, which caps the maximum boost at +20 dB 1. For protection against distortion, the included limiter uses a look-ahead design, introducing a delay of L frames to ensure signal peaks do not exceed 0.985 full scale 1.
Deployment of this tool requires PipeWire version 1.4 or higher, with GTK 3 necessary during the installation window 1. While the software supports extensive customization via the pw-metadata command-line tool—allowing users to script the enable state, release times, and exclusion of specific apps—it has notable compatibility limitations 1. Currently, the port does not handle JACK clients, streams with more than 8 channels, or Flatpak applications that access PipeWire directly 1.
评论
还没有评论,欢迎留下第一条。