mirror of
https://github.com/love2d/megasource.git
synced 2026-08-16 16:21:13 +02:00
Update OpenAL-Soft to 1.22.0
This commit is contained in:
@@ -4,8 +4,12 @@
|
||||
#include "AL/al.h"
|
||||
#include "AL/efx.h"
|
||||
|
||||
#include "alc/effects/base.h"
|
||||
#include "effects.h"
|
||||
#include "effects/base.h"
|
||||
|
||||
#ifdef ALSOFT_EAX
|
||||
#include "al/eax_exception.h"
|
||||
#endif // ALSOFT_EAX
|
||||
|
||||
|
||||
namespace {
|
||||
@@ -91,3 +95,58 @@ EffectProps genDefaultProps() noexcept
|
||||
DEFINE_ALEFFECT_VTABLE(Null);
|
||||
|
||||
const EffectProps NullEffectProps{genDefaultProps()};
|
||||
|
||||
|
||||
#ifdef ALSOFT_EAX
|
||||
namespace {
|
||||
|
||||
class EaxNullEffect final :
|
||||
public EaxEffect
|
||||
{
|
||||
public:
|
||||
EaxNullEffect();
|
||||
|
||||
void dispatch(const EaxEaxCall& eax_call) override;
|
||||
|
||||
// [[nodiscard]]
|
||||
bool apply_deferred() override;
|
||||
}; // EaxNullEffect
|
||||
|
||||
|
||||
class EaxNullEffectException :
|
||||
public EaxException
|
||||
{
|
||||
public:
|
||||
explicit EaxNullEffectException(
|
||||
const char* message)
|
||||
:
|
||||
EaxException{"EAX_NULL_EFFECT", message}
|
||||
{
|
||||
}
|
||||
}; // EaxNullEffectException
|
||||
|
||||
|
||||
EaxNullEffect::EaxNullEffect()
|
||||
: EaxEffect{AL_EFFECT_NULL}
|
||||
{
|
||||
}
|
||||
|
||||
void EaxNullEffect::dispatch(const EaxEaxCall& eax_call)
|
||||
{
|
||||
if(eax_call.get_property_id() != 0)
|
||||
throw EaxNullEffectException{"Unsupported property id."};
|
||||
}
|
||||
|
||||
bool EaxNullEffect::apply_deferred()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
EaxEffectUPtr eax_create_eax_null_effect()
|
||||
{
|
||||
return std::make_unique<EaxNullEffect>();
|
||||
}
|
||||
|
||||
#endif // ALSOFT_EAX
|
||||
|
||||
Reference in New Issue
Block a user