No audio on Mac OS
Closed this issue · 4 comments
There is no audio playback on Mac OS (Intel and M1). There seems to be an issue with missing the CoreAudio framework in the raylib build which results in this output when calling init_audio_device
INFO: AUDIO: Device initialized successfully
INFO: > Backend: miniaudio / Null
INFO: > Format: 32-bit IEEE Floating Point -> 32-bit IEEE Floating Point
INFO: > Channels: 2 -> 2
INFO: > Sample rate: 48000 -> 48000
INFO: > Periods size: 1440
I tried to update the package to raylib 5.0 which seems to solve the issue. And now the audio examples are playing music and showing the CoreAudio backend in the log:
INFO: AUDIO: Device initialized successfully
INFO: > Backend: miniaudio / Core Audio
INFO: > Format: 32-bit IEEE Floating Point -> 32-bit IEEE Floating Point
INFO: > Channels: 2 -> 2
INFO: > Sample rate: 48000 -> 48000
INFO: > Periods size: 1440
Here are the changes I made to get the example to work:
raylib-5.0-macos-hack.patch
Thanks for reporting this, and providing a fix as well!
I'll do the upgrade to raylib 5.0 soon(TM), and update the opam package then.
Since you mentioned M1:
Did you have any trouble building on it? A discord user couldn't build on M1 and I created this ticket for it (#38) but cannot test it locally
Since you mentioned M1: Did you have any trouble building on it?
Building it worked fine, did git clone
and made a fresh switch with ocaml 5.1.1. dune build
just gave a few warnings and the examples ran as expected.
Maybe there are some c compiler dependencies that were already present on my system he didn't have...
I just released the upgrade to raylib 5.0.0 which closes this issue (hopefully). If there are still problems, feel free to reopen