Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Requested buffer size not used on macOS

Abierto
#748 5 comentarios 1 reacción 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
25/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
rust

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Rust
Estrellas
4k
Forks
554
Merge medio
3 d 3 h
PR fusionados (30 d)
4

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de RustAudio/cpal

Todos los issues de RustAudio/cpal

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.