I have looked at other people's problems regarding this issue but the way they solved it cannot fix my problem as I don't have any options to change anything. see images.
I had the same problem after upgrading to Yosemite and I've been looking for an answer on StackOverflow ever since. I found an answer which was not upvoted so it was harder to find unfortunately, but here is a way which solved my problem:
Open your terminal on your Mac and type in:
sudo killall coreaudiod
Press enter and you're done. It should work now.
Hope this helps.