From dec8264625c0f7c3882855a45253e444035ce56d Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 20 Feb 2019 11:36:55 +0400 Subject: [PATCH] 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. --- docs/building-xcode-old.md | 2 +- docs/building-xcode.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/building-xcode-old.md b/docs/building-xcode-old.md index 853fc7b54..ed5acf710 100644 --- a/docs/building-xcode-old.md +++ b/docs/building-xcode-old.md @@ -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 diff --git a/docs/building-xcode.md b/docs/building-xcode.md index c05ce07db..68cabcfb0 100644 --- a/docs/building-xcode.md +++ b/docs/building-xcode.md @@ -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