The STOP: 0xD1 error is a generic error and until the file that causes it is identified, you will have a hard time determining its cause.
From your posts it looks like it is probably your soundcard and / or its drivers.
Try moving the card to another slot. Make sure the slot is not shared.
Reserver IRQ 5 for it in the BIOS.
Completely uninstall your drivers and reinstall again.
Every time I have fought with this error it has turned out to be a hardware/driver issue. Once the SCSI cable was loose. Another time a SCSI card was loose!. Yet another time, we had to swap out the processor. Only once did it turn out to be software related, and then some hardware monitoring agent was messing up the drive controller drivers.
What I would do is start pulling out all non-essential cards and see if the error goes away.
If not, try pulling out all memory DIMMs and then putting them in one by one to see if it is bad memory. If that doesn't work, try replacing the board and/or the processor.
If however by pulling out the cards the error goes away, you can start putting in cards one by one till you identify which one is the culprit.
In your case, you mention that it happens only after playing 3D games. Try setting your card to AGP2X, try disabling fast writes and sidebanding. Try not selecting hardware acceleration for the sound.
Just some pointers.
Good Luck.