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
+40 -40
View File
@@ -4,11 +4,11 @@
#include "AL/al.h"
#include "AL/efx.h"
#include "alc/effects/base.h"
#include "alc/context.h"
#include "alnumeric.h"
#include "effects.h"
#ifdef ALSOFT_EAX
#include "alnumeric.h"
#if ALSOFT_EAX
#include "al/eax/effect.h"
#include "al/eax/exception.h"
#include "al/eax/utils.h"
@@ -35,74 +35,74 @@ constexpr EffectProps genDefaultProps() noexcept
const EffectProps EchoEffectProps{genDefaultProps()};
void EffectHandler::SetParami(EchoProps&, ALenum param, int)
{ throw effect_exception{AL_INVALID_ENUM, "Invalid echo integer property 0x%04x", param}; }
void EffectHandler::SetParamiv(EchoProps&, ALenum param, const int*)
{ throw effect_exception{AL_INVALID_ENUM, "Invalid echo integer-vector property 0x%04x", param}; }
void EffectHandler::SetParamf(EchoProps &props, ALenum param, float val)
void EchoEffectHandler::SetParami(ALCcontext *context, EchoProps&, ALenum param, int)
{ context->throw_error(AL_INVALID_ENUM, "Invalid echo integer property {:#04x}", as_unsigned(param)); }
void EchoEffectHandler::SetParamiv(ALCcontext *context, EchoProps&, ALenum param, const int*)
{ context->throw_error(AL_INVALID_ENUM, "Invalid echo integer-vector property {:#04x}", as_unsigned(param)); }
void EchoEffectHandler::SetParamf(ALCcontext *context, EchoProps &props, ALenum param, float val)
{
switch(param)
{
case AL_ECHO_DELAY:
if(!(val >= AL_ECHO_MIN_DELAY && val <= AL_ECHO_MAX_DELAY))
throw effect_exception{AL_INVALID_VALUE, "Echo delay out of range"};
context->throw_error(AL_INVALID_VALUE, "Echo delay out of range");
props.Delay = val;
break;
return;
case AL_ECHO_LRDELAY:
if(!(val >= AL_ECHO_MIN_LRDELAY && val <= AL_ECHO_MAX_LRDELAY))
throw effect_exception{AL_INVALID_VALUE, "Echo LR delay out of range"};
context->throw_error(AL_INVALID_VALUE, "Echo LR delay out of range");
props.LRDelay = val;
break;
return;
case AL_ECHO_DAMPING:
if(!(val >= AL_ECHO_MIN_DAMPING && val <= AL_ECHO_MAX_DAMPING))
throw effect_exception{AL_INVALID_VALUE, "Echo damping out of range"};
context->throw_error(AL_INVALID_VALUE, "Echo damping out of range");
props.Damping = val;
break;
return;
case AL_ECHO_FEEDBACK:
if(!(val >= AL_ECHO_MIN_FEEDBACK && val <= AL_ECHO_MAX_FEEDBACK))
throw effect_exception{AL_INVALID_VALUE, "Echo feedback out of range"};
context->throw_error(AL_INVALID_VALUE, "Echo feedback out of range");
props.Feedback = val;
break;
return;
case AL_ECHO_SPREAD:
if(!(val >= AL_ECHO_MIN_SPREAD && val <= AL_ECHO_MAX_SPREAD))
throw effect_exception{AL_INVALID_VALUE, "Echo spread out of range"};
context->throw_error(AL_INVALID_VALUE, "Echo spread out of range");
props.Spread = val;
break;
default:
throw effect_exception{AL_INVALID_ENUM, "Invalid echo float property 0x%04x", param};
return;
}
}
void EffectHandler::SetParamfv(EchoProps &props, ALenum param, const float *vals)
{ SetParamf(props, param, *vals); }
void EffectHandler::GetParami(const EchoProps&, ALenum param, int*)
{ throw effect_exception{AL_INVALID_ENUM, "Invalid echo integer property 0x%04x", param}; }
void EffectHandler::GetParamiv(const EchoProps&, ALenum param, int*)
{ throw effect_exception{AL_INVALID_ENUM, "Invalid echo integer-vector property 0x%04x", param}; }
void EffectHandler::GetParamf(const EchoProps &props, ALenum param, float *val)
context->throw_error(AL_INVALID_ENUM, "Invalid echo float property {:#04x}",
as_unsigned(param));
}
void EchoEffectHandler::SetParamfv(ALCcontext *context, EchoProps &props, ALenum param, const float *vals)
{ SetParamf(context, props, param, *vals); }
void EchoEffectHandler::GetParami(ALCcontext *context, const EchoProps&, ALenum param, int*)
{ context->throw_error(AL_INVALID_ENUM, "Invalid echo integer property {:#04x}", as_unsigned(param)); }
void EchoEffectHandler::GetParamiv(ALCcontext *context, const EchoProps&, ALenum param, int*)
{ context->throw_error(AL_INVALID_ENUM, "Invalid echo integer-vector property {:#04x}", as_unsigned(param)); }
void EchoEffectHandler::GetParamf(ALCcontext *context, const EchoProps &props, ALenum param, float *val)
{
switch(param)
{
case AL_ECHO_DELAY: *val = props.Delay; break;
case AL_ECHO_LRDELAY: *val = props.LRDelay; break;
case AL_ECHO_DAMPING: *val = props.Damping; break;
case AL_ECHO_FEEDBACK: *val = props.Feedback; break;
case AL_ECHO_SPREAD: *val = props.Spread; break;
default:
throw effect_exception{AL_INVALID_ENUM, "Invalid echo float property 0x%04x", param};
case AL_ECHO_DELAY: *val = props.Delay; return;
case AL_ECHO_LRDELAY: *val = props.LRDelay; return;
case AL_ECHO_DAMPING: *val = props.Damping; return;
case AL_ECHO_FEEDBACK: *val = props.Feedback; return;
case AL_ECHO_SPREAD: *val = props.Spread; return;
}
context->throw_error(AL_INVALID_ENUM, "Invalid echo float property {:#04x}",
as_unsigned(param));
}
void EffectHandler::GetParamfv(const EchoProps &props, ALenum param, float *vals)
{ GetParamf(props, param, vals); }
void EchoEffectHandler::GetParamfv(ALCcontext *context, const EchoProps &props, ALenum param, float *vals)
{ GetParamf(context, props, param, vals); }
#ifdef ALSOFT_EAX
#if ALSOFT_EAX
namespace {
using EchoCommitter = EaxCommitter<EaxEchoCommitter>;