Input Boost can clip with the clip indicator dark: the level meter reads only negative samples
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 68/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- cpp
调研方向
从 src/util.cpp 和 src/util.h 中的 CStereoSignalLevelMeter::Update 开始,跟踪 src/levelmeter.cpp 和 src/clientdlg.cpp 使用的值。重现 issue 中描述的正偏斜和对称情况,然后验证正向和负向 clipping 是否都能被 clip indicator 和 feedback auto-mute 一致地检测到。
由索引模型根据 Issue 内容生成。
描述
🤖 AI: Input Boost can drive the signal into hard clipping while the clip indicator stays dark and the feedback auto-mute stays silent, because the level meter reads only negative samples.
Describe the bug
#3834 made Input Boost clamp with Float2Short instead of wrapping, so overload now clips. The level meter runs on that same buffer inside the same block, and its loop takes std::min over negatives only, every third one. A clip that goes positive reads zero.
One cause, two consumers: the clip indicator and the feedback auto-mute both read the single value Update() writes.
To Reproduce
A real client sending into a real server, with the server's own recording as the evidence and the client's clip indicator read off the screen. Three arms, same source peak, only the skew differs:
| source, Input Boost | within 1% of full scale, positive | negative | clip indicator |
|---|---|---|---|
| symmetric, 4x | 15.16% | 15.16% | lights |
| 6:1 positive-skewed, 4x | 15.05% | 0.00% | dark |
| 6:1 positive-skewed, 10x | 29.41% | 0.00% | dark |
| 2:1 positive-skewed, 4x | 16.37% | 0.00% | dark |
| 2:1 positive-skewed, 10x | 31.16% | 22.59% | lights |
The control and the 4x skewed arm clip by the same amount. The last two rows set the boundary: at a 2:1 crest asymmetry, which is the most any real recording to hand reaches over a loud 100 ms window, the indicator is still dark on 16.37% clipped samples at 4x — and lights at 10x only because that boost drives the quiet half to full scale as well. So what hides a clip is the quiet half staying below full scale, not the ratio itself.
Expected behavior
Clipping lights the clip indicator whichever way the waveform clips.
Version of Jamulus
3.12.5dev, built at 267bf6b7. The end-to-end arm ran on Linux (g++ 13.3.0, Qt 5.15.13, JACK). The meter itself was additionally built and run from the same src/util.cpp on macOS 12.7.6 (Apple clang 14, Qt 5.15.2), on Windows 11 (MSVC 19.44, Qt 6.10.2) and on aarch64 Linux (g++ 14.2.0, Qt 5.15.15): all four emit byte-identical output over 54 lines of arms, so neither the platform, the architecture, nor the Qt major version changes what the indicator does.
Additional context
- Driving the shipped
CStereoSignalLevelMeterdirectly gives the same split at block level: at Input Boost 4x a symmetric and a 6:1 skewed source both pin 18.6% of samples at full scale, and only the symmetric one lights the indicator. - The auto-mute inherits the bias and does more than light an indicator: it mutes the channel and opens a modal. Run end to end with detection enabled, the symmetric control at 4x opens "Audio feedback or loud signal detected" and it stays up for 11 of 14 sampled frames, while the 6:1 skewed source at 4x and at 10x never opens it. Its reach is narrow either way:
DETECT_FEEDBACK_TIME_MSis a single-shot 3-second window armed on connection, so it never sees a level that rises later in a session. - The indicator needs exactly
-32768: an all--32767block reads 8.0000000 and stays dark, all--32768reads 8.0000424 and lights. corrados intended that in 2020, when nothing on this path applied gain above 1. - Decimation: the stereo loop steps
i += 6reading[i]and[i+1], so four of every six sample positions are never examined. A single-sample clip is seen at interleaved index 0 and 1 and missed at 2, 3, 4 and 5. - The recording is taken after Opus, which rings around a flat top, so "within 1% of full scale" is the measure rather than a count of exact
+32767samples. - The server keeps its own meter of the same type —
CChannel::SignalLevelMeteris also aCStereoSignalLevelMeter— so it inherits the same bias, and the channel meter it feeds overCLM_CHANNEL_LEVEL_LISThas its own clip indicator. In the runs above that indicator is dark on exactly the arms where the client's is, and lit on exactly the arms where the client's is. Two meters, computed independently at each end, agree row for row. - The same thing happens on Windows through ASIO rather than JACK, using the CI build of this commit: with the 6:1 source at Input Boost 4x the server's recording reaches
+32767on 7.57% of samples and −7797 at the other extreme, while the client's input meter carries no red pixel at all. - Not measured: the end-to-end client path on macOS, and any real recording with a crest asymmetry beyond 2:1.
🤖 This message was written by AI and reviewed by @mcfnord.
- 主要语言
- C
- 星标
- 1.1k
- 派生
- 248
- 平均合并
- 2 天 20 小时
- 30 天内合并 PR
- 8
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
jamulussoftware/jamulus 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
jamulussoftware/jamulus#3953 · 2 条评论 ·
-
AI bug
难度 2/5 1-3 小时 新手友好度 82/100
jamulussoftware/jamulus#3901 · 4 条评论 · 1 个 reaction ·
-
AI
难度 2/5 1-3 小时 新手友好度 78/100
jamulussoftware/jamulus#3846 ·
-
难度 3/5 1-2 天 新手友好度 65/100
jamulussoftware/jamulus#3961 ·
-
难度 3/5 1-2 天 新手友好度 76/100
jamulussoftware/jamulus#3958 ·
查看 jamulussoftware/jamulus 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
bradcypert/plum#53 ·
-
Component: GLib
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 75/100
-
Status: Opened
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 75/100
nextbsd/nextbsd-userland#285 ·