mywave82 / opencubicplayer

Open Cubic Player (unix fork). Music visualizer for various tracked music formats (amiga modules, S3M, IT), chiptunes and other formats related to demoscene
https://stian.cubic.org/project-ocp.php
GNU General Public License v2.0
283 stars 19 forks source link

No audio on MacOS 11.3, M1, installed via intel homebrew #32

Closed njvack closed 3 years ago

njvack commented 3 years ago

Hi folks,

I was hoping to get OCP working on my Mac. It launches fine, but doesn't play any audio out the speakers. The startup messages may give some clues about this — I was imagining it would use CoreAudio, but it seems to not be working. Here's a slightly-trimmed startup log:

playerdevices:
 devpALSA: dlopen(/usr/local/Cellar/ocp/0.2.2/lib/ocp-0.2.2/devpalsa.dylib, 10): image not found
link error
 devpOSS : dlopen(/usr/local/Cellar/ocp/0.2.2/lib/ocp-0.2.2/devposs.dylib, 10): image not found
link error
 devpCA  : CoreAudio player................[CoreAudio] Unable to initialize Output Unit component (status = -66748 (unknown))
 not found: optimize ocp.ini!
 devpSDL2: dlopen(/usr/local/Cellar/ocp/0.2.2/lib/ocp-0.2.2/devpsdl2.dylib, 10): image not found
link error
 devpSDL : dlopen(/usr/local/Cellar/ocp/0.2.2/lib/ocp-0.2.2/devpsdl.dylib, 10): image not found
link error
 devpNone: Super High Quality Quiet Player. (#2)
 devpDisk: Disk Writer..................... (#3)
Super High Quality Quiet Player selected...

samplerdevices:
 devsOSS : dlopen(/usr/local/Cellar/ocp/0.2.2/lib/ocp-0.2.2/devsoss.dylib, 10): image not found
link error
 devsNone: Eternal Silence Recorder........ (#1)
Eternal Silence Recorder selected...

Anything I can do to get this working, or at least debug it more?

Thanks!

mywave82 commented 3 years ago

Hi Nate

The latest release v0.2.90 does contain some compile fixes for OSX. I do not own any OSX machines myself, so there is a bit limited what I can do without help from other developers or remote access to such systems.

If unable to get CoreAudio working, getting SDL2 plugin to compile is the second best thing, that one works for most systems.

For M1 systems, there are some few knows issues about random crashes, probably due to memory access being stricter than x86. A 64bit access must be 64bit aligned for instance. If any such occurs, running configure with - -debug, and providing backtracks from gdb would be of much help.

mywave82 commented 3 years ago

Btw, I saw you compiled for x86 and not arm64 ?

njvack commented 3 years ago

Well, I got a prebuilt binary for intel (and oh goodness it's 0.2.2 which is not very new); I still have one intel-only dependency. Tried a source build and had the same CoreAudio problem.

However! I downloaded 0.2.90 from source and, with a fair bit of tweaking, got it compiled and running (and oh god I have put non-homebrew stuff in /usr/local so I will be forever cursed). Whatever changed with the new version seems to have fixed CoreAudio. I'm not sure whether it's actually using CoreAudio or SDL2, but both seem to have initialized without errors.

My working build is also x86-based, as I was using my existing intel build of homebrew. Gotta remember to arch -x86_64 before configure, make, and make install to get that going.

At some point I'll dig into trying to make a modern ocp work with homebrew on arm64 but that'll have to wait until I have uncursed my homebrew setup more generally...

Thank you! I think this can close with a "yeah homebrew is busted for now" note.