Skip to content

Commit

Permalink
build(core): disable OpenAL by default
Browse files Browse the repository at this point in the history
  • Loading branch information
RiscadoA committed Mar 9, 2024
1 parent 074ff7f commit fb13251
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if(WITH_GLFW)
option(GLFW_USE_SUBMODULE "Compile GLFW from source?" ON)
endif()

option(WITH_OPENAL "With OpenAL?" ON)
option(WITH_OPENAL "With OpenAL?" OFF)
option(GLM_USE_SUBMODULE "Compile GLM from source?" ON)

set(CUBOS_CORE_ECS_MAX_COMPONENTS "63" CACHE STRING "The maximum number of components registered in an ECS world.")
Expand Down
5 changes: 3 additions & 2 deletions core/src/al/oal_audio_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ class OALSource : public impl::Source
};
#endif // WITH_OPENAL

#pragma warning(push)
#pragma warning(disable : 4702)
OALAudioDevice::OALAudioDevice(const std::string& specifier)
{
#ifdef WITH_OPENAL
Expand All @@ -155,6 +157,7 @@ OALAudioDevice::OALAudioDevice(const std::string& specifier)
UNSUPPORTED();
#endif // WITH_OPENAL
}
#pragma warning(pop)

OALAudioDevice::~OALAudioDevice()
{
Expand All @@ -164,8 +167,6 @@ OALAudioDevice::~OALAudioDevice()
alcMakeContextCurrent(nullptr);
alcDestroyContext(context);
alcCloseDevice(device);
#else
UNSUPPORTED();
#endif // WITH_OPENAL
}

Expand Down

0 comments on commit fb13251

Please sign in to comment.