Skip to content

Commit a7544db

Browse files
committed
Disable Embree if we're running on Apple Silicon.
1 parent 0797b23 commit a7544db

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: install-deps
1818
run: |
1919
# install scons
20-
python -m pip install --break-system-packages scons==4.4.0
20+
PIP_BREAK_SYSTEM_PACKAGES=1 python -m pip install scons==4.4.0
2121
scons --version
2222
# install windows deps
2323
sudo apt-get install mingw-w64

src/server_init.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
#include "config.hpp"
33
#include "phonon.h"
44
#include "steam_audio.hpp"
5+
#include <godot_cpp/classes/engine.hpp>
6+
#include <godot_cpp/classes/os.hpp>
57

68
using namespace godot;
79

@@ -73,6 +75,14 @@ IPLSimulator create_simulator(IPLContext ctx, IPLAudioSettings audio_cfg, IPLSce
7375

7476
IPLSceneSettings create_scene_cfg(IPLContext ctx) {
7577
IPLSceneSettings scene_cfg = {};
78+
79+
if (SteamAudioConfig::scene_type == IPL_SCENETYPE_EMBREE &&
80+
OS::get_singleton()->get_name() == "macOS" &&
81+
Engine::get_singleton()->get_architecture_name() == "arm64") {
82+
SteamAudioConfig::scene_type = IPL_SCENETYPE_DEFAULT;
83+
SteamAudio::log(SteamAudio::log_info, "Embree is not supported on Apple Silicon, reverting to default scene type.");
84+
}
85+
7686
scene_cfg.type = SteamAudioConfig::scene_type;
7787
if (scene_cfg.type == IPL_SCENETYPE_EMBREE) {
7888
IPLEmbreeDeviceSettings embree_cfg{};

0 commit comments

Comments
 (0)