I have this issue regularly where the OSX audio stopped working on my Macbook. I am using High Sierra right now but had the same problem with Sierra. Not sure what is causing the problem, and not sure how to prevent it from happening. I have figured out though how to solve it, and as occasionally I find myself searching for the solution I figured I would quickly document it on my own blog. If your audio has stopped working you can simply stop the service responsible for it.
For me the following works solving the problem:
sudo killall coreaudiod
For me audio comes back again automatically almost instantly, some actually have reported they need to start the service again
sudo launchctl start com.apple.audio.coreaudiod
I hope this helps others as well as running into the same problem. If you have and you solved the problem in a different way please leave a comment.
I’ve been using OSX for a long time and even if I didn’t experience the very same problem I can share a similar experience with the webcam.
What happens is that a poorly written application is using the webcam and then it doesn’t release it correctly after the application is closed so other applications end up not being able to access the device.
My solution is to kill the service pretty much as you do and as soon as an application tries to access the webcam the service is started and all is good again (this is why most don’t need to start the service manually after kill).
In my case I managed to track down the application creating the problem but I need to use it so I can’t do much about it.
You are probably in a similar situation with the audio device, if you find what it is then you can file a bug report.
In my case it’s one of those very popular corporate video conferencing application…
Hope this helps shed light.
Duncan Epping says
Yeah I am trying to figure out what it causing it, so far have not found what it is. I suspect it is Zoom, but I am not sure yet.
I used “lsof” to find my problem.
You might want to try “lsof | grep -i coreaudio”, it might give you a bit more info about what is using your sound system.