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 7cfd86b
Showing 1 changed file with 10 additions and 0 deletions.
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 7cfd86b

Please sign in to comment.