OpenEmu / OpenEmu

🕹 Retro video game emulation for macOS
https://openemu.org
16.17k stars 1.26k forks source link

Audio failure during N64 play [PS5 bluetooth controller & macOS Monterey 12.3] #4883

Open ymgenesis opened 1 year ago

ymgenesis commented 1 year ago

Audio cuts out and stays off while playing Nintendo 64 (Mupen64Plus 2.5.9) until restarting OpenEmu.

Steps to reproduce

  1. Connect PS5 bluetooth controller(s) using controller bluetooth mode and macOS native configuration in bluetooth preferences.
  2. Open OpenEmu and start N64 game (tested with Mario Kart 64).
  3. Play for a handful of minutes. In my experience could be anywhere between 2 to 15 minutes.
  4. Audio cuts out, gameplay continues working.

The audio didn't seem to cut out after ~20-30 minutes of playing with laptop keyboard. I connected the PS5 controller with OpenEmu still on, and after ~10 minutes it cut out.

Not sure if the PS5 controller/bluetooth process is causing the issue. Could be any number of other issues. As shown in "Workaround" below, it might be a Monterey-specific issue. Maybe I'll upgrade to Ventura as see what happens and report back another time.

Expected Behavior

I'd expect the audio to continue until the game is powered off by user when using any controller.

Observed Behavior

Audio cuts out while following normal use.

Debugging Information

Logs when using PS5 controller

Full system log from console application around time of audio failure (anywhere between line 5 and 1087. Noticing a lot of bluetooth scan/config messages.): https://pastebin.com/0xF7TuTJ

Console application log around time of audio failure with search term 'openemu' (failure around line 3269): https://pastebin.com/K8JEJmPA

Workaround

I saw on Reddit that reverting to v 2.1 works to fix this, but I'd rather stay on the latest version. It seems to be Monterey-specific: https://www.reddit.com/r/OpenEmu/comments/w2bjj2/no_sound_n64_monterey_alternatives/

v2.1 has a "Improved support for USB Audio output devices" fix, while v2.1.1 has a "Fixed audio not working for Bluetooth and other secondary audio output devices" fix. v2.3 has a "Fixed multi-output audio device crash" fix. Could also be an issue with Apple Silicone/Rosetta.

Monterey

Monterey update 12.3.1 has a fix "Bluetooth devices, such as game controllers, may disconnect from your Mac after playing audio through some Beats headphones".

After updating to Monterey 12.6.6 (latest Monterey), it seems the issue happens more often (maybe every 2-4 minutes) when playing Mario Kart 64.

Saving the state and reloading brings the audio back, however, which did not work before. So, I'll make do with that for now.

ninonook1 commented 10 months ago

interesting, i seem to just have that issue as well, regardless of whats device i have connected (even when its non) i hope it gets patched soon

ScottXD commented 5 months ago

I also have this issue with OpenEmu on Monterey. This isn’t just an OpenEmu issue, this also happens with SixtyForce on Monterey. While playing an N64 game, audio cuts out after a few seconds. I’ve found manual temporary workarounds such as pausing/unpausing emulator, changing audio output sources, going into Audio MIDI Setup and changing bitrates/formats. I’m looking for a developer to write me an AppleScript to make Audio MIDI Setup to launch in background when running SixtyForce and/or OpenEmu and every few seconds toggle between two bitrates/formats in the background without interrupting fullscreen gameplay as a work around. I’m a musician, not a programmer. Anyone willing to try this?

ScottXD commented 5 months ago

Downgrading OpenEmu to 2.2.1 seems to have fixed the audio stopping issue for me on Monterey 12.7.4 Now, I just need older versions of SixtyForce. Anyone know where to find them? Gerrit keeps a changelog on their site, but not older versions. ???