Repair permissions & restart.
Check your settings in the Audio Midi app which is located in the Utilities folder.
http://support.apple.com/kb/TS1574 Troubleshooting issues with no audio from built-in speakers on Macs
Trick/Tip: Open up GarageBand if installed then, open a program (optional).
Quit out of the GarageBand app.
Repairing the mysteriously muted Mac
The background on the issue is that there’s a small sensor switch inside the headphone port. When you insert a headphone jack, the sensor understands what's what and changes the sound output setting to Headphones. If you insert a jack for digital audio output, the device changes to Digital Out. When you remove the jack completely, it should read Internal Speakers.
The spirits tell me that there’s a very good chance that you recently had something jacked into this port—a set of headphones or a cable leading to powered speakers, for example. When you removed the jack, something in the port prevented the sensor from tripping correctly. That’s why you see Digital Out instead of internal Speakers.
The solution is to force the sensor to do its job. The safest way to do that is to simply run a jack in and out of the port a few times. Much of the time, this takes care of the problem by correctly tripping the sensor. If that doesn’t work, there may be gunk in the port. Before turning to more invasive techniques, get a can of compressed air, attach the small tube that fits the nozzle, and blast a few shots of air into the port. With any luck, that should dislodge the gunk and the port will operate as it should.
If that doesn’t work, find a foam-tipped swab that fits (electronics shops generally carry them), dip it in rubbing alcohol, and gently insert it into the headphone port in an attempt to wipe away any stubborn gunk. I recommend foam rather than cotton swabs because the cotton variety might leave threads behind. (This same technique works well with misbehaving headphone ports on devices such as iOS devices.)
It's possible that gunk has nothing to do with it. Rather, it may be that the switch just needs a subtle nudge. If a jack or swab doesn't work, I've heard of people successfully resetting it with a deft poke of a toothpick.
Thank you for your reply.
I doregularly use the headphones jack with a cable connected to powered speakers but, never before did I have a muted sound output when going back to standard sound out.
I've tried to do what you suggested:
1-I did run a jack in and out of the port a few times, this doesn't seem to change conditions,
2-Settings in the Audio Midi app
There are a few options which cannot be changed, such as M volume. I did not want to configure the speakers as I don't know what the values should be..