This question already has an answer here:
Once I plug headphones into my iMac I no longer have the option in the sound preferences panel to output audio to the built-in speakers. I have to unplug the headphones to get audio output through the built-in speakers. Since the plug is on the back of the display this is inconvenient. Does anyone know of an audio app that allows me to easily switch between built-in speakers and headphones for audio output?