diff --git a/src/client/sound/sound_manager.cpp b/src/client/sound/sound_manager.cpp index 679d3a155..6aae5bb7f 100644 --- a/src/client/sound/sound_manager.cpp +++ b/src/client/sound/sound_manager.cpp @@ -29,6 +29,8 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "filesys.h" #include "porting.h" +#include + namespace sound { void OpenALSoundManager::stepStreams(f32 dtime) @@ -347,6 +349,13 @@ void OpenALSoundManager::updateListener(const v3f &pos_, const v3f &vel_, void OpenALSoundManager::setListenerGain(f32 gain) { +#if defined(__APPLE__) + /* macOS OpenAL implementation ignore setting AL_GAIN to zero + * so we use smallest possible value + */ + if (gain == 0.0f) + gain = std::numeric_limits::min(); +#endif alListenerf(AL_GAIN, gain); }