I know there's a lot of other questions similar to this, but none of them seem to be right. My problem's nothing to do with the headphone jack - I haven't used it for ages and there's no red light - it's just the speakers not being an option in System Preferences or Audio MIDI Setup. Plugging in headphones changes nothing.
I've previously had Soundflower installed.
The problem started today when I was using Dropbox, which was installed on an external HD. My computer went to sleep and wouldn't wake up, so I force-restarted. All was fine but for the volume icon being grayed out.
The only option in System Preferences for sound output is Airplay, which I've never used. With this selected (I can't unselect it because there's no other options) the volume is no longer grayed out, but of course there's no sound.
I restarted on an external drive, and it had the same problem. Next step is to reinstall the OS, but I don't think it's going to help.
My computer is a white Macbook from early 2009 running Mavericks. I've recently replaced the internal HD with an SSD, and upgraded the RAM to 4GB.