[linux] [chromeOS] Recording with BufferSize < 1024 leads to bad audio
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- rust
调研方向
Start by tracing how cpal reports the minimum buffer size for Linux audio devices, then inspect the backend path used by ChromeOS’s Linux subsystem. The report points to buffers below 1024 being truncated, but does not identify the responsible layer or a file or test. Done means reporting a minimum size of 1024 where that limit applies and verifying that requested buffers do not lose audio data.
由索引模型根据 Issue 内容生成。
描述
On ChromeOS, using the Linux subsystem the cpal library seems to work correctly and records audio. However if I request buffer size smaller than 1024 (I used 480 and 960 for single-channel, 48 kHz 10 ms or 20 ms chunks) I receive buffers of the requested size that result in incorrect audio when played back (the audio is shorter than expected, higher pitched and has artifacts). After much investigation it seems like those are 1024-buffers truncated to the requested size and the truncated data is lost (instead of being passed in the next callback invocation). Requesting buffers of size 480 leads to ~0.5x audio length, and 960 is almost okay (with just some artifacts), which led me to the 1024 bytes conclusion. If requested BufferSize is >= 1024 then all the audio data is received correctly.
In such cases it would be nice for cpal to report the minimal buffer size as 1024, as opposed to 1.
This is not reproducible on my other Linux machines, and I have no clue which layer of the stack is responsible for truncation.
- 主要语言
- Rust
- 星标
- 4k
- 派生
- 554
- 平均合并
- 1 天 3 小时
- 30 天内合并 PR
- 1
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
RustAudio/cpal 的其他 Issue
-
API design
难度 2/5 1-3 小时 新手友好度 64/100
-
correctness
难度 2/5 1-3 小时 新手友好度 66/100
-
aaudio: dynamic buffer tuning never grows the buffer (set_buffer_size_in_frames reports Err on success)可能已有人在做 @dannyward630 于 39 天前认领。 未关闭host - aaudio platform - android
难度 2/5 1-3 小时 新手友好度 79/100
-
WebAudio wasm build fails with wasm-bindgen panic=unwind closures可能已有人在做 @bogusyogi 于 48 天前认领。 未关闭host - webaudio platform - web
难度 2/5 1-3 小时 新手友好度 75/100
-
PipeWire: dropping callback captures on the realtime worker can terminate the process with SIGXCPU未关闭host - pipewire platform - linux
难度 4/5 3-5 天 新手友好度 45/100
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 68/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
ci: migrate pinned macos-15 runners to macos-26 and macos-26-intel可能已有人在做 @hawkingrei 今天认领。 未关闭enhancement
难度 2/5 1-3 小时 新手友好度 85/100
nowledge-co/hawdb#2224 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
eclipse-score/coverage_tool#95 ·
维护者通常 2 天内回复
-
bug nvim
难度 2/5 1-3 小时 新手友好度 74/100