This one is a little different and somehow weird. For some time now, I noticed that without obvious reason, my headphones stopped working on my MacBook Pro. If I switched to other sound output (internal speakers …), sound worked fine. After that I usually rebooted my laptop what became really annoying.
Then Dalibor showed me trick. Just open your Activity Monitor and find process “coreaudiod”. Select it and click on X mark on top left corner of the window. This will kill this process. Process will automatically start again. This should fix your issue.