[PIPEWIRE+JACK] Frequent Xruns with specific block size settings (beep example)

未关闭
#709 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
rust

调研方向

Start with the beep example and reproduce the reported Xruns using PIPEWIRE_LATENCY="128/44100" cargo run --features jack --example beep -- --jack on PipeWire's JACK compatibility layer. Compare behavior at block size 512 and with a USB sound card, as the report describes. Done means identifying why the example Xruns under the reported settings and providing a fix or explanation; the issue names no test.

由索引模型根据 Issue 内容生成。

描述

host - pipewire platform - linux

Hi,

I've run into a lot of Xruns recently when using a specific blocksize/samplerate setting ... it was driving me crazy until I found that the "beep" example provided in the cpal repo has the same problem.

To reproduce, start the beep example with

PIPEWIRE_LATENCY="128/44100" cargo run --features jack --example beep -- --jack

At least on my machine, with the internal sound card, there's a very regular occurrence of Xruns, about one per second.

What I don't understand so far is, in a different project of mine I use cpal in more or less exactly the same manner on the same setup, and I can go down to blocksizes of 64 without problems, even though the audio callback is way heavier.

So I'm really confused why a simple example like the beep example create such a problem.

Some more symptoms/hints:

  • with a blocksize of 512 the problem doesn't occur
  • with another app (i.e. firefox) playing audio in the background, the problem disappears
  • sometimes the problem doesn't occur at all, but most of the time it does
  • with a USB soundcard the problem doesn't occur

About my setup:

  • Arch Linux with kernel: Linux ___ 5.19.13-arch1-1 #1 SMP PREEMPT_DYNAMIC Tue, 04 Oct 2022 14:36:58 +0000 x86_64 GNU/Linux
  • Pipewire with all the drop-in replacements for jack, pulseaudio, etc (that is, no actual JACK server is running)

Any hints on why this happens or how to fix it ?

主要语言
Rust
星标
4k
派生
554
平均合并
3 天 3 小时
30 天内合并 PR
4

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

RustAudio/cpal 的其他 Issue

查看 RustAudio/cpal 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。