Runtime controlling sources in rodio, can we do better?
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Tranquilla
- Stack tecnologico
- rust
- Ambito
- audio-video-rtc
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Rust
- Stelle
- 2.5k
- Fork
- 338
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di RustAudio/rodio
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 73/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 67/100
Tutte le issue di RustAudio/rodio
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
ci: migrate pinned macos-15 runners to macos-26 and macos-26-intelForse già presa @hawkingrei l’ha presa oggi. Apertaenhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
nowledge-co/hawdb#2224 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
eclipse-score/coverage_tool#95 ·
I maintainer di solito rispondono entro 2 giorni
-
bug nvim
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100