Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Requested buffer size not used on macOS

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

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

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

调研方向

The report concerns output stream buffer sizing on macOS with CPAL 0.15.0. Start by reading the CoreAudio output stream configuration path and its tests; the payload does not name specific files or tests. Done means determining whether the requested size is supported, documenting the behavior, and exposing the chosen size before playback if the API can provide it.

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

描述

host - coreaudio platform - macos

Hey there! I'm running into the following issue:

  1. I'm enumerating through all the supported_output_configs() and finding one where my preferred buffer size fits within the SupportedBufferSize range.
  2. I call SupportedStreamConfigRange::with_sample_rate().config() on this with a rate within the range
  3. On the resulting StreamConfig, I set the buffer size to my preferred one, knowing it's within range
  4. Build an output stream

The requested buffer size isn't taken into account. When I request 128 I get a stream of 279. Other times I get 512.

Am I doing something wrong? Is this a bug? Or is this a limitation of the CoreAudio framework, and if so:

  • How do other software packages work around this, where you can pick a precise buffer size in the preferences?
  • Shouldn't CPAL document this, and call this variable preferred_buffer_size or something?
  • Is there a way of knowing what max buffer size was decided on for the stream, before I call play() it? I need that information to build my audio chain

This is on macOS Ventura 13.1, with CPAL 0.15.0.

主要语言
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 摘要。