Sound intermittent on OS X 10.10.5

Installed Kodi on Mac desktop with OS X 10.10.5

Sound cuts out intermittently with internal speakers and or through HDMI to Yamaha receiver. If I unplug HDMI it still remains intermittent on internal speakers. What and I missing?
Please Help!!!!