1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 06:35:30 +00:00

Use OpenAL's linear attenuation model

We should use the inverse distance clamped model (the default), but we first
need to handle muting sounds that are beyond their max distance. Linear
attenuation doesn't give a proper rolloff, but it makes the sounds silent at
max distance.
This commit is contained in:
Chris Robinson 2012-03-18 09:05:38 -07:00
parent a256b9a7b0
commit 2f92559fc7

View File

@ -303,6 +303,8 @@ bool OpenAL_Output::Initialize(const std::string &devname)
Device = 0;
return false;
}
alDistanceModel(AL_LINEAR_DISTANCE_CLAMPED);
throwALerror();
return true;
}