diff options
-rw-r--r-- | al/source.cpp | 8 | ||||
-rw-r--r-- | al/source.h | 5 |
2 files changed, 11 insertions, 2 deletions
diff --git a/al/source.cpp b/al/source.cpp index f759dcc7..f985da7a 100644 --- a/al/source.cpp +++ b/al/source.cpp @@ -121,7 +121,11 @@ void UpdateSourceProps(const ALsource *source, Voice *voice, ALCcontext *context props->OuterAngle = source->OuterAngle; props->RefDistance = source->RefDistance; props->MaxDistance = source->MaxDistance; - props->RolloffFactor = source->RolloffFactor; + props->RolloffFactor = source->RolloffFactor +#ifdef ALSOFT_EAX + + source->RolloffFactor2 +#endif + ; props->Position = source->Position; props->Velocity = source->Velocity; props->Direction = source->Direction; @@ -5393,7 +5397,7 @@ void ALsource::eax_set_doppler_factor() void ALsource::eax_set_rolloff_factor() { - RolloffFactor = eax_.source.flRolloffFactor; + RolloffFactor2 = eax_.source.flRolloffFactor; } void ALsource::eax_set_room_rolloff_factor() diff --git a/al/source.h b/al/source.h index 360b4365..7c0e4a15 100644 --- a/al/source.h +++ b/al/source.h @@ -123,6 +123,11 @@ struct ALsource { float RefDistance{1.0f}; float MaxDistance{std::numeric_limits<float>::max()}; float RolloffFactor{1.0f}; +#ifdef ALSOFT_EAX + // For EAXSOURCE_ROLLOFFFACTOR, which is distinct from and added to + // AL_ROLLOFF_FACTOR + float RolloffFactor2{0.0f}; +#endif std::array<float,3> Position{{0.0f, 0.0f, 0.0f}}; std::array<float,3> Velocity{{0.0f, 0.0f, 0.0f}}; std::array<float,3> Direction{{0.0f, 0.0f, 0.0f}}; |