|
|
|
@ -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;
|
|
|
|
|