From abc70559fb9e6d6ee8f9a926dd0d6a28fb45fd3a Mon Sep 17 00:00:00 2001 From: stechyo Date: Sat, 19 Oct 2024 09:04:21 +0100 Subject: [PATCH] Disable Embree if we're running on Apple Silicon. --- .github/workflows/build.yml | 2 +- src/server_init.cpp | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2bc78b7..1d4848b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,7 +17,7 @@ jobs: - name: install-deps run: | # install scons - python -m pip install --break-system-packages scons==4.4.0 + PIP_BREAK_SYSTEM_PACKAGES=1 python -m pip install scons==4.4.0 scons --version # install windows deps sudo apt-get install mingw-w64 diff --git a/src/server_init.cpp b/src/server_init.cpp index 6e75d1f..8e0e7de 100644 --- a/src/server_init.cpp +++ b/src/server_init.cpp @@ -2,6 +2,8 @@ #include "config.hpp" #include "phonon.h" #include "steam_audio.hpp" +#include +#include using namespace godot; @@ -73,6 +75,14 @@ IPLSimulator create_simulator(IPLContext ctx, IPLAudioSettings audio_cfg, IPLSce IPLSceneSettings create_scene_cfg(IPLContext ctx) { IPLSceneSettings scene_cfg = {}; + + if (SteamAudioConfig::scene_type == IPL_SCENETYPE_EMBREE && + OS::get_singleton()->get_name() == "macOS" && + Engine::get_singleton()->get_architecture_name() == "arm64") { + SteamAudioConfig::scene_type = IPL_SCENETYPE_DEFAULT; + SteamAudio::log(SteamAudio::log_info, "Embree is not supported on Apple Silicon, reverting to default scene type."); + } + scene_cfg.type = SteamAudioConfig::scene_type; if (scene_cfg.type == IPL_SCENETYPE_EMBREE) { IPLEmbreeDeviceSettings embree_cfg{};