mirror of
https://github.com/minetest/minetest.git
synced 2024-09-19 23:10:46 +03:00
macOS: make mute sound actually work (#15128)
Some checks failed
android / build (push) Has been cancelled
cpp_lint / clang_tidy (push) Has been cancelled
linux / gcc_7 (push) Has been cancelled
linux / gcc_14 (push) Has been cancelled
linux / clang_7 (push) Has been cancelled
linux / clang_18 (push) Has been cancelled
linux / clang_11 (PROMETHEUS=1) (push) Has been cancelled
macos / build (push) Has been cancelled
whitespace_checks / trailing_whitespaces (push) Has been cancelled
whitespace_checks / tabs_lua_api_files (push) Has been cancelled
windows / MinGW cross-compiler (${{ matrix.bits }}-bit) (32) (push) Has been cancelled
windows / MinGW cross-compiler (${{ matrix.bits }}-bit) (64) (push) Has been cancelled
windows / VS 2019 ${{ matrix.config.arch }}-${{ matrix.type }} (map[arch:x64 generator:-G'Visual Studio 16 2019' -A x64 vcpkg_triplet:x64-windows], portable) (push) Has been cancelled
windows / VS 2019 ${{ matrix.config.arch }}-${{ matrix.type }} (map[arch:x86 generator:-G'Visual Studio 16 2019' -A Win32 vcpkg_triplet:x86-windows], portable) (push) Has been cancelled
Some checks failed
android / build (push) Has been cancelled
cpp_lint / clang_tidy (push) Has been cancelled
linux / gcc_7 (push) Has been cancelled
linux / gcc_14 (push) Has been cancelled
linux / clang_7 (push) Has been cancelled
linux / clang_18 (push) Has been cancelled
linux / clang_11 (PROMETHEUS=1) (push) Has been cancelled
macos / build (push) Has been cancelled
whitespace_checks / trailing_whitespaces (push) Has been cancelled
whitespace_checks / tabs_lua_api_files (push) Has been cancelled
windows / MinGW cross-compiler (${{ matrix.bits }}-bit) (32) (push) Has been cancelled
windows / MinGW cross-compiler (${{ matrix.bits }}-bit) (64) (push) Has been cancelled
windows / VS 2019 ${{ matrix.config.arch }}-${{ matrix.type }} (map[arch:x64 generator:-G'Visual Studio 16 2019' -A x64 vcpkg_triplet:x64-windows], portable) (push) Has been cancelled
windows / VS 2019 ${{ matrix.config.arch }}-${{ matrix.type }} (map[arch:x86 generator:-G'Visual Studio 16 2019' -A Win32 vcpkg_triplet:x86-windows], portable) (push) Has been cancelled
This commit is contained in:
parent
2208fc0632
commit
733a019bf5
@ -29,6 +29,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#include "filesys.h"
|
||||
#include "porting.h"
|
||||
|
||||
#include <limits>
|
||||
|
||||
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<f32>::min();
|
||||
#endif
|
||||
alListenerf(AL_GAIN, gain);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user