Sound doesn't work anymore with Yosemite
I had the same problem after upgrading to Yosemite and I've been looking for an answer on StackOverflow 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.

PS: I'm re-posting this from my previous and exact answer to another user's same problem.

Hope this helps