I had the issue that any time I had headphones connected to my Macbook Retina (late 2013), my audio would stop working after waking up from sleep. If I plugged them in when the computer was on it didn’t always work either. I tried all of the normal Pram reset, smc reset and all that. Nothing seemed to help. To get audio working again I had to restart my mac. What happens when you restart the mac is that all drivers and kernel extensions reload, so instead of doing that I created a small application that does that for you. If you want to, you can do it yourself in the terminal by typing
sudo kextunload /System/Library/Extensions/AppleHDA.kext sudo kextload /System/Library/Extensions/AppleHDA.kext
Pretty simple but I found it frustrating to have to do it every time it happened so here’s an app you can put in your dock. This might work if you have other audio issues as well. I won’t guarantee anything though. If you mac stops working forever, I won’t take responsibility. This app has worked for me many times. Some times your audio driver won’t unload for other reasons and then you might need to restart any way but this should save you the trouble most of the time.

I get a “No File Attached” error when I try to download.
Thanks Dave!
Should work now.
Just dropping in to say a big, grateful thank you for making this little app. I’ve been plagued with this problem recently and this helps very much.
You are welcome =) I’m glad it’s been of use!
Awesome
omg, you are the best. i have been searching for a solution ever october 2013 and no one has been able to solve this. even apple “geniuses” were baffled by the problem
(ps. my music was already playing when the audio stopped working, and running your code and instantly hearing my music was the best thing ever)
Thanks, worked like a charm :)
This is amazing. Thank you for posting.
mac cant even identify the internal speakers now
teach me how to reload the kernel on my end. I don’t want to use your download and I don’t want to restart.
You don’t need to use my script, it’s just easier. It does exactly what the terminal commands I posted do, so you can just use the terminal if that feels safer. I just made a gui for it =)