X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fsound%2Fsoundmgr_openal.cxx;h=6066a560c32d1d22cc49679b387171fe0a8807d9;hb=afb18ca75b90e5a2e0bf791ba2e38812128ab0a8;hp=ef4a8f153dd0956d07b895acb08151945d278877;hpb=bb46d91bc617be168074f5575581564ae50c0246;p=simgear.git diff --git a/simgear/sound/soundmgr_openal.cxx b/simgear/sound/soundmgr_openal.cxx index ef4a8f15..6066a560 100644 --- a/simgear/sound/soundmgr_openal.cxx +++ b/simgear/sound/soundmgr_openal.cxx @@ -133,13 +133,9 @@ void SGSoundMgr::init() { alDopplerFactor(1.0); alDopplerVelocity(340.3); // speed of sound in meters per second. -#if 0 - if ( alIsExtensionPresent((const ALchar*)"EXT_exponent_distance") ) { - alDistanceModel(AL_EXPONENT_DISTANCE); - } else { - alDistanceModel(AL_INVERSE_DISTANCE); - } -#endif + // gain = AL_REFERENCE_DISTANCE / (AL_REFERENCE_DISTANCE + + // AL_ROLLOFF_FACTOR * (distance - AL_REFERENCE_DISTANCE)); + alDistanceModel(AL_INVERSE_DISTANCE_CLAMPED); testForALError("listener initialization"); @@ -327,6 +323,7 @@ SGSampleGroup *SGSoundMgr::find( const string &refname, bool create ) { // sample group was not found. if (create) { SGSampleGroup* sgrp = new SGSampleGroup(this, refname); + add( sgrp, refname ); return sgrp; } else