Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable Embree if we're running on Apple Silicon. #76

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading