Fix extensive CPU usage on macOS when audio is played.

Regression was introduced in 91c85ec86b

The openal-soft version 1.19.1 tried to use semaphores created by sem_init,
which are not supported on macOS, so they just didn't work at all. This was
leading to an event loop thread spin-waiting instead of a normal sem_wait.

In the v1.19 upstream branch GCD semaphores are used on macOS.
This commit is contained in:
John Preston 2019-02-20 11:36:55 +04:00
parent fe618bd652
commit dec8264625
2 changed files with 2 additions and 2 deletions

View File

@ -82,7 +82,7 @@ Go to ***BuildPath*** and run
git clone git://repo.or.cz/openal-soft.git
cd openal-soft
git checkout openal-soft-1.19.1
git checkout v1.19
cd build
LDFLAGS="/usr/local/macold/lib/libc++.a /usr/local/macold/lib/libc++abi.a -isysroot / -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/" cmake -D ALSOFT_EXAMPLES=OFF -D LIBTYPE:STRING=STATIC -D CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.6 -D CMAKE_INSTALL_PREFIX:STRING=/usr/local/macold ..
make -j4

View File

@ -88,7 +88,7 @@ Go to ***BuildPath*** and run
git clone git://repo.or.cz/openal-soft.git
cd openal-soft
git checkout openal-soft-1.19.1
git checkout v1.19
cd build
LDFLAGS='-stdlib=libc++' cmake -D ALSOFT_EXAMPLES=OFF -D LIBTYPE:STRING=STATIC -D CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.8 ..
make -j4