Windows says headphones aren't plugged in, while they are?

I'm trying to play mine craft with a friend but my computer says that there are no headphones plugged in with the red X by the speaker emblem. I'm on skype with him right now and i can hear him, as well as youtube videos and such. But when i try to play minecraft there's no sound at all. I have restarted the computer and it works for a minute, then the red X comes up and the sound goes away. I'm using Windows 8.

Check your audio drivers. Repair the drivers and re-try