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

A better API for querying device capabilities

Abierto
#368 5 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
rust

Línea de trabajo

Start by reviewing the existing Device::supported_formats API and the host implementations that expose device capabilities; the issue does not name specific files. Compare how hosts report sample formats and sample rates, including whether rates are ranges or discrete values. A useful first result is a consolidated account of those differences to inform a scalable querying API.

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

Descripción

CPAL's current approach to querying capabilities is the Device::supported_formats method, which aims to enumerate all possible formats supported by the device. Providing an exhaustive list of formats in this manner is not very scalable, especially as we anticipate adding support for alternate sample formats, audio data layouts (#367) and buffer sizes in the future.

#203 proposes a slimmer API that allows querying individual formats, though this is equally unscalable for users wishing to determine the full set of capabilities of a device.

I wonder if we can look to Vulkan's device capabilities API for inspiration here? Edit: I guess Vulkan has the advantage of co-ordinating with driver implementers on a standard for this, whereas we are restricted to working with what host's currently provide access to.

A useful first step might be to consolidate all our existing knowledge of how capabilities are exposed by each Host so that we can get a clearer idea of what we have to work with. E.g. are the same sample rates supported for all sample formats across all hosts? Are supported sample rates always described in continuous ranges? Or do some hosts provide supported sample rates only as a set of discrete integers?

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.