mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-17 02:42:45 +00:00
Switch sound distance model to AL_INVERSE_DISTANCE
This commit is contained in:
parent
fbed429b25
commit
cf85cbbc8e
@ -628,9 +628,7 @@ void OpenAL_Sound3D::update()
|
||||
{
|
||||
ALfloat gain = mVolume*mBaseVolume;
|
||||
ALfloat pitch = mPitch;
|
||||
if(mPos.squaredDistance(mOutput.mPos) > mMaxDistance*mMaxDistance)
|
||||
gain = 0.0f;
|
||||
else if(!(mFlags&MWBase::SoundManager::Play_NoEnv) && mOutput.mLastEnvironment == Env_Underwater)
|
||||
if(!(mFlags&MWBase::SoundManager::Play_NoEnv) && mOutput.mLastEnvironment == Env_Underwater)
|
||||
{
|
||||
gain *= 0.9f;
|
||||
pitch *= 0.7f;
|
||||
@ -696,7 +694,7 @@ void OpenAL_Output::init(const std::string &devname)
|
||||
fail(std::string("Failed to setup context: ")+alcGetString(mDevice, alcGetError(mDevice)));
|
||||
}
|
||||
|
||||
alDistanceModel(AL_LINEAR_DISTANCE_CLAMPED);
|
||||
alDistanceModel(AL_INVERSE_DISTANCE);
|
||||
throwALerror();
|
||||
|
||||
ALCint maxmono=0, maxstereo=0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user