I found a solution for this just now (I had this problem).
The static sound is probably not a hardware issue. It comes from the internet browser Google Chrome or, I'm assuming, any other program that utilizes an integrated Adobe Flash Plug-in. The issue is the computer is using the integrated flash plug-in that comes with Chrome rather than an actual Flash Player from the computer.
To fix this (if this is occuring in Chrome), this is what I have done:
1) Open Chrome and type "chrome://plugins/" without the quotation marks into the address bar
2) Disable the Adobe Flash Player
3) Download Adobe Flash Player for Google Chrome (Mac version)
This should fix the problem, as the Flash player is part of the computer and not of the browser.
I have contacted Applecare to tell them to search up on this issue with developers.
I hope this solves your problem, Cheers!