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

SpatialPlayer does not work with set_speed and looped decoder

Aperta
#880 8 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
rust

Direzione di ricerca

Start by reproducing the reported noise with the provided SpatialPlayer and looped Decoder example, then compare it with the normal Player and repeat_infinite() cases. The issue names no source files or tests, so first trace set_speed and looped decoder handling to their implementation and tests. Done means identifying and fixing the cause so changing playback speed works without noise, with a regression test covering the reported case.

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

Descrizione

bug

When using a SpatialPlayer the engine sound makes weird noises when the player speed is changed.
This issue does not occur on any playbackspeed when using a normal player/sink.

fn main() {
    let stream_handle = rodio::DeviceSinkBuilder::open_default_sink().unwrap();

    let player = rodio::SpatialPlayer::connect_new(
        stream_handle.mixer(),
        [0.0; 3], 
        [0.0, -1.0, 0.0],
        [0.0, 1.0, 0.0]
    );

    // let player = rodio::Player::connect_new(stream_handle.mixer());

    let file = std::fs::File::open("assets/engine.mp3").unwrap();
    let source = rodio::Decoder::new_looped(file).unwrap();

    player.append(source);
    player.set_speed(1.5);

    player.sleep_until_end();
}

I tried let source = rodio::Decoder::try_from(file).unwrap().repeat_infinite(); instead but it made the sound even worse.

What can i do to fix this, or is this an Issue of the crate itself.

Thank you for your help.

Rodio: 22.2, Windows 11
engine.mp3

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.