beatoraja icon indicating copy to clipboard operation
beatoraja copied to clipboard

[MacOS/Apple Silicon] Audio will randomly not play

Open rgbmew opened this issue 9 months ago • 3 comments

https://github.com/user-attachments/assets/99e852b9-35a8-4476-aa70-1c227a4366d9

https://github.com/user-attachments/assets/48e42c5e-fdf4-4b57-a410-4fc484c298b9

(Please excuse the echo in the second video. That's not the game, just OBS acting up)

When I first boot the game, the first 2ish songs actually play just fine. It's only after I've already played a little bit that audio will start freaking out. It can also happen to UI sound effects. I failed a stage earlier today, and the "stage failed" sound didn't play. This can happen on any song, it seems to have nothing to do with character encoding/UTF8.

I'm using Liberica JDK 17 Full x86_64, on an M4 Pro Mac Mini, and macOS Sequoia 15.3.1

java --version
openjdk 17.0.14 2025-01-21 LTS
OpenJDK Runtime Environment (build 17.0.14+10-LTS)
OpenJDK 64-Bit Server VM (build 17.0.14+10-LTS, mixed mode, sharing)

I am aware that this has been reported in the Beatoraja English Guide Discord server, but I wanted to make a formal report here, and make you aware that it's not just one user having this problem.

rgbmew avatar Mar 09 '25 21:03 rgbmew

Here's two my personal solution to both launch beatoraja on mac(mine is m2) and with correct audio

  • use an old version of oracle jdk8 which hasn't distribute as seperate platform(x86 and arm platform-specific version). This solution can only play old version of beatoraja because the high version requires jdk17 now
  • use a modified fork version of beatoraja if you don't care about the ir things just want to play it, see here: commit

(The second approach may need an arm jdk, I haven't tested a x86 version)

Catizard avatar Mar 11 '25 11:03 Catizard

Howdy, and thanks for the reply! I ended up going with the second option, and all seems to work well :)! And for future reference, it does require ARM JDK. But you've done God's work with your fork, thank you.

For other people reading this issue: There is a glitch when using ARM Java where opening the Key Config menu will crash the game on a shader compilation error. That may just be on my end, but I got around the crash by keeping both x86 and ARM Java installed, keeping both .jars in my Beatoraja folder, and switching JAVA_HOME to x86 for Beatoraja/ARM for Endless Dream. I now remap my keys in x86 Beatoraja, and play the game in ARM Endless Dream.

By default, the Liberica installer will overwrite the x86 Java when installing the ARM version, but this can be avoided by just renaming the version folder in /Library/Java/JavaVirtualMachines/<version>. IE: /Library/Java/JavaVirtualMachines/liberica-jdk-17-full/ -> /Library/Java/JavaVirtualMachines/liberica-jdk-17-full-arm/

This is what my .command files look like now: Image

Thank you once again for your work, Catizard! :)

rgbmew avatar Mar 12 '25 15:03 rgbmew

Hey @rgbmew, thanks for reporting, i have fixed the crash issue so there is no need for having an alt-jdk now :D Please see here https://github.com/Catizard/lr2oraja-endlessdream/tree/macos-fix

Catizard avatar Apr 03 '25 15:04 Catizard