Split screen: window 2's F1 audio output is overwritten by window 1's at every start

Đang mở Phù hợp với người mới
#989 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ó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
72/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rust
Lĩnh vực
backend, desktop

Hướng nghiên cứu

Bắt đầu tại launcher/src-tauri/src/coop_launch.rs, ở prepare_windows(), nơi theo báo cáo sao chép controls.ini vào từng split/N/controls.ini. Đọc cách thao tác cập nhật đó xử lý thiết bị và âm lượng của [audio], rồi so sánh hành vi với bản vá workaround đính kèm. Hoàn tất khi mỗi cửa sổ giữ nguyên thiết bị âm thanh và âm lượng riêng sau khi khởi động lại.

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

Mô tả

bug
What happened

In split screen, each window has its own controls.ini (window 2 uses split/2/controls.ini), and the F1 > Audio page lets each window pick its own output device. But at every start, prepare_windows() in launcher/src-tauri/src/coop_launch.rs copies the game folder's controls.ini over every split/N/controls.ini, so window 2's [audio] device (and volume) is replaced by window 1's. After a restart both windows always play on the same device.

Use case: I play split screen with a remote player through Parsec. I want window 1 on my headset and window 2 on a virtual device that Parsec captures, so each player only hears their own game. Windows' per-app output setting can't split them because both windows are the same pkp.exe.

What you expected

Each window keeps its own F1 Audio choice (output device and volume) across starts.

For reference, here is how I worked around it on my side (patch attached): prepare_windows still refreshes each window from controls.ini, but keeps the window's own [audio] device and volume. It works for me (window 1 on my headset, window 2 on another output, kept after restarts, and Parsec only gets player 2's sound). You know the code much better than me, so feel free to fix it differently, it's just in case it helps.

A nice follow-up could be an "Audio output" choice per player in the launcher's split screen card, next to Controller and Screen. Happy to open a PR if you prefer.

recompia-audio-par-fenetre.patch

Version

0.18.1

Platform

Windows PC

Update channel

Stable

GPU and driver version

NVIDIA GeForce RTX 5070 Ti, driver 621.14

pkp.log

Not a crash: the bug is in the launcher (prepare_windows in coop_launch.rs copies controls.ini over split/N/controls.ini at every start). pkp.log from a split screen session below.

pkp.log

Before you send
  • I searched the open and closed issues and this is not already reported.
  • My game dump is version 2.0.1a.
Ngôn ngữ chính
C++
Star
224
Fork
0
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

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 featureJosh/Recompia

Tất cả issue của featureJosh/Recompia

Issue tương tự

Thêm issue về C++

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.