Computer is playing media but no sound is heard.

After formatting my PC, the sound system seems to have corrupted or something like that. Media files are playing ok but no sound is heard. I have changed the speakers but still no solution. I have confirmed that the speakers are not muted.
