Simulator causing Mac audio distortion

I am experiencing an issue where my Mac's speakers will crackle and pop when running an app on the Simulator or even when previewing SwiftUI with Live Preview.

I am using a 16" MacBook Pro (i9) and I'm running Xcode 12.2 on Big Sur (11.0.1).

Killing coreaudiod temporarily fixes the problem however this is not much of a solution.

Is anyone else having this problem?


Post not yet marked as solved Up vote post of joltguy Down vote post of joltguy
2.2k views

Answers

Having the same issue. Preview and simulator with Swift UI is making music coming from Spotify distort and crackle. Heard something about turning off mic on simulator, haven't found how to.
I have the same issue here... It's very annoying
Having this too! I've read somewhere that if you switch sound output (IO in context menu -> output device) to a second one (if you are using headphones, then set output to speakers) will solve the issue, and it is true, but this not works if I using only built-in speakers... I hope that Apple will fix it
install Blackhole 2ch from:
https://github.com/ExistentialAudio/BlackHole

With your Simulator open go to I/O > Audio output > Blackhole 2 ch.

This worked for me - I hope it helps! (but yeah... it needs to be fixed!)

The changing audio output solution works for simulator. What about SwiftUI Previews? Fixing the issue requires closing Xcode. It is hard to develop apps with closed Xcode...

  • For SwiftUI Previews, open your monitor, force quit the "coreaudiod" process.

Add a Comment

Had the same issue when running Preview Canvas with Xcode 12.5.1.

Fixed it with going to System Preferences -> Sound -> Input -> Change it to Macbook Pro Microphone (Basically internal mic of your device).

Hope this helps you.

  • The Mac Mini doesn't have an internal mic. Is this seriously not fixed yet?

  • Im also on a M1 Mac mini and this is very frustrating. I don't want audio in my previews or app development, is there a way to kill audio in Xcode completely?

Add a Comment