diff --git a/code/nel/include/nel/sound/driver/source.h b/code/nel/include/nel/sound/driver/source.h index e3a5d552c..b43c83914 100644 --- a/code/nel/include/nel/sound/driver/source.h +++ b/code/nel/include/nel/sound/driver/source.h @@ -397,7 +397,7 @@ public: virtual void setSourceRelativeMode(bool mode = true) = 0; /// Get the source relative mode virtual bool getSourceRelativeMode() const = 0; - /// Set the min and max distances (default: 1, MAX_FLOAT) (3D mode only) + /// Set the min and max distances (default: 1, sqrt(MAX_FLOAT)) (3D mode only) virtual void setMinMaxDistances(float mindist, float maxdist, bool deferred = true) = 0; /// Get the min and max distances virtual void getMinMaxDistances(float& mindist, float& maxdist) const = 0; diff --git a/code/nel/src/sound/driver/openal/source_al.cpp b/code/nel/src/sound/driver/openal/source_al.cpp index b56276ec2..dab3123b1 100644 --- a/code/nel/src/sound/driver/openal/source_al.cpp +++ b/code/nel/src/sound/driver/openal/source_al.cpp @@ -34,7 +34,7 @@ _SoundDriver(NULL), _Buffer(NULL), _Source(AL_NONE), _DirectFilter(AL_FILTER_NULL), _EffectFilter(AL_FILTER_NULL), _IsPlaying(false), _IsPaused(false), _StartTime(0), _IsStreaming(false), _RelativeMode(false), _Pos(0.0f, 0.0f, 0.0f), _Gain(NLSOUND_DEFAULT_GAIN), _Alpha(1.0), -_MinDistance(1.0f), _MaxDistance(numeric_limits::max()), +_MinDistance(1.0f), _MaxDistance(sqrt(numeric_limits::max())), _Effect(NULL), _Direct(true), _DirectGain(NLSOUND_DEFAULT_DIRECT_GAIN), _EffectGain(NLSOUND_DEFAULT_EFFECT_GAIN), _DirectFilterType(ISource::FilterLowPass), _EffectFilterType(ISource::FilterLowPass), diff --git a/code/nel/src/sound/driver/xaudio2/source_xaudio2.cpp b/code/nel/src/sound/driver/xaudio2/source_xaudio2.cpp index e8d4bdfb9..318a65a1a 100644 --- a/code/nel/src/sound/driver/xaudio2/source_xaudio2.cpp +++ b/code/nel/src/sound/driver/xaudio2/source_xaudio2.cpp @@ -42,7 +42,7 @@ _DirectFilterPassGain(NLSOUND_DEFAULT_FILTER_PASS_GAIN), _EffectFilterPassGain(N _DirectFilterLowFrequency(NLSOUND_DEFAULT_FILTER_PASS_LF), _DirectFilterHighFrequency(NLSOUND_DEFAULT_FILTER_PASS_HF), _EffectFilterLowFrequency(NLSOUND_DEFAULT_FILTER_PASS_LF), _EffectFilterHighFrequency(NLSOUND_DEFAULT_FILTER_PASS_HF), _IsPlaying(false), _IsPaused(false), _IsLooping(false), _Pitch(1.0f), -_Gain(1.0f), _MinDistance(1.0f), _MaxDistance(numeric_limits::max()), +_Gain(1.0f), _MinDistance(1.0f), _MaxDistance(sqrt(numeric_limits::max())), _AdpcmUtility(NULL), _Channels(0), _BitsPerSample(0), _BufferStreaming(false) { // nlwarning(NLSOUND_XAUDIO2_PREFIX "Inititializing CSourceXAudio2");