I confirm this is linked to XCode simulation. When working on physical device, no crackling sound is to be reported.
To keep it up this thread, @mskayyali's solution works fine:
sudo pkill coreaudiod
You may have to run it several times though.
Topic:
App & System Services
SubTopic:
Core OS
Tags: