Looking at when this post was originally made, you may have already resolved the problem.
Anyway, since the sound stops working after it has been on for a bit, I would look at a couple of possibilities.
- Bad Sound Card
- Overheating in the Case
- Virus / Spyware
The sound card could be bad. Whether it is integrated into the motherboard or in a PCI slot, you could pick up a new PCI Sound Card (relatively cheap) and give it a try.
Since the problem is not constant (starts after it has been working) overheating in the case could be a problem. If the computer is operating in a hot environment, that wreaks havock on electronics.
Finally, I would make sure my virus software is up to date and run a couple of spyware scans just to be safe.