Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

SpatialPlayer does not work with set_speed and looped decoder

未关闭
#880 8 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
48/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
冷清
技术栈
rust

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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

主要语言
Rust
星标
2.5k
派生
338
平均合并
1 天 3 小时
30 天内合并 PR
1

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

RustAudio/rodio 的其他 Issue

查看 RustAudio/rodio 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。