Troubleshooting: Audio buzz from computer headphone jack
This buzz is caused by a ground loop in the MacBook internal wiring when the HDMI and 3.5mm connectors are being used at the same time.
The solution to this is to route your audio through a USB interface such as a Focusrite Scarlett 2i2. This allows you to utilize one of the USB connectors on the computer instead of the 3.5mm connector.
Link to purchase USB interface:
Scarlett 2i2
https://www.sweetwater.com/store/detail/Scarlet2i2G3--focusrite-scarlett-2i2-3rd-gen-usb-audio-interface