From e342d6187c70b4623eec19a5cb62ae43f2d234f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=9A=93?= Date: Wed, 4 Jun 2025 10:18:53 -0400 Subject: [PATCH] Update dependencies in libretro builds --- libretro/Makefile | 2 +- subprojects/boost_asio.wrap | 2 +- subprojects/boost_assert.wrap | 2 +- subprojects/boost_config.wrap | 2 +- subprojects/boost_container_hash.wrap | 2 +- subprojects/boost_core.wrap | 2 +- subprojects/boost_describe.wrap | 2 +- subprojects/boost_mp11.wrap | 2 +- subprojects/boost_optional.wrap | 2 +- subprojects/boost_preprocessor.wrap | 2 +- subprojects/boost_static_assert.wrap | 2 +- subprojects/boost_throw_exception.wrap | 2 +- subprojects/boost_type_traits.wrap | 2 +- subprojects/egl-registry.wrap | 2 +- subprojects/flac.wrap | 2 +- subprojects/openal-soft.wrap | 2 +- subprojects/opengl-registry.wrap | 2 +- .../packagefiles/boost_assert-snprintf.patch | 2 +- subprojects/packagefiles/flac-buildtype.patch | 7 +- .../packagefiles/flac-emscripten-endian.patch | 2 +- subprojects/packagefiles/flac-int32.patch | 4 +- .../openal-soft-0001-no-exceptions.patch | 200 +++++++++--------- .../packagefiles/openal-soft-constexpr.patch | 6 +- .../openal-soft-emscripten-pthread.patch | 2 +- ...openal-soft-emscripten-setschedparam.patch | 2 +- .../packagefiles/openal-soft-filesystem.patch | 6 +- .../packagefiles/openal-soft-int32.patch | 4 +- .../openal-soft-mkxp-polyfill.patch | 14 +- .../packagefiles/openal-soft-null.patch | 2 +- .../packagefiles/openal-soft-pic.patch | 2 +- .../packagefiles/openal-soft-ps3.patch | 11 - subprojects/stb.wrap | 2 +- 32 files changed, 144 insertions(+), 156 deletions(-) diff --git a/libretro/Makefile b/libretro/Makefile index def87bef..03dce5c6 100644 --- a/libretro/Makefile +++ b/libretro/Makefile @@ -1,6 +1,6 @@ # Configure flags are based on the ones from https://github.com/ruby/ruby.wasm -RUBY_VERSION ?= v3_3_7 +RUBY_VERSION ?= v3_3_8 WABT_VERSION ?= 1.0.37 LIBYAML_VERSION ?= 0.2.5 ZLIB_VERSION ?= 1.3.1 diff --git a/subprojects/boost_asio.wrap b/subprojects/boost_asio.wrap index 823fba6a..20dba72a 100644 --- a/subprojects/boost_asio.wrap +++ b/subprojects/boost_asio.wrap @@ -1,6 +1,6 @@ [wrap-git] url = https://github.com/boostorg/asio -revision = boost-1.87.0 +revision = boost-1.88.0 depth = 1 patch_directory = boost_asio diff_files = boost_asio-counter.patch diff --git a/subprojects/boost_assert.wrap b/subprojects/boost_assert.wrap index 34057f12..13ea6206 100644 --- a/subprojects/boost_assert.wrap +++ b/subprojects/boost_assert.wrap @@ -1,6 +1,6 @@ [wrap-git] url = https://github.com/boostorg/assert -revision = boost-1.87.0 +revision = boost-1.88.0 depth = 1 patch_directory = boost_assert diff_files = boost_assert-snprintf.patch diff --git a/subprojects/boost_config.wrap b/subprojects/boost_config.wrap index 6d45b92f..e4233ccc 100644 --- a/subprojects/boost_config.wrap +++ b/subprojects/boost_config.wrap @@ -1,5 +1,5 @@ [wrap-git] url = https://github.com/boostorg/config -revision = boost-1.87.0 +revision = boost-1.88.0 depth = 1 patch_directory = boost_config diff --git a/subprojects/boost_container_hash.wrap b/subprojects/boost_container_hash.wrap index 9c1f735c..85c8ee81 100644 --- a/subprojects/boost_container_hash.wrap +++ b/subprojects/boost_container_hash.wrap @@ -1,5 +1,5 @@ [wrap-git] url = https://github.com/boostorg/container_hash -revision = boost-1.87.0 +revision = boost-1.88.0 depth = 1 patch_directory = boost_container_hash diff --git a/subprojects/boost_core.wrap b/subprojects/boost_core.wrap index e1eac35d..21ddf5e0 100644 --- a/subprojects/boost_core.wrap +++ b/subprojects/boost_core.wrap @@ -1,5 +1,5 @@ [wrap-git] url = https://github.com/boostorg/core -revision = boost-1.87.0 +revision = boost-1.88.0 depth = 1 patch_directory = boost_core diff --git a/subprojects/boost_describe.wrap b/subprojects/boost_describe.wrap index 724dbca6..809e7d4e 100644 --- a/subprojects/boost_describe.wrap +++ b/subprojects/boost_describe.wrap @@ -1,5 +1,5 @@ [wrap-git] url = https://github.com/boostorg/describe -revision = boost-1.87.0 +revision = boost-1.88.0 depth = 1 patch_directory = boost_describe diff --git a/subprojects/boost_mp11.wrap b/subprojects/boost_mp11.wrap index c90c2fee..cb6127df 100644 --- a/subprojects/boost_mp11.wrap +++ b/subprojects/boost_mp11.wrap @@ -1,5 +1,5 @@ [wrap-git] url = https://github.com/boostorg/mp11 -revision = boost-1.87.0 +revision = boost-1.88.0 depth = 1 patch_directory = boost_mp11 diff --git a/subprojects/boost_optional.wrap b/subprojects/boost_optional.wrap index 01849c9f..ceb2882c 100644 --- a/subprojects/boost_optional.wrap +++ b/subprojects/boost_optional.wrap @@ -1,5 +1,5 @@ [wrap-git] url = https://github.com/boostorg/optional -revision = boost-1.87.0 +revision = boost-1.88.0 depth = 1 patch_directory = boost_optional diff --git a/subprojects/boost_preprocessor.wrap b/subprojects/boost_preprocessor.wrap index 244ded9c..709299b8 100644 --- a/subprojects/boost_preprocessor.wrap +++ b/subprojects/boost_preprocessor.wrap @@ -1,5 +1,5 @@ [wrap-git] url = https://github.com/boostorg/preprocessor -revision = boost-1.87.0 +revision = boost-1.88.0 depth = 1 patch_directory = boost_preprocessor diff --git a/subprojects/boost_static_assert.wrap b/subprojects/boost_static_assert.wrap index 80d18075..b98844b1 100644 --- a/subprojects/boost_static_assert.wrap +++ b/subprojects/boost_static_assert.wrap @@ -1,5 +1,5 @@ [wrap-git] url = https://github.com/boostorg/static_assert -revision = boost-1.87.0 +revision = boost-1.88.0 depth = 1 patch_directory = boost_static_assert diff --git a/subprojects/boost_throw_exception.wrap b/subprojects/boost_throw_exception.wrap index b12355b2..506129e3 100644 --- a/subprojects/boost_throw_exception.wrap +++ b/subprojects/boost_throw_exception.wrap @@ -1,5 +1,5 @@ [wrap-git] url = https://github.com/boostorg/throw_exception -revision = boost-1.87.0 +revision = boost-1.88.0 depth = 1 patch_directory = boost_throw_exception diff --git a/subprojects/boost_type_traits.wrap b/subprojects/boost_type_traits.wrap index 7fc3ea7f..a4454ac4 100644 --- a/subprojects/boost_type_traits.wrap +++ b/subprojects/boost_type_traits.wrap @@ -1,5 +1,5 @@ [wrap-git] url = https://github.com/boostorg/type_traits -revision = boost-1.87.0 +revision = boost-1.88.0 depth = 1 patch_directory = boost_type_traits diff --git a/subprojects/egl-registry.wrap b/subprojects/egl-registry.wrap index 8af23c49..1a382134 100644 --- a/subprojects/egl-registry.wrap +++ b/subprojects/egl-registry.wrap @@ -1,5 +1,5 @@ [wrap-git] url = https://github.com/KhronosGroup/EGL-Registry -revision = 29c4314e0ef04c730992d295f91b76635019fbba +revision = 3ae2b7c48690d2ce13cc6db3db02dfc0572be65e depth = 1 patch_directory = egl-registry diff --git a/subprojects/flac.wrap b/subprojects/flac.wrap index e6dd0b3b..e6e5987e 100644 --- a/subprojects/flac.wrap +++ b/subprojects/flac.wrap @@ -1,5 +1,5 @@ [wrap-git] url = https://github.com/xiph/flac -revision = 1.4.3 +revision = 1.5.0 depth = 1 diff_files = flac-buildtype.patch, flac-deps.patch, flac-emscripten-endian.patch, flac-int32.patch diff --git a/subprojects/openal-soft.wrap b/subprojects/openal-soft.wrap index 1bf650e9..e7b85657 100644 --- a/subprojects/openal-soft.wrap +++ b/subprojects/openal-soft.wrap @@ -1,5 +1,5 @@ [wrap-git] url = https://github.com/kcat/openal-soft -revision = 1.24.2 +revision = 1.24.3 depth = 1 diff_files = openal-soft-0001-no-exceptions.patch, openal-soft-android-log.patch, openal-soft-atomic.patch, openal-soft-buildtype.patch, openal-soft-c11.patch, openal-soft-constexpr.patch, openal-soft-emscripten-pthread.patch, openal-soft-emscripten-setschedparam.patch, openal-soft-emscripten-symbol-conflict.patch, openal-soft-event-thread.patch, openal-soft-filesystem.patch, openal-soft-flockfile.patch, openal-soft-int32.patch, openal-soft-mkxp-polyfill.patch, openal-soft-null.patch, openal-soft-pic.patch, openal-soft-ps3.patch diff --git a/subprojects/opengl-registry.wrap b/subprojects/opengl-registry.wrap index 6ddd9544..fdf28cd5 100644 --- a/subprojects/opengl-registry.wrap +++ b/subprojects/opengl-registry.wrap @@ -1,5 +1,5 @@ [wrap-git] url = https://github.com/KhronosGroup/OpenGL-Registry -revision = b53ca669bea4715b6d5fa53c459f47a1fecd7944 +revision = 7fc154cefa5a57702ff401ce2f9256178c7525dd depth = 1 patch_directory = opengl-registry diff --git a/subprojects/packagefiles/boost_assert-snprintf.patch b/subprojects/packagefiles/boost_assert-snprintf.patch index ab7c0beb..ce99b6a3 100644 --- a/subprojects/packagefiles/boost_assert-snprintf.patch +++ b/subprojects/packagefiles/boost_assert-snprintf.patch @@ -2,7 +2,7 @@ --- a/include/boost/assert/source_location.hpp +++ b/include/boost/assert/source_location.hpp -@@ -73,7 +73,7 @@ public: +@@ -76,7 +76,7 @@ public: # pragma warning( disable: 4996 ) #endif diff --git a/subprojects/packagefiles/flac-buildtype.patch b/subprojects/packagefiles/flac-buildtype.patch index 66d0cd8a..9e02da1a 100644 --- a/subprojects/packagefiles/flac-buildtype.patch +++ b/subprojects/packagefiles/flac-buildtype.patch @@ -2,9 +2,8 @@ --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -4,9 +4,9 @@ - # 3.9 is needed in 'doc' because of doxygen_add_docs() - cmake_minimum_required(VERSION 3.5) +@@ -1,8 +1,8 @@ + cmake_minimum_required(VERSION 3.12...3.31) -if(NOT (CMAKE_BUILD_TYPE OR CMAKE_CONFIGURATION_TYPES OR DEFINED ENV{CFLAGS} OR DEFINED ENV{CXXFLAGS})) - set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build, options are: None Debug Release RelWithDebInfo") @@ -13,5 +12,5 @@ + + - project(FLAC VERSION 1.4.3) # HOMEPAGE_URL "https://www.xiph.org/flac/") + project(FLAC VERSION 1.5.0) # HOMEPAGE_URL "https://www.xiph.org/flac/") diff --git a/subprojects/packagefiles/flac-emscripten-endian.patch b/subprojects/packagefiles/flac-emscripten-endian.patch index ff63e0d0..1ee127d9 100644 --- a/subprojects/packagefiles/flac-emscripten-endian.patch +++ b/subprojects/packagefiles/flac-emscripten-endian.patch @@ -2,7 +2,7 @@ --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -137,7 +137,10 @@ check_c_source_compiles(" +@@ -142,7 +142,10 @@ check_c_source_compiles(" }" HAVE_LANGINFO_CODESET) diff --git a/subprojects/packagefiles/flac-int32.patch b/subprojects/packagefiles/flac-int32.patch index 0a98daf2..a49b18c5 100644 --- a/subprojects/packagefiles/flac-int32.patch +++ b/subprojects/packagefiles/flac-int32.patch @@ -3,7 +3,7 @@ --- a/src/libFLAC/stream_decoder.c +++ b/src/libFLAC/stream_decoder.c -@@ -2973,7 +2973,7 @@ FLAC__bool read_residual_partitioned_rice_(FLAC__StreamDecoder *decoder, uint32_ +@@ -3323,7 +3323,7 @@ FLAC__bool read_residual_partitioned_rice_(FLAC__StreamDecoder *decoder, uint32_ if(rice_parameter < pesc) { partitioned_rice_contents->raw_bits[partition] = 0; u = (partition == 0) ? partition_samples - predictor_order : partition_samples; @@ -12,7 +12,7 @@ if(decoder->protected_->state == FLAC__STREAM_DECODER_READ_FRAME) { /* no error was set, read_callback_ didn't set it, so * invalid rice symbol was found */ -@@ -2996,7 +2996,7 @@ FLAC__bool read_residual_partitioned_rice_(FLAC__StreamDecoder *decoder, uint32_ +@@ -3346,7 +3346,7 @@ FLAC__bool read_residual_partitioned_rice_(FLAC__StreamDecoder *decoder, uint32_ } else{ for(u = (partition == 0)? predictor_order : 0; u < partition_samples; u++, sample++) { diff --git a/subprojects/packagefiles/openal-soft-0001-no-exceptions.patch b/subprojects/packagefiles/openal-soft-0001-no-exceptions.patch index 7a3fcbb1..579ba116 100644 --- a/subprojects/packagefiles/openal-soft-0001-no-exceptions.patch +++ b/subprojects/packagefiles/openal-soft-0001-no-exceptions.patch @@ -2,7 +2,7 @@ --- a/al/auxeffectslot.cpp +++ b/al/auxeffectslot.cpp -@@ -146,11 +146,11 @@ void AddActiveEffectSlots(const al::span auxslots, ALCcontext *co +@@ -145,11 +145,11 @@ void AddActiveEffectSlots(const al::span auxslots, ALCcontext *co if(auxslots.empty()) return; EffectSlotArray *curarray{context->mActiveAuxSlots.load(std::memory_order_acquire)}; if((curarray->size()>>1) > std::numeric_limits::max()-auxslots.size()) @@ -16,7 +16,7 @@ /* Insert the new effect slots into the head of the new array, followed by * the existing ones. -@@ -249,7 +249,7 @@ constexpr auto EffectSlotTypeFromEnum(ALenum type) noexcept -> EffectSlotType +@@ -248,7 +248,7 @@ constexpr auto EffectSlotTypeFromEnum(ALenum type) noexcept -> EffectSlotType [[nodiscard]] auto EnsureEffectSlots(ALCcontext *context, size_t needed) noexcept -> bool @@ -25,7 +25,7 @@ size_t count{std::accumulate(context->mEffectSlotList.cbegin(), context->mEffectSlotList.cend(), 0_uz, [](size_t cur, const EffectSlotSubList &sublist) noexcept -> size_t -@@ -268,9 +268,9 @@ try { +@@ -267,9 +267,9 @@ try { } return true; } @@ -37,7 +37,7 @@ [[nodiscard]] auto AllocEffectSlot(ALCcontext *context) -> ALeffectslot* -@@ -326,7 +326,7 @@ inline void UpdateProps(ALeffectslot *slot, ALCcontext *context) +@@ -325,7 +325,7 @@ inline void UpdateProps(ALeffectslot *slot, ALCcontext *context) AL_API DECL_FUNC2(void, alGenAuxiliaryEffectSlots, ALsizei,n, ALuint*,effectslots) FORCE_ALIGN void AL_APIENTRY alGenAuxiliaryEffectSlotsDirect(ALCcontext *context, ALsizei n, ALuint *effectslots) noexcept @@ -46,7 +46,7 @@ if(n < 0) context->throw_error(AL_INVALID_VALUE, "Generating {} effect slots", n); if(n <= 0) UNLIKELY return; -@@ -345,7 +345,7 @@ try { +@@ -344,7 +344,7 @@ try { (n==1) ? "" : "s"); std::vector slots; @@ -55,7 +55,7 @@ if(eids.size() == 1) { /* Special handling for the easy and normal case. */ -@@ -361,25 +361,25 @@ try { +@@ -360,25 +360,25 @@ try { [](ALeffectslot *slot) -> ALuint { return slot->id; }); } } @@ -90,7 +90,7 @@ if(n < 0) UNLIKELY context->throw_error(AL_INVALID_VALUE, "Deleting {} effect slots", n); if(n <= 0) UNLIKELY return; -@@ -425,11 +425,11 @@ try { +@@ -424,11 +424,11 @@ try { std::for_each(eids.begin(), eids.end(), delete_effectslot); } } @@ -106,7 +106,7 @@ AL_API DECL_FUNC1(ALboolean, alIsAuxiliaryEffectSlot, ALuint,effectslot) FORCE_ALIGN ALboolean AL_APIENTRY alIsAuxiliaryEffectSlotDirect(ALCcontext *context, -@@ -474,7 +474,7 @@ AL_API void AL_APIENTRY alAuxiliaryEffectSlotStopvSOFT(ALsizei, const ALuint*) n +@@ -473,7 +473,7 @@ AL_API void AL_APIENTRY alAuxiliaryEffectSlotStopvSOFT(ALsizei, const ALuint*) n AL_API DECL_FUNC3(void, alAuxiliaryEffectSloti, ALuint,effectslot, ALenum,param, ALint,value) FORCE_ALIGN void AL_APIENTRY alAuxiliaryEffectSlotiDirect(ALCcontext *context, ALuint effectslot, ALenum param, ALint value) noexcept @@ -115,7 +115,7 @@ std::lock_guard proplock{context->mPropLock}; std::lock_guard slotlock{context->mEffectSlotLock}; -@@ -644,16 +644,16 @@ try { +@@ -643,16 +643,16 @@ try { context->throw_error(AL_INVALID_ENUM, "Invalid effect slot integer property {:#04x}", as_unsigned(param)); } @@ -137,7 +137,7 @@ switch(param) { case AL_EFFECTSLOT_EFFECT: -@@ -673,16 +673,16 @@ try { +@@ -672,16 +672,16 @@ try { context->throw_error(AL_INVALID_ENUM, "Invalid effect slot integer-vector property {:#04x}", as_unsigned(param)); } @@ -159,7 +159,7 @@ std::lock_guard proplock{context->mPropLock}; std::lock_guard slotlock{context->mEffectSlotLock}; -@@ -706,16 +706,16 @@ try { +@@ -705,16 +705,16 @@ try { context->throw_error(AL_INVALID_ENUM, "Invalid effect slot float property {:#04x}", as_unsigned(param)); } @@ -181,7 +181,7 @@ switch(param) { case AL_EFFECTSLOT_GAIN: -@@ -731,17 +731,17 @@ try { +@@ -730,17 +730,17 @@ try { context->throw_error(AL_INVALID_ENUM, "Invalid effect slot float-vector property {:#04x}", as_unsigned(param)); } @@ -204,7 +204,7 @@ std::lock_guard slotlock{context->mEffectSlotLock}; ALeffectslot *slot{LookupEffectSlot(context, effectslot)}; if(!slot) -@@ -779,16 +779,16 @@ try { +@@ -778,16 +778,16 @@ try { context->throw_error(AL_INVALID_ENUM, "Invalid effect slot integer property {:#04x}", as_unsigned(param)); } @@ -226,7 +226,7 @@ switch(param) { case AL_EFFECTSLOT_EFFECT: -@@ -808,16 +808,16 @@ try { +@@ -807,16 +807,16 @@ try { context->throw_error(AL_INVALID_ENUM, "Invalid effect slot integer-vector property {:#04x}", as_unsigned(param)); } @@ -248,7 +248,7 @@ std::lock_guard slotlock{context->mEffectSlotLock}; ALeffectslot *slot{LookupEffectSlot(context, effectslot)}; if(!slot) -@@ -831,16 +831,16 @@ try { +@@ -830,16 +830,16 @@ try { context->throw_error(AL_INVALID_ENUM, "Invalid effect slot float property {:#04x}", as_unsigned(param)); } @@ -270,7 +270,7 @@ switch(param) { case AL_EFFECTSLOT_GAIN: -@@ -856,17 +856,17 @@ try { +@@ -855,17 +855,17 @@ try { context->throw_error(AL_INVALID_ENUM, "Invalid effect slot float-vector property {:#04x}", as_unsigned(param)); } @@ -1211,24 +1211,24 @@ } --- a/al/eax/utils.h +++ b/al/eax/utils.h -@@ -8,7 +8,7 @@ - #include +@@ -5,7 +5,7 @@ + #include "fmt/core.h" #include "opthelpers.h" - +#include "../../src/mkxp-polyfill.h" - using EaxDirtyFlags = unsigned int; struct EaxAlLowPassParam { -@@ -32,7 +32,7 @@ void eax_validate_range(std::string_view value_name, const TValue& value, const - std::to_string(min_value) + "; max: " + - std::to_string(max_value) + ")."; + float gain; +@@ -23,7 +23,7 @@ void eax_validate_range(std::string_view value_name, const TValue& value, const + const auto message = fmt::format("{} out of range (value: {}; min: {}; max: {}).", value_name, + value, min_value, max_value); - throw TException{message.c_str()}; + MKXPZ_THROW(TException{message.c_str()}); } - namespace detail { + #endif // !EAX_UTILS_INCLUDED --- a/al/effect.cpp +++ b/al/effect.cpp @@ -141,7 +141,7 @@ void InitEffectParams(ALeffect *effect, ALenum type) noexcept @@ -1491,7 +1491,7 @@ bool EaxAutowahCommitter::commit(const EAXAUTOWAHPROPERTIES &props) --- a/al/effects/chorus.cpp +++ b/al/effects/chorus.cpp -@@ -43,8 +43,8 @@ constexpr ALenum EnumFromWaveform(ChorusWaveform type) +@@ -44,8 +44,8 @@ constexpr ALenum EnumFromWaveform(ChorusWaveform type) case ChorusWaveform::Sinusoid: return AL_CHORUS_WAVEFORM_SINUSOID; case ChorusWaveform::Triangle: return AL_CHORUS_WAVEFORM_TRIANGLE; } @@ -1502,7 +1502,7 @@ } constexpr EffectProps genDefaultChorusProps() noexcept -@@ -584,7 +584,7 @@ struct ChorusCommitter::Exception : public EaxException +@@ -596,7 +596,7 @@ struct ChorusCommitter::Exception : public EaxException template<> [[noreturn]] void ChorusCommitter::fail(const char *message) { @@ -1511,7 +1511,7 @@ } bool EaxChorusCommitter::commit(const EAXCHORUSPROPERTIES &props) -@@ -621,7 +621,7 @@ struct FlangerCommitter::Exception : public EaxException +@@ -633,7 +633,7 @@ struct FlangerCommitter::Exception : public EaxException template<> [[noreturn]] void FlangerCommitter::fail(const char *message) { @@ -1630,7 +1630,7 @@ bool EaxPitchShifterCommitter::commit(const EAXPITCHSHIFTERPROPERTIES &props) --- a/al/effects/reverb.cpp +++ b/al/effects/reverb.cpp -@@ -972,7 +972,7 @@ struct EaxReverbCommitter::Exception : public EaxReverbEffectException +@@ -976,7 +976,7 @@ struct EaxReverbCommitter::Exception : public EaxReverbEffectException [[noreturn]] void EaxReverbCommitter::fail(const char* message) { @@ -2273,7 +2273,7 @@ +}} --- a/al/source.cpp +++ b/al/source.cpp -@@ -733,7 +733,7 @@ bool EnsureSources(ALCcontext *context, size_t needed) +@@ -722,7 +722,7 @@ bool EnsureSources(ALCcontext *context, size_t needed) [](size_t cur, const SourceSubList &sublist) noexcept -> size_t { return cur + static_cast(al::popcount(sublist.FreeMask)); })}; @@ -2282,7 +2282,7 @@ while(needed > count) { if(context->mSourceList.size() >= 1<<25) UNLIKELY -@@ -746,7 +746,7 @@ bool EnsureSources(ALCcontext *context, size_t needed) +@@ -735,7 +735,7 @@ bool EnsureSources(ALCcontext *context, size_t needed) count += std::tuple_size_v; } } @@ -2291,7 +2291,7 @@ return false; } return true; -@@ -871,7 +871,7 @@ ALenum EnumFromStereoMode(SourceStereo mode) +@@ -860,7 +860,7 @@ ALenum EnumFromStereoMode(SourceStereo mode) case SourceStereo::Normal: return AL_NORMAL_SOFT; case SourceStereo::Enhanced: return AL_SUPER_STEREO_SOFT; } @@ -2300,7 +2300,7 @@ } auto SpatializeModeFromEnum = [](auto mode) noexcept -> std::optional -@@ -892,8 +892,8 @@ ALenum EnumFromSpatializeMode(SpatializeMode mode) +@@ -881,8 +881,8 @@ ALenum EnumFromSpatializeMode(SpatializeMode mode) case SpatializeMode::On: return AL_TRUE; case SpatializeMode::Auto: return AL_AUTO_SOFT; } @@ -2311,7 +2311,7 @@ } auto DirectModeFromEnum = [](auto mode) noexcept -> std::optional -@@ -914,7 +914,7 @@ ALenum EnumFromDirectMode(DirectMode mode) +@@ -903,7 +903,7 @@ ALenum EnumFromDirectMode(DirectMode mode) case DirectMode::DropMismatch: return AL_DROP_UNMATCHED_SOFT; case DirectMode::RemixMismatch: return AL_REMIX_UNMATCHED_SOFT; } @@ -2320,7 +2320,7 @@ } auto DistanceModelFromALenum = [](auto model) noexcept -> std::optional -@@ -943,8 +943,8 @@ ALenum ALenumFromDistanceModel(DistanceModel model) +@@ -932,8 +932,8 @@ ALenum ALenumFromDistanceModel(DistanceModel model) case DistanceModel::Exponent: return AL_EXPONENT_DISTANCE; case DistanceModel::ExponentClamped: return AL_EXPONENT_DISTANCE_CLAMPED; } @@ -2331,7 +2331,7 @@ } enum SourceProp : ALenum { -@@ -2673,7 +2673,7 @@ void StartSources(ALCcontext *const context, const al::span srchandle +@@ -2662,7 +2662,7 @@ void StartSources(ALCcontext *const context, const al::span srchandle AL_API DECL_FUNC2(void, alGenSources, ALsizei,n, ALuint*,sources) FORCE_ALIGN void AL_APIENTRY alGenSourcesDirect(ALCcontext *context, ALsizei n, ALuint *sources) noexcept @@ -2340,7 +2340,7 @@ if(n < 0) context->throw_error(AL_INVALID_VALUE, "Generating {} sources", n); if(n <= 0) UNLIKELY return; -@@ -2692,16 +2692,16 @@ try { +@@ -2681,16 +2681,16 @@ try { std::generate(sids.begin(), sids.end(), [context]{ return AllocSource(context)->id; }); } @@ -2362,7 +2362,7 @@ if(n < 0) context->throw_error(AL_INVALID_VALUE, "Deleting {} sources", n); if(n <= 0) UNLIKELY return; -@@ -2725,11 +2725,11 @@ try { +@@ -2714,11 +2714,11 @@ try { }; std::for_each(sids.begin(), sids.end(), delete_source); } @@ -2378,7 +2378,7 @@ AL_API DECL_FUNC1(ALboolean, alIsSource, ALuint,source) FORCE_ALIGN ALboolean AL_APIENTRY alIsSourceDirect(ALCcontext *context, ALuint source) noexcept -@@ -2744,7 +2744,7 @@ FORCE_ALIGN ALboolean AL_APIENTRY alIsSourceDirect(ALCcontext *context, ALuint s +@@ -2733,7 +2733,7 @@ FORCE_ALIGN ALboolean AL_APIENTRY alIsSourceDirect(ALCcontext *context, ALuint s AL_API DECL_FUNC3(void, alSourcef, ALuint,source, ALenum,param, ALfloat,value) FORCE_ALIGN void AL_APIENTRY alSourcefDirect(ALCcontext *context, ALuint source, ALenum param, ALfloat value) noexcept @@ -2387,7 +2387,7 @@ std::lock_guard proplock{context->mPropLock}; std::lock_guard sourcelock{context->mSourceLock}; ALsource *Source{LookupSource(context, source)}; -@@ -2753,16 +2753,16 @@ try { +@@ -2742,16 +2742,16 @@ try { SetProperty(Source, context, static_cast(param), {&value, 1u}); } @@ -2409,7 +2409,7 @@ std::lock_guard proplock{context->mPropLock}; std::lock_guard sourcelock{context->mSourceLock}; ALsource *Source{LookupSource(context, source)}; -@@ -2772,16 +2772,16 @@ try { +@@ -2761,16 +2761,16 @@ try { const std::array fvals{value1, value2, value3}; SetProperty(Source, context, static_cast(param), fvals); } @@ -2431,7 +2431,7 @@ std::lock_guard proplock{context->mPropLock}; std::lock_guard sourcelock{context->mSourceLock}; ALsource *Source{LookupSource(context, source)}; -@@ -2793,17 +2793,17 @@ try { +@@ -2782,17 +2782,17 @@ try { const ALuint count{FloatValsByProp(param)}; SetProperty(Source, context, static_cast(param), al::span{values, count}); } @@ -2454,7 +2454,7 @@ std::lock_guard proplock{context->mPropLock}; std::lock_guard sourcelock{context->mSourceLock}; ALsource *Source{LookupSource(context, source)}; -@@ -2812,16 +2812,16 @@ try { +@@ -2801,16 +2801,16 @@ try { SetProperty(Source, context, static_cast(param), {&value, 1}); } @@ -2476,7 +2476,7 @@ std::lock_guard proplock{context->mPropLock}; std::lock_guard sourcelock{context->mSourceLock}; ALsource *Source{LookupSource(context, source)}; -@@ -2831,16 +2831,16 @@ try { +@@ -2820,16 +2820,16 @@ try { const std::array dvals{value1, value2, value3}; SetProperty(Source, context, static_cast(param), dvals); } @@ -2498,7 +2498,7 @@ std::lock_guard proplock{context->mPropLock}; std::lock_guard sourcelock{context->mSourceLock}; ALsource *Source{LookupSource(context, source)}; -@@ -2852,17 +2852,17 @@ try { +@@ -2841,17 +2841,17 @@ try { const ALuint count{DoubleValsByProp(param)}; SetProperty(Source, context, static_cast(param), al::span{values, count}); } @@ -2521,7 +2521,7 @@ std::lock_guard proplock{context->mPropLock}; std::lock_guard sourcelock{context->mSourceLock}; ALsource *Source{LookupSource(context, source)}; -@@ -2871,16 +2871,16 @@ try { +@@ -2860,16 +2860,16 @@ try { SetProperty(Source, context, static_cast(param), {&value, 1u}); } @@ -2543,7 +2543,7 @@ std::lock_guard proplock{context->mPropLock}; std::lock_guard sourcelock{context->mSourceLock}; ALsource *Source{LookupSource(context, source)}; -@@ -2890,16 +2890,16 @@ try { +@@ -2879,16 +2879,16 @@ try { const std::array ivals{value1, value2, value3}; SetProperty(Source, context, static_cast(param), ivals); } @@ -2565,7 +2565,7 @@ std::lock_guard proplock{context->mPropLock}; std::lock_guard sourcelock{context->mSourceLock}; ALsource *Source{LookupSource(context, source)}; -@@ -2911,17 +2911,17 @@ try { +@@ -2900,17 +2900,17 @@ try { const ALuint count{IntValsByProp(param)}; SetProperty(Source, context, static_cast(param), al::span{values, count}); } @@ -2588,7 +2588,7 @@ std::lock_guard proplock{context->mPropLock}; std::lock_guard sourcelock{context->mSourceLock}; ALsource *Source{LookupSource(context, source)}; -@@ -2930,16 +2930,16 @@ try { +@@ -2919,16 +2919,16 @@ try { SetProperty(Source, context, static_cast(param), {&value, 1u}); } @@ -2610,7 +2610,7 @@ std::lock_guard proplock{context->mPropLock}; std::lock_guard sourcelock{context->mSourceLock}; ALsource *Source{LookupSource(context, source)}; -@@ -2949,16 +2949,16 @@ try { +@@ -2938,16 +2938,16 @@ try { const std::array i64vals{value1, value2, value3}; SetProperty(Source, context, static_cast(param), i64vals); } @@ -2632,7 +2632,7 @@ std::lock_guard proplock{context->mPropLock}; std::lock_guard sourcelock{context->mSourceLock}; ALsource *Source{LookupSource(context, source)}; -@@ -2970,17 +2970,17 @@ try { +@@ -2959,17 +2959,17 @@ try { const ALuint count{Int64ValsByProp(param)}; SetProperty(Source, context, static_cast(param), al::span{values, count}); } @@ -2655,7 +2655,7 @@ std::lock_guard sourcelock{context->mSourceLock}; ALsource *Source{LookupSource(context, source)}; if(!Source) -@@ -2990,16 +2990,16 @@ try { +@@ -2979,16 +2979,16 @@ try { GetProperty(Source, context, static_cast(param), al::span{value, 1u}); } @@ -2677,7 +2677,7 @@ std::lock_guard sourcelock{context->mSourceLock}; ALsource *Source{LookupSource(context, source)}; if(!Source) -@@ -3013,16 +3013,16 @@ try { +@@ -3002,16 +3002,16 @@ try { *value2 = fvals[1]; *value3 = fvals[2]; } @@ -2699,7 +2699,7 @@ std::lock_guard sourcelock{context->mSourceLock}; ALsource *Source{LookupSource(context, source)}; if(!Source) -@@ -3033,17 +3033,17 @@ try { +@@ -3022,17 +3022,17 @@ try { const ALuint count{FloatValsByProp(param)}; GetProperty(Source, context, static_cast(param), al::span{values, count}); } @@ -2722,7 +2722,7 @@ std::lock_guard sourcelock{context->mSourceLock}; ALsource *Source{LookupSource(context, source)}; if(!Source) -@@ -3053,16 +3053,16 @@ try { +@@ -3042,16 +3042,16 @@ try { GetProperty(Source, context, static_cast(param), al::span{value, 1u}); } @@ -2744,7 +2744,7 @@ std::lock_guard sourcelock{context->mSourceLock}; ALsource *Source{LookupSource(context, source)}; if(!Source) -@@ -3076,16 +3076,16 @@ try { +@@ -3065,16 +3065,16 @@ try { *value2 = dvals[1]; *value3 = dvals[2]; } @@ -2766,7 +2766,7 @@ std::lock_guard sourcelock{context->mSourceLock}; ALsource *Source{LookupSource(context, source)}; if(!Source) -@@ -3096,17 +3096,17 @@ try { +@@ -3085,17 +3085,17 @@ try { const ALuint count{DoubleValsByProp(param)}; GetProperty(Source, context, static_cast(param), al::span{values, count}); } @@ -2789,7 +2789,7 @@ std::lock_guard sourcelock{context->mSourceLock}; ALsource *Source{LookupSource(context, source)}; if(!Source) -@@ -3116,16 +3116,16 @@ try { +@@ -3105,16 +3105,16 @@ try { GetProperty(Source, context, static_cast(param), al::span{value, 1u}); } @@ -2811,7 +2811,7 @@ std::lock_guard sourcelock{context->mSourceLock}; ALsource *Source{LookupSource(context, source)}; if(!Source) -@@ -3139,16 +3139,16 @@ try { +@@ -3128,16 +3128,16 @@ try { *value2 = ivals[1]; *value3 = ivals[2]; } @@ -2833,7 +2833,7 @@ std::lock_guard sourcelock{context->mSourceLock}; ALsource *Source{LookupSource(context, source)}; if(!Source) -@@ -3159,16 +3159,16 @@ try { +@@ -3148,16 +3148,16 @@ try { const ALuint count{IntValsByProp(param)}; GetProperty(Source, context, static_cast(param), al::span{values, count}); } @@ -2855,7 +2855,7 @@ std::lock_guard sourcelock{context->mSourceLock}; ALsource *Source{LookupSource(context, source)}; if(!Source) -@@ -3178,16 +3178,16 @@ try { +@@ -3167,16 +3167,16 @@ try { GetProperty(Source, context, static_cast(param), al::span{value, 1u}); } @@ -2877,7 +2877,7 @@ std::lock_guard sourcelock{context->mSourceLock}; ALsource *Source{LookupSource(context, source)}; if(!Source) -@@ -3201,16 +3201,16 @@ try { +@@ -3190,16 +3190,16 @@ try { *value2 = i64vals[1]; *value3 = i64vals[2]; } @@ -2899,7 +2899,7 @@ std::lock_guard sourcelock{context->mSourceLock}; ALsource *Source{LookupSource(context, source)}; if(!Source) -@@ -3221,16 +3221,16 @@ try { +@@ -3210,16 +3210,16 @@ try { const ALuint count{Int64ValsByProp(param)}; GetProperty(Source, context, static_cast(param), al::span{values, count}); } @@ -2921,7 +2921,7 @@ std::lock_guard sourcelock{context->mSourceLock}; ALsource *Source{LookupSource(context, source)}; if(!Source) -@@ -3238,16 +3238,16 @@ try { +@@ -3227,16 +3227,16 @@ try { StartSources(context, {&Source, 1}); } @@ -2943,7 +2943,7 @@ if(start_time < 0) context->throw_error(AL_INVALID_VALUE, "Invalid time point {}", start_time); -@@ -3258,16 +3258,16 @@ try { +@@ -3247,16 +3247,16 @@ try { StartSources(context, {&Source, 1}, nanoseconds{start_time}); } @@ -2965,7 +2965,7 @@ if(n < 0) context->throw_error(AL_INVALID_VALUE, "Playing {} sources", n); if(n <= 0) UNLIKELY return; -@@ -3292,16 +3292,16 @@ try { +@@ -3281,16 +3281,16 @@ try { StartSources(context, srchandles); } @@ -2987,7 +2987,7 @@ if(n < 0) context->throw_error(AL_INVALID_VALUE, "Playing {} sources", n); if(n <= 0) UNLIKELY return; -@@ -3329,11 +3329,11 @@ try { +@@ -3318,11 +3318,11 @@ try { StartSources(context, srchandles, nanoseconds{start_time}); } @@ -3003,7 +3003,7 @@ AL_API DECL_FUNC1(void, alSourcePause, ALuint,source) -@@ -3343,7 +3343,7 @@ FORCE_ALIGN void AL_APIENTRY alSourcePauseDirect(ALCcontext *context, ALuint sou +@@ -3332,7 +3332,7 @@ FORCE_ALIGN void AL_APIENTRY alSourcePauseDirect(ALCcontext *context, ALuint sou AL_API DECL_FUNC2(void, alSourcePausev, ALsizei,n, const ALuint*,sources) FORCE_ALIGN void AL_APIENTRY alSourcePausevDirect(ALCcontext *context, ALsizei n, const ALuint *sources) noexcept @@ -3012,7 +3012,7 @@ if(n < 0) context->throw_error(AL_INVALID_VALUE, "Pausing {} sources", n); if(n <= 0) UNLIKELY return; -@@ -3404,11 +3404,11 @@ try { +@@ -3393,11 +3393,11 @@ try { } } } @@ -3028,7 +3028,7 @@ AL_API DECL_FUNC1(void, alSourceStop, ALuint,source) -@@ -3418,7 +3418,7 @@ FORCE_ALIGN void AL_APIENTRY alSourceStopDirect(ALCcontext *context, ALuint sour +@@ -3407,7 +3407,7 @@ FORCE_ALIGN void AL_APIENTRY alSourceStopDirect(ALCcontext *context, ALuint sour AL_API DECL_FUNC2(void, alSourceStopv, ALsizei,n, const ALuint*,sources) FORCE_ALIGN void AL_APIENTRY alSourceStopvDirect(ALCcontext *context, ALsizei n, const ALuint *sources) noexcept @@ -3037,7 +3037,7 @@ if(n < 0) context->throw_error(AL_INVALID_VALUE, "Stopping {} sources", n); if(n <= 0) UNLIKELY return; -@@ -3466,11 +3466,11 @@ try { +@@ -3455,11 +3455,11 @@ try { if(tail) LIKELY SendVoiceChanges(context, tail); } @@ -3053,7 +3053,7 @@ AL_API DECL_FUNC1(void, alSourceRewind, ALuint,source) -@@ -3480,7 +3480,7 @@ FORCE_ALIGN void AL_APIENTRY alSourceRewindDirect(ALCcontext *context, ALuint so +@@ -3469,7 +3469,7 @@ FORCE_ALIGN void AL_APIENTRY alSourceRewindDirect(ALCcontext *context, ALuint so AL_API DECL_FUNC2(void, alSourceRewindv, ALsizei,n, const ALuint*,sources) FORCE_ALIGN void AL_APIENTRY alSourceRewindvDirect(ALCcontext *context, ALsizei n, const ALuint *sources) noexcept @@ -3062,7 +3062,7 @@ if(n < 0) context->throw_error(AL_INVALID_VALUE, "Rewinding {} sources", n); if(n <= 0) UNLIKELY return; -@@ -3530,17 +3530,17 @@ try { +@@ -3519,17 +3519,17 @@ try { if(tail) LIKELY SendVoiceChanges(context, tail); } @@ -3085,25 +3085,25 @@ if(nb < 0) context->throw_error(AL_INVALID_VALUE, "Queueing {} buffers", nb); if(nb <= 0) UNLIKELY return; -@@ -3566,7 +3566,7 @@ try { +@@ -3555,7 +3555,7 @@ try { std::unique_lock buflock{device->BufferLock}; const auto bids = al::span{buffers, static_cast(nb)}; const size_t NewListStart{source->mQueue.size()}; - try { + MKXPZ_TRY { ALbufferQueueItem *BufferList{nullptr}; - std::for_each(bids.cbegin(), bids.cend(), - [context,source,device,&BufferFmt,&BufferList](const ALuint bid) -@@ -3631,7 +3631,7 @@ try { - NameFromFormat(buffer->mChannels)); - }); + auto append_buffer = [context,source,device,&BufferFmt,&BufferList](const ALuint bid) + { +@@ -3620,7 +3620,7 @@ try { + }; + std::for_each(bids.cbegin(), bids.cend(), append_buffer); } - catch(...) { + MKXPZ_CATCH(...) { /* A buffer failed (invalid ID or format), or there was some other * unexpected error, so unlock and release each buffer we had. */ -@@ -3642,7 +3642,7 @@ try { +@@ -3631,7 +3631,7 @@ try { DecrementRef(buf->ref); } source->mQueue.resize(NewListStart); @@ -3112,7 +3112,7 @@ } /* All buffers good. */ buflock.unlock(); -@@ -3656,16 +3656,16 @@ try { +@@ -3645,16 +3645,16 @@ try { (iter-1)->mNext.store(al::to_address(iter), std::memory_order_release); } } @@ -3134,7 +3134,7 @@ if(nb < 0) context->throw_error(AL_INVALID_VALUE, "Unqueueing {} buffers", nb); if(nb <= 0) UNLIKELY return; -@@ -3712,11 +3712,11 @@ try { +@@ -3701,11 +3701,11 @@ try { return bid; }); } @@ -3152,7 +3152,7 @@ AL_API void AL_APIENTRY alSourceQueueBufferLayersSOFT(ALuint, ALsizei, const ALuint*) noexcept --- a/al/state.cpp +++ b/al/state.cpp -@@ -112,7 +112,7 @@ const ALchar *GetResamplerName(const Resampler rtype) +@@ -118,7 +118,7 @@ const ALchar *GetResamplerName(const Resampler rtype) } #undef HANDLE_RESAMPLER /* Should never get here. */ @@ -3161,7 +3161,7 @@ } constexpr auto DistanceModelFromALenum(ALenum model) noexcept -> std::optional -@@ -141,7 +141,7 @@ constexpr auto ALenumFromDistanceModel(DistanceModel model) -> ALenum +@@ -147,7 +147,7 @@ constexpr auto ALenumFromDistanceModel(DistanceModel model) -> ALenum case DistanceModel::Exponent: return AL_EXPONENT_DISTANCE; case DistanceModel::ExponentClamped: return AL_EXPONENT_DISTANCE_CLAMPED; } @@ -3172,7 +3172,7 @@ enum PropertyValue : ALenum { --- a/alc/alc.cpp +++ b/alc/alc.cpp -@@ -892,7 +892,7 @@ ALCenum EnumFromDevFmt(DevFmtType type) +@@ -901,7 +901,7 @@ ALCenum EnumFromDevFmt(DevFmtType type) case DevFmtUInt: return ALC_UNSIGNED_INT_SOFT; case DevFmtFloat: return ALC_FLOAT_SOFT; } @@ -3181,7 +3181,7 @@ } std::optional DevFmtChannelsFromEnum(ALCenum channels) -@@ -926,8 +926,8 @@ ALCenum EnumFromDevFmt(DevFmtChannels channels) +@@ -935,8 +935,8 @@ ALCenum EnumFromDevFmt(DevFmtChannels channels) case DevFmtX7144: case DevFmtX3D71: break; } @@ -3192,7 +3192,7 @@ } std::optional DevAmbiLayoutFromEnum(ALCenum layout) -@@ -947,8 +947,8 @@ ALCenum EnumFromDevAmbi(DevAmbiLayout layout) +@@ -956,8 +956,8 @@ ALCenum EnumFromDevAmbi(DevAmbiLayout layout) case DevAmbiLayout::FuMa: return ALC_FUMA_SOFT; case DevAmbiLayout::ACN: return ALC_ACN_SOFT; } @@ -3203,7 +3203,7 @@ } std::optional DevAmbiScalingFromEnum(ALCenum scaling) -@@ -970,8 +970,8 @@ ALCenum EnumFromDevAmbi(DevAmbiScaling scaling) +@@ -979,8 +979,8 @@ ALCenum EnumFromDevAmbi(DevAmbiScaling scaling) case DevAmbiScaling::SN3D: return ALC_SN3D_SOFT; case DevAmbiScaling::N3D: return ALC_N3D_SOFT; } @@ -3214,7 +3214,7 @@ } -@@ -1527,14 +1527,14 @@ auto UpdateDeviceParams(al::Device *device, const al::span attrList) +@@ -1536,14 +1536,14 @@ auto UpdateDeviceParams(al::Device *device, const al::span attrList) const uint oldFreq{device->mSampleRate}; const DevFmtChannels oldChans{device->FmtChans}; const DevFmtType oldType{device->FmtType}; @@ -3234,7 +3234,7 @@ return ALC_INVALID_DEVICE; } -@@ -1719,7 +1719,7 @@ auto UpdateDeviceParams(al::Device *device, const al::span attrList) +@@ -1728,7 +1728,7 @@ auto UpdateDeviceParams(al::Device *device, const al::span attrList) FPUCtl mixer_mode{}; auto reset_context = [device](ContextBase *ctxbase) { @@ -3243,7 +3243,7 @@ assert(context != nullptr); if(!context) return; -@@ -1873,14 +1873,14 @@ auto UpdateDeviceParams(al::Device *device, const al::span attrList) +@@ -1882,14 +1882,14 @@ auto UpdateDeviceParams(al::Device *device, const al::span attrList) device->mDeviceState = DeviceState::Configured; if(!device->Flags.test(DevicePaused)) { @@ -3262,7 +3262,7 @@ return ALC_INVALID_DEVICE; } TRACE("Post-start: {}, {}, {}hz, {} / {} buffer", -@@ -1905,7 +1905,7 @@ auto ResetDeviceParams(al::Device *device, const al::span attrList) - +@@ -1914,7 +1914,7 @@ auto ResetDeviceParams(al::Device *device, const al::span attrList) - for(ContextBase *ctxbase : *device->mContexts.load(std::memory_order_acquire)) { @@ -3271,7 +3271,7 @@ assert(ctx != nullptr); if(!ctx || !ctx->mStopVoicesOnDisconnect.load(std::memory_order_acquire)) continue; -@@ -3007,16 +3007,16 @@ ALC_API ALCdevice* ALC_APIENTRY alcOpenDevice(const ALCchar *deviceName) noexcep +@@ -3016,16 +3016,16 @@ ALC_API ALCdevice* ALC_APIENTRY alcOpenDevice(const ALCchar *deviceName) noexcep device->AuxiliaryEffectSlotMax = 64; device->NumAuxSends = DefaultSends; @@ -3292,7 +3292,7 @@ ? ALC_OUT_OF_MEMORY : ALC_INVALID_VALUE); return nullptr; } -@@ -3172,16 +3172,16 @@ ALC_API ALCdevice* ALC_APIENTRY alcCaptureOpenDevice(const ALCchar *deviceName, +@@ -3181,16 +3181,16 @@ ALC_API ALCdevice* ALC_APIENTRY alcCaptureOpenDevice(const ALCchar *deviceName, DevFmtChannelsString(device->FmtChans), DevFmtTypeString(device->FmtType), device->mSampleRate, device->mUpdateSize, device->mBufferSize); @@ -3313,7 +3313,7 @@ ? ALC_OUT_OF_MEMORY : ALC_INVALID_VALUE); return nullptr; } -@@ -3244,14 +3244,14 @@ ALC_API void ALC_APIENTRY alcCaptureStart(ALCdevice *device) noexcept +@@ -3253,14 +3253,14 @@ ALC_API void ALC_APIENTRY alcCaptureStart(ALCdevice *device) noexcept alcSetError(dev.get(), ALC_INVALID_DEVICE); else if(dev->mDeviceState != DeviceState::Playing) { @@ -3332,7 +3332,7 @@ alcSetError(dev.get(), ALC_INVALID_DEVICE); } } -@@ -3350,16 +3350,16 @@ ALC_API ALCdevice* ALC_APIENTRY alcLoopbackOpenDeviceSOFT(const ALCchar *deviceN +@@ -3359,16 +3359,16 @@ ALC_API ALCdevice* ALC_APIENTRY alcLoopbackOpenDeviceSOFT(const ALCchar *deviceN device->NumStereoSources = 1; device->NumMonoSources = device->SourcesMax - device->NumStereoSources; @@ -3353,7 +3353,7 @@ ? ALC_OUT_OF_MEMORY : ALC_INVALID_VALUE); return nullptr; } -@@ -3406,7 +3406,7 @@ ALC_API ALCboolean ALC_APIENTRY alcIsRenderFormatSupportedSOFT(ALCdevice *device +@@ -3415,7 +3415,7 @@ ALC_API ALCboolean ALC_APIENTRY alcIsRenderFormatSupportedSOFT(ALCdevice *device #endif ALC_API void ALC_APIENTRY alcRenderSamplesSOFT(ALCdevice *device, ALCvoid *buffer, ALCsizei samples) noexcept { @@ -3362,7 +3362,7 @@ if(!aldev || aldev->Type != DeviceType::Loopback) UNLIKELY alcSetError(aldev, ALC_INVALID_DEVICE); else if(samples < 0 || (samples > 0 && buffer == nullptr)) UNLIKELY -@@ -3467,14 +3467,14 @@ ALC_API void ALC_APIENTRY alcDeviceResumeSOFT(ALCdevice *device) noexcept +@@ -3476,14 +3476,14 @@ ALC_API void ALC_APIENTRY alcDeviceResumeSOFT(ALCdevice *device) noexcept if(dev->mContexts.load()->empty()) return; @@ -3381,7 +3381,7 @@ alcSetError(dev.get(), ALC_INVALID_DEVICE); return; } -@@ -3585,28 +3585,28 @@ FORCE_ALIGN ALCboolean ALC_APIENTRY alcReopenDeviceSOFT(ALCdevice *device, +@@ -3594,28 +3594,28 @@ FORCE_ALIGN ALCboolean ALC_APIENTRY alcReopenDeviceSOFT(ALCdevice *device, } BackendPtr newbackend; @@ -3548,7 +3548,7 @@ --- a/alc/context.cpp +++ b/alc/context.cpp -@@ -456,7 +456,7 @@ void ALCcontext::eaxSetLastError() noexcept +@@ -458,7 +458,7 @@ void ALCcontext::eaxSetLastError() noexcept [[noreturn]] void ALCcontext::eax_fail(const char* message) { @@ -3834,7 +3834,7 @@ } const auto newlist = al::span{*results}.subspan(base); -@@ -272,7 +272,7 @@ const PathNamePair &GetProcBinary() +@@ -278,7 +278,7 @@ const PathNamePair &GetProcBinary() for(const std::string_view name : SelfLinkNames) { @@ -3843,7 +3843,7 @@ if(!fs::exists(name)) continue; if(auto path = fs::read_symlink(name); !path.empty()) -@@ -281,8 +281,8 @@ const PathNamePair &GetProcBinary() +@@ -287,8 +287,8 @@ const PathNamePair &GetProcBinary() break; } } diff --git a/subprojects/packagefiles/openal-soft-constexpr.patch b/subprojects/packagefiles/openal-soft-constexpr.patch index 941cfa21..e9e1e4c4 100644 --- a/subprojects/packagefiles/openal-soft-constexpr.patch +++ b/subprojects/packagefiles/openal-soft-constexpr.patch @@ -3,7 +3,7 @@ --- a/al/auxeffectslot.cpp +++ b/al/auxeffectslot.cpp -@@ -221,7 +221,7 @@ void RemoveActiveEffectSlots(const al::span auxslots, ALCcontext +@@ -220,7 +220,7 @@ void RemoveActiveEffectSlots(const al::span auxslots, ALCcontext [[nodiscard]] @@ -63,7 +63,7 @@ { --- a/al/effects/chorus.cpp +++ b/al/effects/chorus.cpp -@@ -36,7 +36,7 @@ constexpr std::optional WaveformFromEnum(ALenum type) noexcept +@@ -37,7 +37,7 @@ constexpr std::optional WaveformFromEnum(ALenum type) noexcept } return std::nullopt; } @@ -116,7 +116,7 @@ { --- a/al/state.cpp +++ b/al/state.cpp -@@ -129,7 +129,7 @@ constexpr auto DistanceModelFromALenum(ALenum model) noexcept -> std::optional std::optional inline float SampleConv(float val) noexcept { return val; } @@ -12,7 +12,7 @@ { /* Floats have a 23-bit mantissa, plus an implied 1 bit and a sign bit. * This means a normalized float has at most 25 bits of signed precision. -@@ -2123,13 +2123,16 @@ template<> inline int32_t SampleConv(float val) noexcept +@@ -2129,13 +2129,16 @@ template<> inline int32_t SampleConv(float val) noexcept */ return fastf2i(std::clamp(val*2147483648.0f, -2147483648.0f, 2147483520.0f)); } diff --git a/subprojects/packagefiles/openal-soft-mkxp-polyfill.patch b/subprojects/packagefiles/openal-soft-mkxp-polyfill.patch index 2d78e4be..9e34554f 100644 --- a/subprojects/packagefiles/openal-soft-mkxp-polyfill.patch +++ b/subprojects/packagefiles/openal-soft-mkxp-polyfill.patch @@ -79,8 +79,8 @@ #include "AL/alc.h" --- a/al/source.cpp +++ b/al/source.cpp -@@ -34,7 +34,7 @@ - #include +@@ -35,7 +35,7 @@ + #include #include #include -#include @@ -119,7 +119,7 @@ /* Flag to specify if alcSuspendContext/alcProcessContext should defer/process * updates. -@@ -743,7 +743,7 @@ void alc_initconfig() +@@ -752,7 +752,7 @@ void alc_initconfig() #endif // ALSOFT_EAX } inline void InitConfig() @@ -185,8 +185,8 @@ #include --- a/alc/backends/pipewire.cpp +++ b/alc/backends/pipewire.cpp -@@ -37,7 +37,7 @@ - #include +@@ -38,7 +38,7 @@ + #include #include #include -#include @@ -207,9 +207,9 @@ #include --- a/alc/backends/wasapi.cpp +++ b/alc/backends/wasapi.cpp -@@ -52,7 +52,7 @@ - #include +@@ -53,7 +53,7 @@ #include + #include #include -#include +#include "../../src/mkxp-polyfill.h" diff --git a/subprojects/packagefiles/openal-soft-null.patch b/subprojects/packagefiles/openal-soft-null.patch index 95ae96ac..c9181201 100644 --- a/subprojects/packagefiles/openal-soft-null.patch +++ b/subprojects/packagefiles/openal-soft-null.patch @@ -2,7 +2,7 @@ --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -897,7 +897,7 @@ set(ALC_OBJS ${ALC_OBJS} +@@ -912,7 +912,7 @@ set(ALC_OBJS ${ALC_OBJS} # Default backends, always available alc/backends/loopback.cpp alc/backends/loopback.h diff --git a/subprojects/packagefiles/openal-soft-pic.patch b/subprojects/packagefiles/openal-soft-pic.patch index d99e2e67..ab9386ea 100644 --- a/subprojects/packagefiles/openal-soft-pic.patch +++ b/subprojects/packagefiles/openal-soft-pic.patch @@ -2,7 +2,7 @@ --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -1377,7 +1377,7 @@ target_compile_definitions(alsoft.common PRIVATE ${CPP_DEFS}) +@@ -1404,7 +1404,7 @@ target_compile_definitions(alsoft.common PRIVATE ${CPP_DEFS}) target_compile_options(alsoft.common PRIVATE ${C_FLAGS}) target_link_libraries(alsoft.common PRIVATE alsoft::fmt) set_target_properties(alsoft.common PROPERTIES ${ALSOFT_STD_VERSION_PROPS} diff --git a/subprojects/packagefiles/openal-soft-ps3.patch b/subprojects/packagefiles/openal-soft-ps3.patch index 00e4d2cf..5d112fd9 100644 --- a/subprojects/packagefiles/openal-soft-ps3.patch +++ b/subprojects/packagefiles/openal-soft-ps3.patch @@ -1,16 +1,5 @@ # The PlayStation 3 toolchain appears to be missing some functions from the C++ standard library. This replaces the missing functions with other ones that are available. ---- a/alc/alu.cpp -+++ b/alc/alu.cpp -@@ -2155,7 +2155,7 @@ void Write(const al::span InBuffer, void *OutBuffer, cons - out[c] = SampleConv(s); - out += ptrdiff_t(FrameStep); - }; -- std::for_each_n(inbuf.cbegin(), SamplesToDo, conv_sample); -+ std::for_each(inbuf.cbegin(), inbuf.cbegin() + SamplesToDo, conv_sample); - ++c; - } - if(const size_t extra{FrameStep - c}) --- a/alc/effects/reverb.cpp +++ b/alc/effects/reverb.cpp @@ -931,7 +931,7 @@ void EarlyReflections::updateLines(const float density_mult, const float diffusi diff --git a/subprojects/stb.wrap b/subprojects/stb.wrap index 1d0ca63e..652e47d7 100644 --- a/subprojects/stb.wrap +++ b/subprojects/stb.wrap @@ -1,6 +1,6 @@ [wrap-git] url = https://github.com/nothings/stb -revision = 5c205738c191bcb0abc65c4febfa9bd25ff35234 +revision = f58f558c120e9b32c217290b80bad1a0729fbb2c depth = 1 patch_directory = stb diff_files = stb-uintptr.patch