Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Rebuilding OutputStream and Sinks after stream invalidation on Android

Aperta
#836 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

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à
Ferma
Stack tecnologico
rust

Direzione di ricerca

Start by reading the issue's description of Android OutputStream invalidation, the with_error_callback signal, and the state held by Sinks. The issue does not identify relevant source files or tests, so first trace how rodio creates streams and sinks and handles stream errors. Done would mean establishing a recommended way to rebuild playback while preserving queued sources, order, volume, pause state, and track position; the issue does not settle the design.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

On Android I noticed that the OutputStream becomes invalid when the audio device changes, for example when Bluetooth headphones are connected. This can be detected via with_error_callback.

When this happens I have to recreate the OutputStream. As a consequence all Sinks tied to that stream must also be recreated.

The problem is that Sinks hold important state like queued Sources, playback order, volume, paused state, and the current playback position inside a track. Recreating Sinks causes all of this state to be lost.

Is there an official or recommended way in rodio to handle this situation?
Should applications keep track of all Sources and Sink state manually and reapply everything to newly created Sinks?

The goal is to continue playback seamlessly after the OutputStream is rebuilt, without breaking behavior or restarting audio.

Is there a recommended way to handle this use case?

Lingua principale
Rust
Stelle
2.5k
Fork
338
Merge medio
1g 3h
PR unite (30g)
1

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di RustAudio/rodio

Tutte le issue di RustAudio/rodio

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.