update OpenAL-Soft to 1.24.3.

This commit is contained in:
Sasha Szpakowski
2025-05-03 12:51:37 -03:00
parent 375c6f88cd
commit 5e4f3241ac
322 changed files with 54386 additions and 12885 deletions
+51 -37
View File
@@ -1,6 +1,8 @@
#ifndef AL_SOURCE_H
#define AL_SOURCE_H
#include "config.h"
#include <array>
#include <cstddef>
#include <cstdint>
@@ -20,7 +22,7 @@
#include "core/context.h"
#include "core/voice.h"
#ifdef ALSOFT_EAX
#if ALSOFT_EAX
#include "eax/api.h"
#include "eax/call.h"
#include "eax/exception.h"
@@ -45,12 +47,10 @@ inline bool sBufferSubDataCompat{false};
struct ALbufferQueueItem : public VoiceBufferItem {
ALbuffer *mBuffer{nullptr};
DISABLE_ALLOC
};
#ifdef ALSOFT_EAX
#if ALSOFT_EAX
class EaxSourceException : public EaxException {
public:
explicit EaxSourceException(const char* message)
@@ -71,7 +71,7 @@ struct ALsource {
float RefDistance{1.0f};
float MaxDistance{std::numeric_limits<float>::max()};
float RolloffFactor{1.0f};
#ifdef ALSOFT_EAX
#if ALSOFT_EAX
// For EAXSOURCE_ROLLOFFFACTOR, which is distinct from and added to
// AL_ROLLOFF_FACTOR
float RolloffFactor2{0.0f};
@@ -165,10 +165,10 @@ struct ALsource {
DISABLE_ALLOC
#ifdef ALSOFT_EAX
#if ALSOFT_EAX
public:
void eaxInitialize(ALCcontext *context) noexcept;
void eaxDispatch(const EaxCall& call);
void eaxDispatch(const EaxCall& call) { call.is_get() ? eax_get(call) : eax_set(call); }
void eaxCommit();
void eaxMarkAsChanged() noexcept { mEaxChanged = true; }
@@ -199,26 +199,23 @@ private:
using EaxSpeakerLevels = std::array<EAXSPEAKERLEVELPROPERTIES, eax_max_speakers>;
using EaxSends = std::array<EAXSOURCEALLSENDPROPERTIES, EAX_MAX_FXSLOTS>;
using Eax1Props = EAXBUFFER_REVERBPROPERTIES;
struct Eax1State {
Eax1Props i; // Immediate.
Eax1Props d; // Deferred.
EAXBUFFER_REVERBPROPERTIES i; // Immediate.
EAXBUFFER_REVERBPROPERTIES d; // Deferred.
};
using Eax2Props = EAX20BUFFERPROPERTIES;
struct Eax2State {
Eax2Props i; // Immediate.
Eax2Props d; // Deferred.
EAX20BUFFERPROPERTIES i; // Immediate.
EAX20BUFFERPROPERTIES d; // Deferred.
};
using Eax3Props = EAX30SOURCEPROPERTIES;
struct Eax3State {
Eax3Props i; // Immediate.
Eax3Props d; // Deferred.
EAX30SOURCEPROPERTIES i; // Immediate.
EAX30SOURCEPROPERTIES d; // Deferred.
};
struct Eax4Props {
Eax3Props source;
EAX30SOURCEPROPERTIES source;
EaxSends sends;
EAX40ACTIVEFXSLOTS active_fx_slots;
};
@@ -490,14 +487,14 @@ private:
};
struct Eax1SourceAllValidator {
void operator()(const Eax1Props& props) const
void operator()(const EAXBUFFER_REVERBPROPERTIES& props) const
{
Eax1SourceReverbMixValidator{}(props.fMix);
}
};
struct Eax2SourceAllValidator {
void operator()(const Eax2Props& props) const
void operator()(const EAX20BUFFERPROPERTIES& props) const
{
Eax2SourceDirectValidator{}(props.lDirect);
Eax2SourceDirectHfValidator{}(props.lDirectHF);
@@ -516,7 +513,7 @@ private:
};
struct Eax3SourceAllValidator {
void operator()(const Eax3Props& props) const
void operator()(const EAX30SOURCEPROPERTIES& props) const
{
Eax2SourceDirectValidator{}(props.lDirect);
Eax2SourceDirectHfValidator{}(props.lDirectHF);
@@ -542,7 +539,24 @@ private:
struct Eax5SourceAllValidator {
void operator()(const EAX50SOURCEPROPERTIES& props) const
{
Eax3SourceAllValidator{}(static_cast<const Eax3Props&>(props));
Eax2SourceDirectValidator{}(props.lDirect);
Eax2SourceDirectHfValidator{}(props.lDirectHF);
Eax2SourceRoomValidator{}(props.lRoom);
Eax2SourceRoomHfValidator{}(props.lRoomHF);
Eax2SourceObstructionValidator{}(props.lObstruction);
Eax2SourceObstructionLfRatioValidator{}(props.flObstructionLFRatio);
Eax2SourceOcclusionValidator{}(props.lOcclusion);
Eax2SourceOcclusionLfRatioValidator{}(props.flOcclusionLFRatio);
Eax2SourceOcclusionRoomRatioValidator{}(props.flOcclusionRoomRatio);
Eax3SourceOcclusionDirectRatioValidator{}(props.flOcclusionDirectRatio);
Eax3SourceExclusionValidator{}(props.lExclusion);
Eax3SourceExclusionLfRatioValidator{}(props.flExclusionLFRatio);
Eax2SourceOutsideVolumeHfValidator{}(props.lOutsideVolumeHF);
Eax3SourceDopplerFactorValidator{}(props.flDopplerFactor);
Eax3SourceRolloffFactorValidator{}(props.flRolloffFactor);
Eax2SourceRoomRolloffFactorValidator{}(props.flRoomRolloffFactor);
Eax2SourceAirAbsorptionFactorValidator{}(props.flAirAbsorptionFactor);
Eax5SourceFlagsValidator{}(props.ulFlags);
Eax5SourceMacroFXFactorValidator{}(props.flMacroFXFactor);
}
};
@@ -806,11 +820,11 @@ private:
[[noreturn]] static void eax_fail_unknown_receiving_fx_slot_id();
static void eax_set_sends_defaults(EaxSends& sends, const EaxFxSlotIds& ids) noexcept;
static void eax1_set_defaults(Eax1Props& props) noexcept;
static void eax1_set_defaults(EAXBUFFER_REVERBPROPERTIES& props) noexcept;
void eax1_set_defaults() noexcept;
static void eax2_set_defaults(Eax2Props& props) noexcept;
static void eax2_set_defaults(EAX20BUFFERPROPERTIES& props) noexcept;
void eax2_set_defaults() noexcept;
static void eax3_set_defaults(Eax3Props& props) noexcept;
static void eax3_set_defaults(EAX30SOURCEPROPERTIES& props) noexcept;
void eax3_set_defaults() noexcept;
static void eax4_set_sends_defaults(EaxSends& sends) noexcept;
static void eax4_set_active_fx_slots_defaults(EAX40ACTIVEFXSLOTS& slots) noexcept;
@@ -823,9 +837,9 @@ private:
void eax5_set_defaults() noexcept;
void eax_set_defaults() noexcept;
static void eax1_translate(const Eax1Props& src, Eax5Props& dst) noexcept;
static void eax2_translate(const Eax2Props& src, Eax5Props& dst) noexcept;
static void eax3_translate(const Eax3Props& src, Eax5Props& dst) noexcept;
static void eax1_translate(const EAXBUFFER_REVERBPROPERTIES& src, Eax5Props& dst) noexcept;
static void eax2_translate(const EAX20BUFFERPROPERTIES& src, Eax5Props& dst) noexcept;
static void eax3_translate(const EAX30SOURCEPROPERTIES& src, Eax5Props& dst) noexcept;
static void eax4_translate(const Eax4Props& src, Eax5Props& dst) noexcept;
static float eax_calculate_dst_occlusion_mb(
@@ -889,13 +903,13 @@ private:
}
}
static void eax_get_active_fx_slot_id(const EaxCall& call, const GUID* ids, size_t max_count);
static void eax1_get(const EaxCall& call, const Eax1Props& props);
static void eax2_get(const EaxCall& call, const Eax2Props& props);
static void eax3_get_obstruction(const EaxCall& call, const Eax3Props& props);
static void eax3_get_occlusion(const EaxCall& call, const Eax3Props& props);
static void eax3_get_exclusion(const EaxCall& call, const Eax3Props& props);
static void eax3_get(const EaxCall& call, const Eax3Props& props);
static void eax_get_active_fx_slot_id(const EaxCall& call, const al::span<const GUID> src_ids);
static void eax1_get(const EaxCall& call, const EAXBUFFER_REVERBPROPERTIES& props);
static void eax2_get(const EaxCall& call, const EAX20BUFFERPROPERTIES& props);
static void eax3_get_obstruction(const EaxCall& call, const EAX30SOURCEPROPERTIES& props);
static void eax3_get_occlusion(const EaxCall& call, const EAX30SOURCEPROPERTIES& props);
static void eax3_get_exclusion(const EaxCall& call, const EAX30SOURCEPROPERTIES& props);
static void eax3_get(const EaxCall& call, const EAX30SOURCEPROPERTIES& props);
void eax4_get(const EaxCall& call, const Eax4Props& props);
static void eax5_get_all_2d(const EaxCall& call, const EAX50SOURCEPROPERTIES& props);
static void eax5_get_speaker_levels(const EaxCall& call, const EaxSpeakerLevels& props);
@@ -1017,9 +1031,9 @@ private:
void eax_set_efx_wet_gain_auto();
void eax_set_efx_wet_gain_hf_auto();
static void eax1_set(const EaxCall& call, Eax1Props& props);
static void eax2_set(const EaxCall& call, Eax2Props& props);
void eax3_set(const EaxCall& call, Eax3Props& props);
static void eax1_set(const EaxCall& call, EAXBUFFER_REVERBPROPERTIES& props);
static void eax2_set(const EaxCall& call, EAX20BUFFERPROPERTIES& props);
void eax3_set(const EaxCall& call, EAX30SOURCEPROPERTIES& props);
void eax4_set(const EaxCall& call, Eax4Props& props);
static void eax5_defer_all_2d(const EaxCall& call, EAX50SOURCEPROPERTIES& props);
static void eax5_defer_speaker_levels(const EaxCall& call, EaxSpeakerLevels& props);