-
Notifications
You must be signed in to change notification settings - Fork 4
Description
@S-Coding23 hi
I continued testing the arcade emulator's netplay feature today and encountered an audio-related issue:
When the host Player 1 (P1) creates a room, both video and audio work correctly. When guest Player 2 (P2) joins the room, the video successfully syncs to P1’s emulator screen via WebRTC. However, P2 can still hear background audio from their own emulator instance (such as arcade idle music), as if their local emulator is still running in the background.
This issue isn’t noticeable in games like Cadillacs and Dinosaurs, but it’s very obvious in Sengoku 3 (2001), where the background music continues to play.
It’s not a big problem if it’s hard to fix—I can manually mute P2’s audio after joining. But it would be great if this could be handled automatically during the netplay flow.
I asked Copilot for input, and its diagnosis was:
Possible causes:
P2’s Module or audioContext hasn’t been properly paused or suspended
Although the video is overridden (via netplayCanvas), audio is still being played by P2’s EmulatorJS instance
this.pause(true) may only pause frame rendering, not audio playback