Fix crackling sound after opening Xcode Simulator.
Is your MacBook speakers are making weird noise while using Xcode simulator? Here's the fix.
While developing apps for iOS, you may face an issue with your main speakers. It makes weird crackling noises. Well, most probably the simulator is also using your main speaker as the output. This issue can be fixed by using another speaker device and using that device as the output device of your simulator. So your mac's output stays intact and the simulator's output too.
But, if you do not have a secondary speaker, you can use a virtual audio driver to fix the noise issue.
Welcome to BlackHole.
BlackHole is a modern MacOS virtual audio driver that allows applications to pass audio to other applications with zero additional latency.
Install BlackHole
You can follow the manual way of installing the package. Or, if you have Homebrew installed, just run:
brew install blackhole-2ch
After completing the installation, Open your Xcode simulator. On the menu bar, go to I/O > Audio Output > BlackHole 2ch
NOTE: If you use BlackHole
as your audio driver, you won't be able to hear any audio from your simulator. In most of the case you might not need the audio from the simulator. If you need the audio, I highly recommend you to use external speaker devices to use as the audio output of your simulator.
Thank you for reading, here is a potato.