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

Rebuilding OutputStream and Sinks after stream invalidation on Android

Abierto
#836 2 comentarios 0 reacciones 0 asignados Ver en GitHub

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
Estancado
Stack tecnológico
rust

Línea de trabajo

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.

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

Descripción

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?

Lenguaje dominante
Rust
Estrellas
2.5k
Forks
338
Merge medio
1 d 3 h
PR fusionados (30 d)
1

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/rodio

Todos los issues de RustAudio/rodio

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.