Skip to content

Commit

Permalink
Disable Embree if we're running on Apple Silicon.
Browse files Browse the repository at this point in the history
  • Loading branch information
stechyo committed Oct 19, 2024
1 parent 0797b23 commit abc7055
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions src/server_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#include "config.hpp"
#include "phonon.h"
#include "steam_audio.hpp"
#include <godot_cpp/classes/engine.hpp>
#include <godot_cpp/classes/os.hpp>

using namespace godot;

Expand Down Expand Up @@ -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{};
Expand Down

0 comments on commit abc7055

Please sign in to comment.