Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Requested buffer size not used on macOS

Đang mở
#748 5 bình luận 1 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
rust
Lĩnh vực
audio-video-rtc

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Rust
Star
4k
Fork
554
Merge trung bình
3 ngày 3 giờ
Pull request đã merge (30 ngày)
4

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của RustAudio/cpal

Tất cả issue của RustAudio/cpal

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.