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

New WASAPI implementation

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

Maintainer thường phản hồi trong vòng 1 ngày

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

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tái cấu trúc
Độ 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, backend

Hướng nghiên cứu

Read the existing WASAPI host and the proposed approach in PR #1413, then compare the migration plan with the feature-gated host addition in issue #1299. The issue proposes using WinRT and the wasapi-rs crate, but leaves design and implementation scope open; done means the new implementation works alongside the current host behind a feature before becoming the default.

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

Mô tả

code quality dependencies host - wasapi platform - windows

The WASAPI host could really use a makeover. In particular, switching to WinRT APIs would remove the need to deal with COM, which is quite a headache at times (e.g. #1302, #1402). Further more, it probably makes sense to use the wasapi-rs crate instead of reinventing the wheel, as this would significantly reduce cpal's maintenance burden.

To pick up from https://github.com/RustAudio/cpal/pull/1413#issuecomment-6402800112:

I'm always careful to long for greener pastures. Legacy code has typically accumulated so many fixes and edge cases, that sometimes it's easier to refactor in place than to rewrite entirely.

In general I agree with the sentiment, but in this case I just don't see this approach being viable. The proposed changes will inevitably have to change a lot at once anyway, as switching from raw bindings to a dedicated crate can't really be broken up in small steps, and a similar problem arises with WinRT. If we then add the general code quality concerns of the current implementation on top, we end up with a large amount of extra effort just to find a clean migration path from A to B that remains functional at every step of the way, and I'd much rather spend this effort on making the new implementation as good as possible.

We could approach this the in a similar fashion to #1299, where we start with adding the new host alongside the existing one, guarded behind a feature, and eventually make it the new default.

Ngôn ngữ chính
Rust
Star
4k
Fork
554
Merge trung bình
3 ngày 3 giờ
Pull request đã merge (30 ngày)
4

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

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

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.