I've run into this on my Pre+ and Pre 2 and often it's the sensor in the headphone jack not working correctly. The phone thinks a headset is still plugged in even when one isn't. This usually happens to me after I've had headphones or a cable plugged into the phone.
Short of taking the phone apart to clean or repair the piece in the headphone jack, I usually plug and unplug something into the jack until it manages to fix itself. I'll try playing music using the music player: if it's playing but you don't hear anything out of the speaker, the phone still thinks a headset is plugged in. Once the headphone sensor correctly identifies nothing plugged in, you will hear the music on the phone speaker.
Hope this helps!