Runtime controlling sources in rodio, can we do better?
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Necesita aclaración
- Estado de actividad
- Tranquilo
- Stack tecnológico
- rust
- Área
- audio-video-rtc
Línea de trabajo
Read the Source examples in the issue and compare the proposed approaches with hodaun, kira, and the linked channel_router pull request. Start by weighing periodic callbacks, atomics, and command queues for the different source types; the issue is done when the discussion reaches a decision on an approach and its tradeoffs.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Chains of rodio Source's are currently only controllable using periodic callback. It has a few great advantages namely:
- Users get to pick between latency and performance through longer and shorter periods between callbacks. Those periods are defined in real time not number of samples
- Can have very little overhead as one periodic callback at the end can control the entire chain. That means only one conditional is added for most samples.
It does have its downsides it require users to either: have lots of periodic callbacks which negates the advantages, for example:
let controlled source = sine(..).periodic_callback(function_controlling_sine)
.amplify(1.0).periodic_callback(function_controlling_amplify)
.pausable().periodic_callback(function_controlling_pausable)
Or to use lots of inner_mut to navigate through the pipeline/chain. This feels akward and is less readable.
let controlled source = sine(..).amplify(1.0).pausable().periodic_callback(|pausable| {
function_controlling_pausable(pausable);
function_controlling_amplify(pausable.inner_mut())
function_controlling_sine(pausable.inner_mut().inner_mut())
})
Users also have to set up their own method of moving intentions/commands into the callbacks. Two solutions are: checking a queue receiver or always updating inner sources from loaded atomic's. This can be hard for newer rust users or those not skilled at concurrency.
Over the last few months a few alternatives have been proposed such as:
- heap allocated atomics.
- a command queue.
There are also other audio projects we can take inspiration from, such as:
hodaun and
kira.
Not all of these solutions are optimal for every source. Where atomics might
work well for simple few paramater sources like amplify and pausable they could
really hamper performance for things like channel_router.
Lets discuss our options highlighting advantages and potential drawbacks then
evaluate those.
- Lenguaje dominante
- Rust
- Estrellas
- 2.5k
- Forks
- 338
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de RustAudio/rodio
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 73/100
-
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
-
Dificultad 3/5 1-2 días Aptitud para principiantes 67/100
Todos los issues de RustAudio/rodio
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
ci: migrate pinned macos-15 runners to macos-26 and macos-26-intelPosiblemente ocupada @hawkingrei la tomó hoy. Abiertoenhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
nowledge-co/hawdb#2224 ·
Los mantenedores suelen responder en 1 día
-
Effective coverage reads function totals as line totals when the LLVM report has no branchesAbiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
eclipse-score/coverage_tool#95 ·
Los mantenedores suelen responder en 2 días
-
bug nvim
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100