My headphone jack and speakers sopped working My headphone jack and my speakers are not working at all. They just randomly stopped when my macbook air was closed. Is there any system preferences that i need to change?
The solution is from here and it worked with me:

There seems to be a bug whereby if the headphones are plugged in when the MBP is put to sleep and are not present when it is rewakened, the headphones stop being recognized. The solution is to:

Unplug the headphones
Put the MBP back to sleep (close the lid; without an external display hooked up)
Plug the headphones back in
Wake the MBP by opening the lid.

This should fix the problem.