As suggested by @NavyOwl in the response - https://developer.apple.com/forums/thread/666700?answerId=648163022#648163022, adding the following compilation flag fixes the problem:
g++ ... -L /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib
In order to make or cmake compile with this flag, one can define an environment variable (e.g., set in your IDE / bash):
bash
LDFLAGS=-L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib
If you are working from command line:
bash
export LDFLAGS=-L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib
make or cmake .
Post
Replies
Boosts
Views
Activity
I had the same problem with MacBook Pro (16-inch, 2019), BigSur 11.0.1 (20B29).
I can reproduce the bug: start playing a youtube video
start XCode Version 12.2 (12B45b)
navigate to any SwiftUI preview
sound starts clicking after preview is generated in the XCode
I have no clue why SwiftUI rendering has any relation to cracking sound.
This fixed it for a while:
sudo launchctl stop com.apple.audio.coreaudiod && sudo launchctl start com.apple.audio.coreaudiod