Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

`SourcesQueueOutput.try_seek()` after `SourcesQueueInput.append()` fails until output is first iterated.

Đang mở
#932 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
62/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rust
Lĩnh vực
audio-video-rtc

Hướng nghiên cứu

Start with SourcesQueueOutput.try_seek() and the queue implementation in the queue module, then inspect how SourcesQueueInput.append() updates the output state. Reproduce the issue using the Rust snippet in the report, comparing seek before and after next(). Done when seeking succeeds immediately after appending a source, with a regression test covering that sequence.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

I'm writing an application that uses Rodio to play audio from a queue, and I want users to be able to load a file (appending it to a queue) and seek on that file before playback begins. However, after appending a source to a newly created queue, calling .try_seek() on SourcesQueueOutput fails unless next() is called on it at least once. This behavior feels unintuitive, and can be awkward to work around if SourcesQueueOutput is being accessed through some other object that owns it and doesn't provide an easy way to call next() (i.e. if it had been appended to a Player, which is what my application is currently doing).

(here the code snippet I used to isolate this behavior)

use std::time::Duration;
use rodio::{ buffer::SamplesBuffer, queue::queue, math::nz };
let (tx, mut rx) = queue(false);
tx.append(SamplesBuffer::new(nz!(1), nz!(48000), vec![1.0, 1.5, 2.0]));
rx.next()  // if next() is not called at least once, the assertion fails.
let result = rx.try_seek(Duration::default());
assert!(result.is_ok(), "Seek failed after append()");
Ngôn ngữ chính
Rust
Star
2.5k
Fork
338
Merge trung bình
1 ngày 3 giờ
Pull request đã merge (30 ngày)
1

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của RustAudio/rodio

Tất cả issue của RustAudio/rodio

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.