Having a similar problem. I have a MacBook Pro and the internal speakers work. However, if I plug in speakers or a headphone the sound stops. Unplug them and I get sound again. After reading a bunch of threads and trying the suggestions, which none worked, I saw a reply regarding that the problem might be Adobe Flash. Well, since I've had this laptop since September (bought it with Mavericks installed) and didn't have this issue until a couple of weeks ago (I always keep speakers plugged in and wake up my Mac and shut it down automatically each day), I thought that it must be something recent. Using Adobe Flash as a suspect, I looked in the Applications folder, but did not see it. Then I sorted the Application files on the date an found that Utilities was changed on March 14th. I opened it and found an Adobe Flash uninstall app. I uninstalled Adobe Flash and now the sound works again through the plugged in speakers.
So it seems more of an Adobe Flash problem, but shame on Apple for not posting something on this or working with Adobe to get it fixed. On that note, I've been using Apple computers since the 1980's and they were clearly better than the alternative during most of that time, but recently, Apple is making everything worse in my opinion. iTunes absolutely ***** now, the Mail program is subpar compared to Outlook, Finder is just passable, and Mavericks? What the **** is that? I havent' seen one new thing that is useful and taking away the arrows on the scrollbar? Apple could at least make it available via Preferences. The only genuine thing Apple has going for it is security. I think their programmers either need to work on entirely new things or get another job. The problem is they got things right years ago, such as with iTunes, and since they can't find enough work on something new they spend their time re-tweaking and making changes to exisiting apps just for something to do, and are making things worse. But the worse thing is the arrogance to force everyone to the latest 'de-improved' version. Take iTunes for instance. I tried to keep my iMac iTunes version when I migrated to the MacBook, but Apple rigged it so that only the latest iTunes version works with the app store. They better wake up or their recent fall from record heights is going to accelerate.