My iMac makes no sound at all
In order to try to localise the problem, try adding an additional user to your iMac, and see if this new user also has no sound. 

If the new user has sound, then you can be sure it's not a hardware problem. If the new user has no sound, then it looks like it's a hardware problem.